晚上好,我有一个 bioperl 代码来计算 fasta 文件中的序列数,但我正在尝试修改代码以计算任何给定 fasta 文件中短于 20 和长于 120 的序列。代码如下
use strict;
use Bio::SeqIO;
my $seqfile = 'sequences.fa';
my $in = Bio::SeqIO->new
(
-format => 'fasta',
-file => $seqfile
) ;
my $count = 0;
while (my $seq = $in->next_seq)
{
$count++;
}
print "There are $count sequences\n";