biopython: Bio.motifs : 'Motif' has no attribute 'parse'
1
1
Entering edit mode
8.7 years ago
John ▴ 10

Hi,

I am trying to parse MEME formatted motif using Bio.motifs object.

>>> list(Motif.parse(open("test.meme"),"MEME"))
...
AttributeError: type object 'Motif' has no attribute 'parse'

Does anyone know if there is a replacement function for this?

Thanks. J.

software error biopython • 2.0k views
ADD COMMENT
3
Entering edit mode
8.7 years ago

Looking at the docs, your usage looks off

>>> from Bio import motifs
>>> with open("Motif/alignace.out") as handle:
...     for m in motifs.parse(handle, "AlignAce"):
...         print(m.consensus)

So motifs, not Motif?

ADD COMMENT
0
Entering edit mode

Thank you Philipp. I used Motif because i imported the object as

from Bio.motifs import Motif

J.

ADD REPLY

Login before adding your answer.

Traffic: 1921 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