diff --git a/README.rst b/README.rst index 1093a4d..d484c59 100644 --- a/README.rst +++ b/README.rst @@ -132,6 +132,8 @@ Changelog ========= ==================================================================== Version Description ========= ==================================================================== +1.7.0 * Use new rulegraph wrapper and new graphviz apptainer +1.6.2 * slight refactorisation to use rulegraph wrapper 1.6.1 * pin sequana version to 1.4.4 to force usage of new fastqc module to fix falco. Updated config documentation. 1.6.0 * Fixed falco output error and use singularity containers diff --git a/requirements.txt b/requirements.txt index aa0c216..a4259fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ sequana>=0.14.4 -sequana_pipetools>=0.9.1 +sequana_pipetools>=0.12.2 diff --git a/sequana_pipelines/fastqc/config.yaml b/sequana_pipelines/fastqc/config.yaml index f04e3d7..1bd8ed8 100644 --- a/sequana_pipelines/fastqc/config.yaml +++ b/sequana_pipelines/fastqc/config.yaml @@ -18,12 +18,18 @@ input_pattern: '*fastq.gz' # in special cases, sample names can be extracted with a pattern #sample_pattern: '{sample}.fastq.gz' + +apptainers: + falco: "https://zenodo.org/record/7014954/files/falco_1.0.0.img" + fastqc: "https://zenodo.org/record/7923780/files/fastqc_0.12.1.img" + graphviz: "https://zenodo.org/record/7928262/files/graphviz_7.0.5.img" + + ############################################################################## # general section # # Choose one of the standard method to perform QC of your fastq data # -# method_choice__ = ['fastqc', 'falco'] general: method_choice: fastqc diff --git a/sequana_pipelines/fastqc/fastqc.rules b/sequana_pipelines/fastqc/fastqc.rules index 341de3d..f2b7467 100644 --- a/sequana_pipelines/fastqc/fastqc.rules +++ b/sequana_pipelines/fastqc/fastqc.rules @@ -27,6 +27,8 @@ configfile: "config.yaml" manager = PipelineManager("fastqc", config) +sequana_wrapper_branch = "main" + # This is just for information. Not used in the pipeline but only for HTML rpeort # do we have illumina paired data with tag _R1_ ? 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 \ METHOD = "falco" rule falco: - input: manager.getrawdata() - output: "samples/{sample}/summary.txt" + input: + manager.getrawdata() + output: + "samples/{sample}/summary.txt" log: "samples/{sample}/falco.log" threads: @@ -77,19 +81,21 @@ if 'general' in config and 'method_choice' in config['general'] and \ options=config['falco']['options'], working_directory="samples/{sample}" container: - "https://zenodo.org/record/7014954/files/falco_1.0.0.img" + config['apptainers']['falco'] resources: **config['falco']['resources'] wrapper: - "main/wrappers/falco" + f"{sequana_wrapper_branch}/wrappers/falco" __multiqc__input = expand("samples/{sample}/summary.txt", sample=manager.samples) else: METHOD = "fastqc" rule fastqc: - input: manager.getrawdata() - output: "samples/{sample}/fastqc.done" + input: + manager.getrawdata() + output: + "samples/{sample}/fastqc.done" log: "samples/{sample}/fastqc.log" threads: @@ -100,9 +106,9 @@ else: resources: **config['fastqc']['resources'] container: - "https://zenodo.org/record/7015004/files/fastqc_0.11.9-py3.img" + config['apptainers']['fastqc'] wrapper: - "main/wrappers/fastqc" + f"{sequana_wrapper_branch}/wrappers/fastqc" __multiqc__input = expand("samples/{sample}/fastqc.done", sample=manager.samples) @@ -170,11 +176,28 @@ if config['multiqc']['do']: "main/wrappers/multiqc" -# ====================================================================== rulegraph -sequana_rulegraph_mapper = {} -if config['multiqc']['do']: - sequana_rulegraph_mapper["multiqc"] = "../multiqc/multiqc_report.html" -include: sm.modules['rulegraph'] +# ====================================================================== rulegraph + +rule rulegraph: + input: str(manager.snakefile) + output: + svg = "rulegraph/rulegraph.dot" + params: + mapper = {"multiqc": "../multiqc/multiqc_report.html"} if config['multiqc']['do'] else {}, + configname = "config.yaml" + wrapper: + f"{sequana_wrapper_branch}/wrappers/rulegraph" + + +rule dot2svg: + input: + "rulegraph/rulegraph.dot" + output: + ".sequana/rulegraph.svg" + container: + config['apptainers']['graphviz'] + shell: + """dot -Tsvg {input} -o {output}""" rule plotting_and_stats: diff --git a/sequana_pipelines/fastqc/schema.yaml b/sequana_pipelines/fastqc/schema.yaml index 49013a8..31251ef 100644 --- a/sequana_pipelines/fastqc/schema.yaml +++ b/sequana_pipelines/fastqc/schema.yaml @@ -23,6 +23,9 @@ mapping: "resources": type: any required: true + "apptainers": + type: any + "multiqc": type: map diff --git a/setup.py b/setup.py index 821e9a9..6bacacd 100644 --- a/setup.py +++ b/setup.py @@ -4,8 +4,8 @@ import subprocess _MAJOR = 1 -_MINOR = 6 -_MICRO = 1 +_MINOR = 7 +_MICRO = 0 version = '%d.%d.%d' % (_MAJOR, _MINOR, _MICRO) release = '%d.%d' % (_MAJOR, _MINOR)