Skip to content

Commit a8247e7

Browse files
committed
set Diamond load threads parameter
1 parent 10fcb6d commit a8247e7

6 files changed

Lines changed: 6 additions & 0 deletions

File tree

bakta/expert/protein_sequences.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def search(cdss: Sequence[dict], cds_fasta_path: Path, expert_system: str, db_pa
2828
'--max-target-seqs', '1', # single best output
2929
'--outfmt', '6', 'qseqid', 'sseqid', 'qlen', 'slen', 'length', 'pident', 'evalue', 'bitscore', 'stitle',
3030
'--threads', str(cfg.threads),
31+
'--load-threads', str(min(cfg.threads, 8)), # limit load threads to max 8
3132
'--tmpdir', str(cfg.tmp_path), # use tmp folder
3233
'--block-size', '4', # increase block size for faster executions
3334
'--index-chunks', '1', # set index chunks to 1 for faster executions

bakta/features/cds.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ def predict_pseudo_candidates(hypotheticals: Sequence[dict]) -> Sequence[dict]:
600600
'--max-target-seqs', '1', # single best output
601601
'--outfmt', '6', 'qseqid', 'sseqid', 'qlen', 'slen', 'length', 'pident', 'evalue', 'bitscore', 'qstart', 'qend', 'sstart', 'send', 'full_sseq',
602602
'--threads', str(cfg.threads),
603+
'--load-threads', str(min(cfg.threads, 8)), # limit load threads to max 8
603604
'--tmpdir', str(cfg.tmp_path),
604605
'--block-size', '3', # slightly increase block size for faster executions
605606
'--fast'

bakta/features/s_orf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ def search(sorfs: Sequence[dict], cluster_type: str):
331331
'--evalue', '1',
332332
'--outfmt', '6', 'qseqid', 'sseqid', 'qlen', 'slen', 'length', 'pident', 'evalue', 'bitscore',
333333
'--threads', str(cfg.threads),
334+
'--load-threads', str(min(cfg.threads, 8)), # limit load threads to max 8
334335
'--tmpdir', str(cfg.tmp_path), # use tmp folder
335336
'--block-size', '3', # slightly increase block size for faster executions
336337
'--ultra-sensitive',

bakta/psc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def search(cdss: Sequence[dict]) -> Tuple[Sequence[dict], Sequence[dict], Sequen
4545
'--max-target-seqs', '1', # single best output
4646
'--outfmt', '6', 'qseqid', 'sseqid', 'qlen', 'slen', 'length', 'pident', 'evalue', 'bitscore',
4747
'--threads', str(cfg.threads),
48+
'--load-threads', str(min(cfg.threads, 8)), # limit load threads to max 8
4849
'--tmpdir', str(cfg.tmp_path), # use tmp folder
4950
'--block-size', '3', # slightly increase block size for faster executions
5051
'--fast'

bakta/pscc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def search(cdss: Sequence[dict]) -> Tuple[Sequence[dict], Sequence[dict], Sequen
3838
'--max-target-seqs', '1', # single best output
3939
'--outfmt', '6', 'qseqid', 'sseqid', 'qlen', 'slen', 'length', 'pident', 'evalue', 'bitscore',
4040
'--threads', str(cfg.threads),
41+
'--load-threads', str(min(cfg.threads, 8)), # limit load threads to max 8
4142
'--tmpdir', str(cfg.tmp_path), # use tmp folder
4243
'--block-size', '3', # slightly increase block size for faster executions
4344
'--fast'

db-scripts/diamond.nf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ process diamond {
4646
--max-target-seqs 1 \
4747
-b4 \
4848
--threads ${task.cpus} \
49+
--load-threads ${task.cpus} \
4950
--out diamond.tsv \
5051
--outfmt 6 qseqid sseqid stitle length pident qlen slen evalue \
5152
--fast

0 commit comments

Comments
 (0)