Skip to content

Commit 13e27dc

Browse files
authored
Merge pull request #4 from cokelaer/main
add subsampling, update graphviz/rulegraph
2 parents 3d33d90 + 9dfaaf8 commit 13e27dc

File tree

5 files changed

+42
-7
lines changed

5 files changed

+42
-7
lines changed

README.rst

+2
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,8 @@ Changelog
147147
========= ====================================================================
148148
Version Description
149149
========= ====================================================================
150+
1.1.0 * add subsample option and set to 1,000,000 reads to handle large
151+
runs such as promethion
150152
1.0.1 * CSV can now handle sample or samplename column name in samplesheet.
151153
* Fix the pyco file paths, update requirements and doc
152154
1.0.0 Stable release ready for production

sequana_pipelines/nanomerge/config.yaml

+11-2
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,20 @@ samplesheet: "samplesheet.csv"
2525
# by uncommenting and filling the field extra_prefixes_to_strip.
2626
#
2727
# For instance, if you have files called prefix.mess.A.fastq.gz and prefix.B.fastq.gz
28-
# 'prefix.' will be removed automatically because it is common, but not 'mess'.
28+
# 'prefix.' will be removed automatically because it is common, but not 'mess'.
2929
# use thoses prefixes in the left to right order ['prefix', 'mess'] or ['prefix.mess']
3030
#
3131
# extra_prefixes_to_strip: []
3232

3333
apptainers:
34-
pycoqc: https://zenodo.org/record/7746269/files/pycoqc_2.5.2.img
34+
pycoqc: "https://zenodo.org/record/7746269/files/pycoqc_2.5.2.img"
35+
graphviz: "https://zenodo.org/record/7928262/files/graphviz_7.0.5.img"
36+
37+
38+
###################################################################################
39+
#
40+
# subsample: If not None, N number of reads will be randomly selected instead of
41+
# the entire dataset
42+
pycoqc:
43+
subsample: 1000000
3544

sequana_pipelines/nanomerge/nanomerge.rules

+17-3
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,13 @@ if config["summary"]:
105105
"pyco/pyco.html"
106106
log:
107107
"pyco/pyco.log"
108+
params:
109+
sample=config["pycoqc"]["subsample"]
108110
container:
109111
config["apptainers"]["pycoqc"]
110112
shell:
111113
"""
112-
pycoQC --summary_file {input} -o {output} > {log} 2>&1
114+
pycoQC --summary_file {input} -o {output} --sample {params.sample} > {log} 2>&1
113115
"""
114116

115117

@@ -125,15 +127,27 @@ rule merge:
125127

126128

127129
rule rulegraph:
128-
input: str(manager.snakefile)
130+
input:
131+
workflow.snakefile
129132
output:
130-
svg = ".sequana/rulegraph.svg"
133+
"rulegraph/rulegraph.dot"
131134
params:
132135
configname = "config.yaml"
133136
wrapper:
134137
f"{sequana_wrapper_branch}/wrappers/rulegraph"
135138

136139

140+
rule dot2svg:
141+
input:
142+
"rulegraph/rulegraph.dot"
143+
output:
144+
".sequana/rulegraph.svg"
145+
container:
146+
config['apptainers']['graphviz']
147+
shell:
148+
"""dot -Tsvg {input} -o {output}"""
149+
150+
137151
rule html_report:
138152
input:
139153
list(expected_fastqs) + qc_file

sequana_pipelines/nanomerge/schema.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@ mapping:
2222
"apptainers":
2323
type: any
2424
required: true
25+
26+
"pycoqc":
27+
type: map
28+
mapping:
29+
"subsample":
30+
type: int
31+
required: False
32+
33+
34+

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111

1212
_MAJOR = 1
13-
_MINOR = 0
14-
_MICRO = 1
13+
_MINOR = 1
14+
_MICRO = 0
1515
version = f"{_MAJOR}.{_MINOR}.{_MICRO}"
1616
release = f"{_MAJOR}.{_MINOR}"
1717

0 commit comments

Comments
 (0)