fastaToGenbank_2.pl

#!/usr/local/bin/perl -w

# Use BioPerl to convert between sequence formats
# Sequence formats to choose: Fasta, EMBL. GenBank, Swissprot, PIR and GCG
# WI Biocomputing course - Unix and Programming Skills for Biologists - March 2003

use Bio::SeqIO;

$inFile = "BMP7.tfa";

$in  = Bio::SeqIO->newFh('-file' => "$inFile" ,
                           '-format' => 'Fasta');
$out = Bio::SeqIO->newFh('-format' => 'Genbank');
print $out $_ while <$in>;