You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm probably missing something obvious, but I can't seem to figure out how to use pyhmmer to search against a database of HMM profiles, it Pfam. When I try to read the file, it does not seem to iterate over the individual profiles.
Loading sequences you can do this, which create a list of the digitized sequences in
with pyhmmer.easel.SequenceFile('inputfile.fasta', digital=True, alphabet=alphabet) as seq_file:
sequences = list(seq_file)
I naively assumed that the HMMFile would do the same?
with pyhmmer.plan7.HMMFile('/path/to/Pfam-A.hmm') as hmm_file:
hmm = list(hmm_file.read())
This errors out with TypeError: 'pyhmmer.plan7.HMM' object is not an iterator.
If I just run this:
with pyhmmer.plan7.HMMFile('/path/to/Pfam-A.hmm') as hmm_file:
hmm = hmm_file.read()
Then it is just the single HMM profile (the first one in the Pfam database 1-cysPrx_C). So what am I doing wrong?
The text was updated successfully, but these errors were encountered:
But what you end up doing in your second comment is even better, because it will stream the HMMs as they are read from the file, instead of pre-loading them all in a list (which, for a HMM database like Pfam, can load a lot of things in memory),
I'm probably missing something obvious, but I can't seem to figure out how to use pyhmmer to search against a database of HMM profiles, it Pfam. When I try to read the file, it does not seem to iterate over the individual profiles.
Loading sequences you can do this, which create a list of the digitized sequences in
I naively assumed that the HMMFile would do the same?
This errors out with
TypeError: 'pyhmmer.plan7.HMM' object is not an iterator
.If I just run this:
Then it is just the single HMM profile (the first one in the Pfam database 1-cysPrx_C). So what am I doing wrong?
The text was updated successfully, but these errors were encountered: