GreyGuoweiChen/VirBot

Number of threads/cpus

Closed this issue · 4 comments

Hi, I was wondering if there is a way to set the maximum number of available cpus, because I might want to run it in parallel with other tools on the same machine? Or does VirBot just use whatever is available?

Hello,
The program requiring multi-thread in VirBot is HMMer and DIAMOND. We set the default cpus number as 112, which means the program will try to use the maximum number. If you would like to modify it, we recommend you to adjust the following parameter.
363 subprocess.run(f"hmmsearch --tblout {temp_dir}/VB_hmmer.out --noali -E 0.001 --cpu 112 {VirBot_path}/ref/VirBot.hmm {temp_dir}/protein.faa",
and

369       subprocess.run(f"diamond blastp --db {VirBot_path}/ref/VirBot.dmnd --query {temp_dir}/protein.faa "
                       f"--outfmt 6 --max-target-seqs 1 --threads 112 "
                       f"--evalue 1e-5 --out {temp_dir}/VB_diamond.out", shell=True, stdout=FNULL, 

The --cpu in 363 line and --threads in 369 line are the parameters that you would like to adjust. Hope you work well with VirBot.

Okay, thanks! Are the hmmsearch and diamond processes run in parallel or sequentially?

Sequentially.

We will soon release a edition that allow you set the cpu number in the parameter panel.

Thanks,
Guowei

Awesome, thank you!