Fasta Module In Biopython-Python, Again
1
1
Entering edit mode
12.2 years ago
Jovana ▴ 10

Hello, I have a similar question regarding Fasta module in Biopython. I am using disembl predictor Disembl.py) for protein disorder and I have a mistake ImportError: cannot import name Fasta. I read an answer in "Fasta module in Python/Biopython" record - to change Fasta with SeqIO but since I don't know Python, I didn't succeed to change the script. The problem is in the following two lines:

parser = Fasta.RecordParser()
iterator = Fasta.Iterator(db,parser)

which functions should I use instead?

and later, in line:

cur_record = iterator.next()

what to use instead of this? I tried to do the same as in suggested in "Fasta module in Python/Biopython" () but it works only once..

biopython fasta • 3.6k views
ADD COMMENT
6
Entering edit mode
12.2 years ago

Here is an updated version of DisEMBL.py using SeqIO:

https://gist.github.com/1675927

The original version is available from:

http://dis.embl.de/

ADD COMMENT
1
Entering edit mode

Nice, just what I was looking for, thanks and +1. Thought I'd point out a typo in the gist I just downloaded, line 152 sys.stdout.write('> '+cur_record.id'_COILS ') should be sys.stdout.write('> '+cur_record.id+'_COILS ') (notice the + before '_COILS), otherwise you get a SyntaxError: invalid syntax error..

ADD REPLY

Login before adding your answer.

Traffic: 2438 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6