| |
Conversion by hand
>>> from Bio import SeqRecord
>>> writer = SeqRecord.io.make_writer(format = "fasta",
... outfile = open("sp.fasta", "w"))
>>> for record in SeqRecord.io.read("sprot38.dat"):
... writer.write(record)
...
.. a lot of output ...
>>>
use Bio::SeqIO;
$in = Bio::SeqIO->new(-file => "sprot38.dat" ,
'-format' => 'swiss');
$out = Bio::SeqIO->new(-file => ">sp.fasta" ,
'-format' => 'fasta');
while ( my $seq = $in->next_seq() ) {
$out->write_seq($seq);
}
|
|