Closed eloyvallinaes closed 2 years ago
Hi @eloyvallinaes !
This is not a bug, it's just the way HMMER works internally. MSA from Stockholm format may not always contain a name for the whole alignment (a #=GF ID
line), and in that case the MSA
object returned by the MSAFile
will not have a name. However, the internal pyhmmer.plan7.Builder
requires that the MSA
has one.
I can add a disclaimer to Pipeline.search_msa
and other methods to make this clearer.
(It is a bug if your MSA file had an identifier for the whole MSA, though).
My MSA file didn't have a #=GF ID
line, so you're right it's not a bug. However, the #=GF ID
line is not a requirement of the stockholm format so I thought it was weird it was throwing an error. Not knowing what role the name attribute might be playing, I'd prefer MSAFile
be able to set the attribute with some generic value if one is not provided, but that's just my suggestion! :smile:
Thanks for a prompt reply!
I'd rather not set a default identifier for the MSA; in the case of hmmbuild
, it's always possible to use the basename of the alignment file to name the HMM, but since in pyHMMER the MSAFile
may be opened from a file-like object it's not as obvious was to use, and I'm sure having a fallback value would lead to more bugs later.
I have however added warnings to the Builder.build_msa
and Pipeline.search_msa
methods, as well as a section in the MSA to HMM example so hopefully this will be clearer to future users who get this kind of issue again.
Cool! Many thanks for the explanation too!
When trying to start a search with
pyhmmer.plan7.Pipeline.search_msa
I get the following error:After some digging, I realised the
pyhmmer.easel.MSA
object has aname
attribute that I could just fill with ab'placeholder'
, which makes the error go away. I suspect this attribute should've been set bypyhmmer.easel.MSAFile
which I am using to read an alignment in stockholm format.Is this a bug?