bs3
bs3 copied to clipboard
How to set the number of threads
Hi, I am running bs3-align.py and I am wondering if one can set the number of threads to use? Currently it seems that 2 SNAP threads are running. I could not find an option in the readme or option output of bs3-align.py.
Thanks for the help, Marcel
you can pass in -t option using --snap- to specify threads. i have not tried it myself yet.
Hi,
I actually tried to use the -t option with bs-align and not only it didn't work, but it kept using all the 32 cores of the server I was working on. After a look at the bs-align code I found out that the -t option is hardcoded in line 263 (single-end) and 413 (paired end). If you would like to change the number of threads you need to modify those numbers. Just for clarity, here's how line 263 looks:
aligner_command = './snap single %(reference_genome)s -fastq %(input_file)s -o -sam %(output_file)s -h 630 -d 20 -t 32 -b' + aligner_options_string()
If you would like to limit at 10 threads, you should modify as follows:
aligner_command = './snap single %(reference_genome)s -fastq %(input_file)s -o -sam %(output_file)s -h 630 -d 20 -t 10 -b' + aligner_options_string()
Hope that helps!