Bio::SimpleAlign replace sequence

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bio::SimpleAlign replace sequence

Bernd Web
Hi

Is it possible to replace a sequence itself for a Bio::Locatable Seq
in SimpleAlign.
I'd like to change the sequence string for a sequence in the alignment directly.
I could remove this sequence and add it but this will change the
order. (I remember a patch was made to insert a sequence with add_seq
at a specific position, but still).

I'd like to do change a sequence like this. I realize the below cannot
work, but is there an option to do this?

$aln->get_seq_by_pos(1)->seq = "MMM";

that is via the methods, instead of doing something low level like

$aln->{_seq}->{myname}->{seq} = "MMM";


Regards,
Bernd
_______________________________________________
Bioperl-l mailing list
[hidden email]
http://lists.open-bio.org/mailman/listinfo/bioperl-l
Reply | Threaded
Open this post in threaded view
|

Re: Bio::SimpleAlign replace sequence

Roy Chaudhuri-3
Hi Bernd,

This works for me:

$aln->get_seq_by_pos(1)->seq("MMM");

Cheers,
Roy.

On 26/01/2011 15:40, Bernd Web wrote:

> Hi
>
> Is it possible to replace a sequence itself for a Bio::Locatable Seq
> in SimpleAlign.
> I'd like to change the sequence string for a sequence in the alignment directly.
> I could remove this sequence and add it but this will change the
> order. (I remember a patch was made to insert a sequence with add_seq
> at a specific position, but still).
>
> I'd like to do change a sequence like this. I realize the below cannot
> work, but is there an option to do this?
>
> $aln->get_seq_by_pos(1)->seq = "MMM";
>
> that is via the methods, instead of doing something low level like
>
> $aln->{_seq}->{myname}->{seq} = "MMM";
>
>
> Regards,
> Bernd
> _______________________________________________
> Bioperl-l mailing list
> [hidden email]
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

_______________________________________________
Bioperl-l mailing list
[hidden email]
http://lists.open-bio.org/mailman/listinfo/bioperl-l