Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
58459b80
Commit
58459b80
authored
Feb 11, 2019
by
Maxime Manno
🍜
Browse files
Merge branch 'nG6_ont-qc_bug-and-visu' into 'master'
N g6 ont qc bug and visu See merge request
!21
parents
7296e534
408197ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
workflows/ont_qc/__init__.py
View file @
58459b80
...
...
@@ -30,7 +30,7 @@ class OntQualityCheck (NG6Workflow):
def
define_parameters
(
self
,
function
=
"process"
):
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
(
"
nb_threads"
,
"Number of threads to use for porechop (default=16)."
,
default
=
16
)
self
.
add_parameter
(
"
trimming"
,
"use trimming with porechop or not"
,
choices
=
[
"yes"
,
"no"
]
,
default
=
"no"
)
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"
)
...
...
@@ -52,7 +52,8 @@ class OntQualityCheck (NG6Workflow):
addrawfiles
=
self
.
add_component
(
"AddRawFiles"
,
[
self
.
runobj
,
self
.
get_all_reads
(),
self
.
compression
])
#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
])
trim_porechop
=
self
.
add_component
(
"Trim_porechop"
,
[
self
.
get_all_reads
(),
self
.
nb_threads
,
self
.
fileformat
,
"discard_middle"
])
if
self
.
trimming
==
"yes"
:
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"
])
workflows/ont_qc/components/trimporechop.py
View file @
58459b80
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment