HI to all, I have a file with lots of sequences but I want to extract sequences only with the keyword "FULL-LENGTH". I dont want sequences with keywords NON-FULL-LENGTH.I have a text file that has 8,000 sequences distributed in equal amount with these 2 keywords Can anybody suggest a perl program for this problem?
>isotig07104 FULL-LENGTH (BLAST)
GGTGAGTACTAAATTATaCGAAAGATTGAaGTCCAGTTATAGCTCTGCCT
ATAaTTAAAGCATGAATATCGTGAGTTCCTTCGTATGTGTTTACAGTTTC
>isotig07106 NON-FULL-LENGTH (BLAST)
TTAGCATATTCTAtCTTTTTtAGAcTAAGGAAaGATGGAAgTGtAaTtAA
aGAATTTGAaCCAAAAATTCATAGAtCTGTtATTAAGTCATGTGCTAAaT
Thank u raghul
"Hi to neilfws & all others Thanks for the response. I made-up the code, please correct it. Can you people suggest me tutorial links or textbooks for Bioperl.
!/usr/bin/perl -w
use strict;
use Bio::SeqIO;
my $seqin = Bio::SeqIO->new(-file => "euplotes.txt", -format => "fasta");
my $seqout = Bio::SeqIO->new(-file => ">outfile.txt", -format => "fasta");
while(my $seq = $seqin->next_seq)
{
if($seq->desc) =~/^FULL-LENGTH\s+/ {
$seqout->write_seq($seq);
}
}
".
Hi to neilfws & all others Thanks for the response. I made-up the code, please correct it. Can you people suggest me tutorial links or textbooks on Bioperl.
!/usr/bin/perl -w
use strict; use Bio::SeqIO;
my $seqin = Bio::SeqIO->new(-file => "euplotes.txt", -format => "fasta"); my $seqout = Bio::SeqIO->new(-file => ">outfile.txt", -format => "fasta"); while(my $seq = $seqin->next_seq) { if($seq->desc) =~/^FULL-LENGTHs+/ { $seqout->write_seq($seq); } }
Your code looks fine. As for Bioperl, everything you need is right there on the website - http://www.bioperl.org/wiki/Main_Page. Link to tutorials - http://www.bioperl.org/wiki/Tutorials.