Skip to content

Commit 97e2566

Browse files
authored
Merge pull request #11 from cokelaer/dev
Use new rulegraph wrapper and graphviz apptainer
2 parents 42ca6d5 + 3ae26ba commit 97e2566

File tree

6 files changed

+51
-17
lines changed

6 files changed

+51
-17
lines changed

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ Changelog
132132
========= ====================================================================
133133
Version Description
134134
========= ====================================================================
135+
1.7.0 * Use new rulegraph wrapper and new graphviz apptainer
136+
1.6.2 * slight refactorisation to use rulegraph wrapper
135137
1.6.1 * pin sequana version to 1.4.4 to force usage of new fastqc module
136138
to fix falco. Updated config documentation.
137139
1.6.0 * Fixed falco output error and use singularity containers

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
sequana>=0.14.4
2-
sequana_pipetools>=0.9.1
2+
sequana_pipetools>=0.12.2

sequana_pipelines/fastqc/config.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,18 @@ input_pattern: '*fastq.gz'
1818
# in special cases, sample names can be extracted with a pattern
1919
#sample_pattern: '{sample}.fastq.gz'
2020

21+
22+
apptainers:
23+
falco: "https://zenodo.org/record/7014954/files/falco_1.0.0.img"
24+
fastqc: "https://zenodo.org/record/7923780/files/fastqc_0.12.1.img"
25+
graphviz: "https://zenodo.org/record/7928262/files/graphviz_7.0.5.img"
26+
27+
2128
##############################################################################
2229
# general section
2330
#
2431
# Choose one of the standard method to perform QC of your fastq data
2532
#
26-
# method_choice__ = ['fastqc', 'falco']
2733
general:
2834
method_choice: fastqc
2935

sequana_pipelines/fastqc/fastqc.rules

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ configfile: "config.yaml"
2727

2828
manager = PipelineManager("fastqc", config)
2929

30+
sequana_wrapper_branch = "main"
31+
3032
# This is just for information. Not used in the pipeline but only for HTML rpeort
3133
# do we have illumina paired data with tag _R1_ ?
3234
R1 = [1 for x in manager.samples.values() if "_R1_" in x.split("/")[-1]]
@@ -67,8 +69,10 @@ if 'general' in config and 'method_choice' in config['general'] and \
6769
METHOD = "falco"
6870

6971
rule falco:
70-
input: manager.getrawdata()
71-
output: "samples/{sample}/summary.txt"
72+
input:
73+
manager.getrawdata()
74+
output:
75+
"samples/{sample}/summary.txt"
7276
log:
7377
"samples/{sample}/falco.log"
7478
threads:
@@ -77,19 +81,21 @@ if 'general' in config and 'method_choice' in config['general'] and \
7781
options=config['falco']['options'],
7882
working_directory="samples/{sample}"
7983
container:
80-
"https://zenodo.org/record/7014954/files/falco_1.0.0.img"
84+
config['apptainers']['falco']
8185
resources:
8286
**config['falco']['resources']
8387
wrapper:
84-
"main/wrappers/falco"
88+
f"{sequana_wrapper_branch}/wrappers/falco"
8589
__multiqc__input = expand("samples/{sample}/summary.txt", sample=manager.samples)
8690

8791
else:
8892
METHOD = "fastqc"
8993

9094
rule fastqc:
91-
input: manager.getrawdata()
92-
output: "samples/{sample}/fastqc.done"
95+
input:
96+
manager.getrawdata()
97+
output:
98+
"samples/{sample}/fastqc.done"
9399
log:
94100
"samples/{sample}/fastqc.log"
95101
threads:
@@ -100,9 +106,9 @@ else:
100106
resources:
101107
**config['fastqc']['resources']
102108
container:
103-
"https://zenodo.org/record/7015004/files/fastqc_0.11.9-py3.img"
109+
config['apptainers']['fastqc']
104110
wrapper:
105-
"main/wrappers/fastqc"
111+
f"{sequana_wrapper_branch}/wrappers/fastqc"
106112
__multiqc__input = expand("samples/{sample}/fastqc.done", sample=manager.samples)
107113

108114

@@ -170,11 +176,28 @@ if config['multiqc']['do']:
170176
"main/wrappers/multiqc"
171177

172178

173-
# ====================================================================== rulegraph
174-
sequana_rulegraph_mapper = {}
175-
if config['multiqc']['do']:
176-
sequana_rulegraph_mapper["multiqc"] = "../multiqc/multiqc_report.html"
177-
include: sm.modules['rulegraph']
179+
# ====================================================================== rulegraph
180+
181+
rule rulegraph:
182+
input: str(manager.snakefile)
183+
output:
184+
svg = "rulegraph/rulegraph.dot"
185+
params:
186+
mapper = {"multiqc": "../multiqc/multiqc_report.html"} if config['multiqc']['do'] else {},
187+
configname = "config.yaml"
188+
wrapper:
189+
f"{sequana_wrapper_branch}/wrappers/rulegraph"
190+
191+
192+
rule dot2svg:
193+
input:
194+
"rulegraph/rulegraph.dot"
195+
output:
196+
".sequana/rulegraph.svg"
197+
container:
198+
config['apptainers']['graphviz']
199+
shell:
200+
"""dot -Tsvg {input} -o {output}"""
178201

179202

180203
rule plotting_and_stats:

sequana_pipelines/fastqc/schema.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ mapping:
2323
"resources":
2424
type: any
2525
required: true
26+
"apptainers":
27+
type: any
28+
2629

2730
"multiqc":
2831
type: map

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import subprocess
55

66
_MAJOR = 1
7-
_MINOR = 6
8-
_MICRO = 1
7+
_MINOR = 7
8+
_MICRO = 0
99
version = '%d.%d.%d' % (_MAJOR, _MINOR, _MICRO)
1010
release = '%d.%d' % (_MAJOR, _MINOR)
1111

0 commit comments

Comments
 (0)