Commit 12b34f10 by Riccardo Vicedomini

set threads to 1 for hmmsearch, removed old commented code

parent 17622dc1
......@@ -75,7 +75,7 @@ def main():
'--noali',
'-T', HMMER_VAL_T,
'--domE', HMMER_VAL_DOME,
#'--cpu', HMMER_VAL_CPU,
'--cpu', HMMER_VAL_CPU,
'--domtblout', f'{temp_dir}/{args[ACC_ID]}.ccms.domtblout',
args[CCMS_PATH], args[FASTA_PATH] ]
hmmsearch_cmd = ' '.join(hmmsearch_args)
......@@ -84,8 +84,6 @@ def main():
if hmmsearch != 0: # hmmsearch did not run successfully
eprint(f'[{script_name}] error running: {hmmsearch_cmd}')
return 2
#hmmsearch = subprocess.Popen(hmmsearch_args, stdout=DEVNULL) # stdout=subprocess.PIPE)
#hmmsearch.wait()
modTax = {}
with open(args[MODLIST_PATH],'r') as listFile:
......
......@@ -12,6 +12,7 @@ script_name = os.path.splitext( os.path.basename(__file__) )[0]
HMMER_PROG = "hmmsearch"
HMMER_VAL_T = "0" # -T
HMMER_VAL_DOME = "1" # -domE
HMMER_VAL_CPU = "1" # --cpu
PROTEIN_ID = 'HMMer-3'
TAXON = 'ALL'
......@@ -75,7 +76,7 @@ def main():
'--noali',
'-T', HMMER_VAL_T,
'--domE', HMMER_VAL_DOME,
#'-o', '{path}/{outprefix}.out'.format(path=temp_dir,outprefix=args[ACC_ID]),
'--cpu', HMMER_VAL_CPU,
'--domtblout', f'{temp_dir}/{args[ACC_ID]}.domtblout',
args[HMM_PATH], args[FASTA_PATH] ]
hmmsearch_cmd = ' '.join(hmmsearch_args)
......@@ -85,13 +86,6 @@ def main():
eprint(f'[{script_name}] error running: {hmmsearch_cmd}')
return 1
# compute HMMs alignment identities
#percentIden = {}
#with open('{path}/{outprefix}.out'.format(path=temp_dir,outprefix=args[ACC_ID]), 'r') as resAlignFile:
# iterHMMRes = hmmer_align_iter(resAlignFile)
# for seq,start,end,countPos in iterHMMRes:
# percentIden["{0}_{1}_{2}".format(seq,int(start),int(end))] = countPos
# write result files
with open(f'{results_dir}/{args[ACC_ID]}.hmm.res','w') as outFile, open(f'{temp_dir}/{args[ACC_ID]}.domtblout','r') as resFile:
for line in resFile:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment