[Bioperl-l] Is there a "combine" method that would combine several sequence alignments to a single alignment?
Jason Stajich
jason.stajich at gmail.com
Mon Nov 21 15:31:50 UTC 2011
greg -- looks good - you could simplify part of the code to use the .= operator and use AlignIO to write the seqs out.
This is my script to combine a directory of MSA aligned .fasaln files into a single concatenated alignment.
https://github.com/hyphaltip/genome-scripts/blob/master/phylogenetics/combine_fasaln.pl
On Nov 21, 2011, at 7:00 AM, Gregory Baillie wrote:
> Hi.
>
> I've attached a simple script (concatenate_alignments.pl) I wrote to concatenate alignments.
>
> It can be a bit of a memory hog if you have long alignments or large numbers of sequences; otherwise you should be OK.
>
> Usage:
> concatenate_alignments.pl -o <output_alignment> <input_alignment_1> <input_alignment_2> <... input_alignment_n>
>
>
> If you want to insert a string between the concatenated sequences, you can use the -j option (eg. -j '---').
>
> Greg.
>
>
> ________________________________
> From: Dave Messina <David.Messina at sbc.su.se>
> To: Tao Zhu <tzhu at mail.bnu.edu.cn>
> Cc: BioPerl <bioperl-l at lists.open-bio.org>
> Sent: Monday, 21 November 2011 7:58 PM
> Subject: Re: [Bioperl-l] Is there a "combine" method that would combine several sequence alignments to a single alignment?
>
> Hi,
>
> No, I don't believe such a method exists. Could you describe what you are
> wanting to do? Perhaps there is another way to do it.
>
>
> Dave
>
>
>
> On Mon, Nov 21, 2011 at 06:17, Tao Zhu <tzhu at mail.bnu.edu.cn> wrote:
>
>> I can use the "slice" method to split a single sequence alignment into
>> several subalignments. Then is there a corresponding "combine" method to
>> combine such subalignments back?
>>
>> --
>> Tao Zhu, College of Life Sciences, Beijing Normal University, Beijing
>> 100875, China
>> Email: tzhu at mail.bnu.edu.cn
>>
>> ______________________________**_________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/**mailman/listinfo/bioperl-l<http://lists.open-bio.org/mailman/listinfo/bioperl-l>
>>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l<concatenate_alignments.pl>_______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list