[BioPython] Sequence from Fasta
Stefanie Lück
lueck at ipk-gatersleben.de
Mon Jun 30 09:09:53 UTC 2008
Hi Peter!
I mean the biopython tutorial (16.3.2007), page 10:
>>>
from Bio import SeqIO
handle = open("ls_orchid.fasta")
for seq_record in SeqIO.parse(handle, "fasta") :
print seq_record.id
print seq_record.seq
print len(seq_record.seq)
handle.close()
<<<
I tried your code but I still have the same problem. It's don't show the
full sequence.
Output:
1 Seq('atgctcgatgcgcgctcgcgtccgtcgCAGGAgGAGATGGGGAGGCGCCGCCGGTTCACG ...',
SingleLetterAlphabet())
2 Seq('AGAAAAATCCGGAATCAGAGGAGGAGGAGGAGTCTCGCGAGGAGGATAGCACGGAGGCGG ...',
SingleLetterAlphabet())
Fasta File looks like this:
>1
atgctcgatgcgcgctcgcgtccgtcgCAGGAgGAGATGGGGAGGCGCCGCCGGTTCACGCATCAGCCCACCAGCGACGACGACGACGAGGAAGACAGAGCCGcCC
>2
AGAAAAATCCGGAATCAGAGGAGGAGGAGGAGTCTCGCGAGGAGGATAGCACGGAGGCGGTACCCGTCGGTGAACCTTT
I can try with regular expressions but I first wanted to know whether there
is a way in biopyhton.
Regards
Stefanie
More information about the Biopython
mailing list