brineylab / abstar

VDJ assignment and antibody sequence annotation. Scalable from a single sequence to billions of sequences.
MIT License
41 stars 17 forks source link

set number of threads used #80

Closed Tjitskedv closed 4 years ago

Tjitskedv commented 5 years ago

dear Abstar developers,

We have read the article and are now trying to use abstar, we are wondering if there is an option to limit the number of cores/processes/threads abstar uses. We know there is an option to alter the chunksize but this doesn't seem the best solution. We didn't see it in the argument list, but we hope there is a possibility to limit the number of threads used.

kind regards Tjitske

briney commented 4 years ago

Just pushed a commit to the development branch that includes a new runtime option: -N or --num-cores, which allows you to set the max number of processes.

Tjitskedv commented 4 years ago

Thanks for this great update - we did work with the old version till now -but installed the development version today - noticed a minor bug in the development code.

parser.add_argument('-N', 'num-cores', dest='num_cores', default=0, type=int, help="Number of cores used by abstar. Default is 0, which uses \ all available cores.")

should be with 2 dashes before num-cores:

parser.add_argument('-N', '--num-cores', dest='num_cores', default=0, type=int, help="Number of cores used by abstar. Default is 0, which uses \ all available cores.")