我有这个代码
use warnings;
use Getopt::Long;
use Bio::SeqIO;
GetOptions("in=s" => \$file) or die("Error in command line arguments\n");
open $new3, ">", "sequences_tmp.tab";
$seqin = Bio::SeqIO->new(-file => $file, -format => "Fasta");
$seqout = Bio::SeqIO->new(-file => ">$new3", -format => "tab");
while ($seq = $seqin->next_seq()) {
$seqout->width($seq->length);
$obj = $seq->id ."\t".$seq->seq()."\n";
$seqout->write_seq($obj);
}
close $new3;
期望以这种方式打印序列seq_id TAB sequence
。但是,此代码打印一个空文件。你知道发生了什么事吗?