[Bioperl-l] making msf file from the array of sequence string
Nathan Haigh
nathanhaigh at ukonline.co.uk
Fri Oct 29 02:07:07 EDT 2004
After creating your Bio::LocatableSeq object you need to add it to a Bio::SimpleAlign object not Bio::Align::AlignI.
Something along the lines of this should work:
my $aln = new Bio::SimpleAlign();
# you will probably want to loop over this section for each of your seqs
my $seq = new Bio::LocatableSeq(-seq => "CAGT-GGT",
-id => "seq1",
-start => 1,
-end => 7);
$aln->add_seq($seq);
my $out_msf = Bio::AlignIO->new(-file => ">out.aln.msf", -format => 'msf');
$out_msf->write_aln($aln);
Nathan
> -----Original Message-----
> From: bioperl-l-bounces at portal.open-bio.org [mailto:bioperl-l-bounces at portal.open-bio.org] On Behalf Of Kwangbom Choi
> Sent: 29 October 2004 03:10
> To: bioperl-l at portal.open-bio.org
> Subject: [Bioperl-l] making msf file from the array of sequence string
>
>
> Given that the aligned sequences are available in the form of string
> array, how can I make it an msf file? My current idea is ...
>
> (1) make each aligned sequence string to be an object of Bio::LocatableSeq
> (2) add_seq each LocatableSeq object to the Bio::Align::AlignI object
> (3) initiate msf format output filehandler using Bio::AlignIO
> (4) use write_aln in Bio::AlignIO::msf
>
> But my problem in this scheme is that I do not know how to initiate
> an empty Bio::Align::AlignI object to which my aligned sequences are
> added (step 2 above). Thank you in advance.
>
> --
> Sincerely,
> Kwangbom Choi
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list