perl脚本:读取fasta序列

#! /usr/bin/perl
use strict;
use warnings;
use Bio::SeqIO;

my $file=shift;

my $fa=Bio::SeqIO->new(-file=>$file,-format=>'fasta');

while(my $seq_obj=$fa->next_seq){
my $id=$seq_obj->id;
my $seq=$seq_obj->seq;
print ">$id\n$seq\n";
}
posted @ 2018-08-12 09:31  萃英山下  阅读(583)  评论(0)    收藏  举报