biopython: Bio.motifs : 'Motif' has no attribute 'parse'
1
1
Entering edit mode
8.1 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 • 1.9k views
ADD COMMENT
3
Entering edit mode
8.1 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: 2492 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