Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Text manipulation

by zentara (Archbishop)
on Nov 09, 2012 at 14:28 UTC ( #1003136=note: print w/ replies, xml ) Need Help??


in reply to Text manipulation

Use BioPerl


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh


Comment on Re: Text manipulation
Re^2: Text manipulation
by frozenwithjoy (Curate) on Nov 09, 2012 at 16:41 UTC
    Ya, here is a BioPerl solution to interleave to sequences:
    #!/usr/bin/env perl use strict; use warnings; use Bio::SeqIO; my $fasta_in_1 = $ARGV[0]; my $fasta_in_2 = $ARGV[1]; my $fasta_out = ">interleave_1_2.fa"; my $seqio_in_1 = Bio::SeqIO->new( -file => $fasta_in_1, -format => 'Fasta', ); my $seqio_in_2 = Bio::SeqIO->new( -file => $fasta_in_2, -format => 'Fasta', ); my $seqio_out = Bio::SeqIO->new( -file => $fasta_out, -format => 'Fasta', ); while ( my $seq_obj_1 = $seqio_in_1->next_seq() ) { my $seq_obj_2 = $seqio_in_2->next_seq(); $seqio_out->write_seq($seq_obj_1); $seqio_out->write_seq($seq_obj_2); } __END__ >qppq ATATATTTATTATTATATATATTATATTATTA >dfj TATTATTATTTTATAT >lsl ATTATTATTATTATTAGGAGGAG >ghg ATATATAT

    However, I'm not entirely sure of the best way to delimit the pairs with ============ using this approach.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1003136]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-11-22 16:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (123 votes), past polls