I'm trying to add several mult-HMM files together but I haven't had much luck. First I tried to just cat them, then I realized that it won't work if there is an overlap of HMMs within the files. I then made a script that only concatenates unique ones but once I tried to use it, I get this Error: bad file format in HMM file.
I suspect it's because there are different fields for different files. For example, the first HMM in the first file has these fields:
HMMER3/f [3.1b2 | February 2015]
NAME Adenylsucc_synt
ACC PF00709.21
DESC Adenylosuccinate synthetase
LENG 419
ALPH amino
RF no
MM no
CONS yes
CS yes
MAP yes
DATE Sat Aug 4 15:42:20 2018
NSEQ 755
EFFN 2.301197
CKSUM 4189663105
GA 20.40 20.40
TC 20.40 20.40
NC 20.20 20.30
STATS LOCAL MSV -11.3493 0.69897
STATS LOCAL VITERBI -12.6105 0.69897
STATS LOCAL FORWARD -5.7752 0.69897
The first HMM of the second file has this:
# Freely distributed under the GNU General Public License (GPLv3).
HMMER3/f [3.1b1 | May 2013]
NAME EPrGT00050000000570
LENG 553
ALPH amino
RF no
MM no
CONS yes
CS no
MAP yes
DATE Thu Oct 13 16:48:58 2016
NSEQ 33
EFFN 1.816772
CKSUM 2711521311
STATS LOCAL MSV -11.9038 0.69756
STATS LOCAL VITERBI -12.5276 0.69756
STATS LOCAL FORWARD -6.3393 0.69756
I'm thinking that I can just propogate the NAME field for the ACC and DESC fields if they don't exist. However, I don't know what to do with the cutoffs (i.e. GA, TC, NC).
Does anyone know how I can merge these HMM files together?
1 answer
Most likely this doesn't work because at least some HMMs have been built with a different HMMer version than your hmmsearch. The two HMMs you showed are both HMMER3 models, but I suspect you may have some that are HMMER2.
One way to fix this is to convert them to your present HMMer version, which is described in this thread. After that you should be able to concatenate HMMs and proceed as you originally intended. It shouldn't matter that some HMMs have accessions and others don't, or that some have domain cutoffs. I don't think those fields are required, but will be used internally by hmmsearch if present.
Log in to answer this question.