Just as a reference, this is what the validation script is doing...
from pyhmmer.plan7 import HMMFile
import sys
with HMMFile(sys.argv[1]) as hmm_file:
for hmm_profile in hmm_file:
hmm_profile.validate(tolerance=0.0001)
Small update. I emailed the Eddy Lab because of this bug. Sean said they have addressed both issues and that the changes will appear in the next HMMER3 release.
According to the documentation "HMMER", "NAME", "LENG", "ALPH", "HMM" are mandatory tags in the header of hmm files but I found that:
It seems to me that this is an issue with the HMMER parser since this behaviour also arises when using the CLI, i.e.
hmmconvert ill_formated.hmm
.Here is the relevant code to reproduce the behavior (I'm using a MacbookPro with an Intel processor and MacOS Sonoma):
Create an environment
Download and unzip the attached hmm files and test script test_files_and_script.zip
Try validating the hmm files with the attached script
Just as a reference, this is what the validation script is doing...