Commit 3d9f0352 by Celine Mercier

obiclean parallelized

parent 9b4c3537
......@@ -59,6 +59,13 @@ def addOptions(parser):
default=False,
help="Adds tags for each sequence giving its cluster's head and weight for each sample.")
group.add_argument('--thread-count','-p', # TODO should probably be in a specific option group
action="store", dest="clean:thread-count",
metavar='<THREAD COUNT>',
default=-1,
type=int,
help="Number of threads to use for the computation. Default: the maximum available.")
def run(config):
......@@ -101,7 +108,7 @@ def run(config):
comments = View.print_config(config, "clean", command_line, input_dms_name=[i_dms_name], input_view_name=[i_view_name])
if obi_clean(tobytes(i_dms_name), tobytes(i_view_name), tobytes(config['clean']['sample-tag-name']), tobytes(o_view_name), comments, \
config['clean']['distance'], config['clean']['ratio'], config['clean']['heads-only'], -1) < 0:
config['clean']['distance'], config['clean']['ratio'], config['clean']['heads-only'], config['clean']['thread-count']) < 0:
raise Exception("Error running obiclean")
# If the input and output DMS are not the same, export result view to output DMS
......
......@@ -61,7 +61,8 @@
* @param max_ratio Maximum ratio between the counts of two sequences so that the less abundant one can be considered
* as a variant of the more abundant one.
* @param heads_only If true, only cluster heads are printed to the output view.
* @param thread_count Number of threads to use (Not available yet) TODO
* @param thread_count Number of threads to use. If the number given is -1 or is greater than the maximum number of
* threads available, the maximum number of threads is detected and used.
*
* @returns A value indicating the success of the operation.
* @retval 0 if the operation was successfully completed.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment