我有一个带有不同标题的fasta文件,像这样..
>Ar000001
>Ar000002
>Ar000003
等等..现在我想把名字改成这样
>Ar000001 => >Bra000001
>Ar000002 => >Bra000002
>Ar000003 => >Bra000003
等等.. 我写了一个 perl 脚本来做到这一点,但它不输出任何东西。我做错了什么。
open(INFILE, "test.fasta") or die "Error opening input file";
open(OUTFILE, ">", "test_out.fasta") or die "Error creating output file";
my $count = 1;
while (my @line = <INFILE>)
{
if (my $line[$count] =~ /^>/)
{
print OUTFILE ">Bra%.5d\n", $count;
$count ++;
}
}
除了更改 fasta 标头名称并输出到新文件之外,我如何在每个 fasta 标头下也包含序列。在此先感谢.... Upendra