@@ -149,13 +149,14 @@ def run_build_ali(ref, seq, pocket, outdir, pid, log):
149
149
150
150
return ret
151
151
152
- def modeling (job_file , outdir , threads ):
152
+ def modeling (job_file , outdir , threads , n ):
153
153
"""Prepares data and execute in parallel the run_modeling function
154
154
155
155
Args:
156
156
job (pathlib.Path): Path of file containing the list of inputs
157
157
outdir (pathlib.Path): Path to the output directory
158
158
threads (int): Number of parallel jobs
159
+ n (int): number of target models generated by MODELLER
159
160
160
161
Returns:
161
162
ret (subprocess.CompletedProcess): The completed process
@@ -176,7 +177,7 @@ def modeling(job_file, outdir, threads):
176
177
job_list = []
177
178
with open (job_file , "r" ) as f :
178
179
for line in f :
179
- job_list .append (f"python3 { src_path } -a { line .strip ()} -o { model_dir } " )
180
+ job_list .append (f"python3 { src_path } -a { line .strip ()} -o { model_dir } -n { n } " )
180
181
181
182
with multiprocessing .Pool (processes = threads ) as pool :
182
183
ret = set (pool .map (run_modeling , job_list ))
@@ -387,6 +388,8 @@ def run_usalign(job, usalign, log):
387
388
help = "percent identity cutoff between target and "
388
389
"reference to build a model of the target, only "
389
390
"used with -s, --seqs [default: 30.0]" )
391
+ targts_opt .add_argument ("-n" , "--nb-models" , type = int , default = 2 , metavar = "" ,
392
+ help = "number of target models generated by MODELLER" )
390
393
dbscan_opt = parser .add_argument_group ("Clustering options" )
391
394
dbscan_opt .add_argument ("-e" , "--eps" , type = str , metavar = "" , default = "auto" ,
392
395
help = "maximum distance between two samples for them"
@@ -545,7 +548,7 @@ def run_usalign(job, usalign, log):
545
548
sys .exit (1 )
546
549
else :
547
550
start_model = datetime .datetime .now ()
548
- ret_model = modeling (job_file , outdir , args .threads )
551
+ ret_model = modeling (job_file , outdir , args .threads , args . nb_models )
549
552
logging .info ("modeling duration: "
550
553
f"{ datetime .datetime .now () - start_model } " )
551
554
0 commit comments