[Bioperl-l] revcom the multiple sequence alignment
wenbin mei
wenbinmei at gmail.com
Tue Dec 6 17:51:18 UTC 2011
I think I might not explain clearly my questions. I extract the individual
gene alignment from the whole genome alignment. Since some gene are on the
reverse strand, I want to revcom the gene alignment. There is part of my
scripts. I can read the strand information from another file.
my $newstart = $refseq->column_from_residue_number($start);
my $newend = $refseq->column_from_residue_number($end);
$seq{$genename} = $aln->slice($newstart, $newend);
Any suggestion to help me revcom some gene alignment on the minus strand is
helpful. Thank you.
-best,
wenbin
On Tue, Dec 6, 2011 at 12:40 PM, Jason Stajich <jason.stajich at gmail.com>wrote:
> I think this would work to update it in place though I haven't tried it
> myself
>
> for my $seq ( $aln->each_seq ) {
> $seq->seq( $seq->revcom->seq );
> }
> $out->write_aln($aln);
>
> This may also work - not entirely sure if there is any extra work done on
> the meta data (start/end) of the Seq object when this is done. You may
> want to flip start/end for the sequences (the seqs are Bio::LocatableSeq
> objects) explicitly if not. Or you may not care about those data and can
> ignore.
>
> $seq = $seq->revcom
>
> Jason
> On Dec 6, 2011, at 8:09 AM, wenbin mei wrote:
>
> > Hi,
> >
> > I have a question about revcom the multiple sequence alignment. One way I
> > can do convert the format into fasta and revcom individual sequences. I
> > wonder is there a easy way to convert the multiple sequence alignment as
> a
> > whole. Thank you for help.
> >
> > -best,
> > wenbin
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
>
--
Wenbin Mei Ph.D. Student
Dr. Brad Barbazuk's Lab
Department of Biology
University of Florida
509-899-3067
wmei at ufl.edu <wmei at ufl.edu>
More information about the Bioperl-l
mailing list