Commit 408197ff authored by Maxime Manno's avatar Maxime Manno 🍜
Browse files

ONT - removed number of threads parameter for porechop

parent 02abb6e8
......@@ -31,7 +31,6 @@ class OntQualityCheck (NG6Workflow):
logging.getLogger("jflow").debug("Begin OntQualityCheck.define_parameters! ont_qc")
self.add_parameter("compression", "How should the data be compressed once archived", choices= [ "none", "gz", "bz2"], default = "gz")
self.add_parameter("trimming", "use trimming with porechop or not",choices= [ "yes", "no"], default = "no")
self.add_parameter("nb_threads", "Number of threads to use for porechop (default=16).", default=16)
self.add_parameter("fileformat", "The file format for porechop (default=fastq).", choices= [ "fastq", "fasta"], default = "fastq")
self.add_input_file( "summary_file", "Input summary basecalling file", default=None)
self.add_parameter("barcoded", "Barcoded run or not", choices= [ "yes", "no"], default = "no")
......@@ -54,7 +53,7 @@ class OntQualityCheck (NG6Workflow):
#nanoplot = self.add_component("Nanoplot", [sample.name,self.get_all_reads(), self.nb_threads, True, "png", self.nanoplot_color,"nanoplot.tar.gz"])
ontstat = self.add_component("Run_stats", [self.summary_file, self.barcoded])
if self.trimming == "yes":
trim_porechop = self.add_component("Trim_porechop", [self.get_all_reads(), self.nb_threads, self.fileformat , "discard_middle"])
trim_porechop = self.add_component("Trim_porechop", [self.get_all_reads(), self.fileformat , "discard_middle"])
if self.fast5dir != None:
fast5archive = self.add_component("Fast5archive", [self.fast5dir, "fast5archive.tar"])
......@@ -31,7 +31,6 @@ class Trim_porechop (Analysis):
def define_parameters(self, fastq_files, nbthreads, formatfile, discard_middle, archivename="porechop_archive.tar"):
self.add_input_file_list( "fastq_files", "fastq_files", default=fastq_files, required=True, file_format = 'fastq')
self.add_parameter("nbthreads", "number of threads to use (default=16)", default=16, type='int')
self.add_parameter("formatfile", "format of the input files", default="fastq", type='str')
self.add_parameter("discard_middle", "discard_middle", default="discard_middle", choices=[ "discard_middle", "do_not_discard_middle"])
self.add_parameter("archive_name", "Name of the archive", default=archivename, type='str')
......@@ -148,7 +147,7 @@ class Trim_porechop (Analysis):
# Create cmd
[cmd_inputs_pattern, next_arg_number] = get_argument_pattern(file_group, 0)
self.add_shell_execution(self.get_exec_path("porechop") +" " + self.options + " --input ${" + str(next_arg_number) + "} --output ${" + str(next_arg_number+1) + "} --format " + self.formatfile + " --threads " + str(self.nbthreads) + " > " +" ${" + str(next_arg_number+2) + "}",
self.add_shell_execution(self.get_exec_path("porechop") +" " + self.options + " -t 16 --input ${" + str(next_arg_number) + "} --output ${" + str(next_arg_number+1) + "} --format " + self.formatfile + " --threads " + str(self.nbthreads) + " > " +" ${" + str(next_arg_number+2) + "}",
cmd_format='{EXE} {IN} {OUT}' ,
map=False,
inputs = file_group,
......
Supports Markdown
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