Skip to content

Commit

Permalink
version update
Browse files Browse the repository at this point in the history
  • Loading branch information
tdayris committed Dec 5, 2023
1 parent 8c3e7e4 commit 9f9c862
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 20 deletions.
1 change: 1 addition & 0 deletions .test/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ snakefiles := \
"../workflow/rules/multiqc.smk" \
"../workflow/rules/fastp.smk" \
"../workflow/rules/picard_metrics.smk" \
"../workflow/rules/samtools_stats.smk" \
"../workflow/rules/fair_genome_indexer_pipeline.smk" \
"../workflow/rules/common.smk" \
"../workflow/Snakefile"
Expand Down
12 changes: 6 additions & 6 deletions .test/report.html

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# 2.2.5

## Features:

* Update fair_genome_indexer to version 2.3.0
* Samtools stats added to report

## Fix:

* Report main page too large
* Fix error removing Bowtie2 QC from MultiQC report
* Fix error making fastp reports non reachable in MultiQC

# 2.2.4

Expand Down
1 change: 1 addition & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if config.get("load_fair_genome_indexer", True):

include: "rules/bowtie2_sambamba_meta.smk"
include: "rules/picard_metrics.smk"
include: "rules/samtools_stats.smk"
include: "rules/multiqc.smk"


Expand Down
26 changes: 15 additions & 11 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,12 @@ def get_multiqc_report_input(
Return (Dict[str, List[str]]):
Dictionnary of all input files as required by MultiQC's snakemake-wrapper
"""
results: Dict[str, List[str]] = {"picard_qc": [], "fastp": [], "bowtie2": []}
results: Dict[str, List[str]] = {
"picard_qc": [],
"fastp": [],
"bowtie2": [],
"samtools": [],
}
datatype: str = "dna"
sample_iterator = zip(
samples.sample_id,
Expand All @@ -275,18 +280,17 @@ def get_multiqc_report_input(
snakemake.io.Wildcards(fromdict={"sample": sample}), samples
)
if sample_data.get("downstream_file"):
results["fastp"].append(f"tmp/fastp/report_pe/{sample}.json")
results["fastp"].append(f"results/QC/report_pe/{sample}.html")
# results["fastp"].append(f"tmp/fastp/trimmed/{sample}.1.fastq")
# results["fastp"].append(f"tmp/fastp/trimmed/{sample}.2.fastq")
results["fastp"].append(f"tmp/fastp/report_pe/{sample}.fastp.json")
else:
results["fastp"].append(f"tmp/fastp/report_se/{sample}.json")
results["fastp"].append(f"results/QC/report_se/{sample}.html")
# results["fastp"].append(f"tmp/fastp/trimmed/{sample}.fastq")
results["fastp"].append(f"tmp/fastp/report_se/{sample}.fastp.json")

results[
"bowtie2"
] = f"logs/bowtie2/align/{species}.{build}.{release}.{datatype}/{sample}.log"
results["bowtie2"].append(
f"logs/bowtie2/align/{species}.{build}.{release}.{datatype}/{sample}.log"
)

results["samtools"].append(
f"tmp/samtools/{species}.{build}.{release}.{datatype}/{sample}.txt"
)

return results

Expand Down
2 changes: 1 addition & 1 deletion workflow/rules/fair_genome_indexer_pipeline.smk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module fair_genome_indexer:
snakefile:
github("tdayris/fair_genome_indexer", path="workflow/Snakefile", tag="2.2.0")
github("tdayris/fair_genome_indexer", path="workflow/Snakefile", tag="2.3.0")
config:
{"genomes": config["genomes"]}

Expand Down
4 changes: 2 additions & 2 deletions workflow/rules/fastp.smk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rule fastp_trimming_pair_ended:
caption="../report/fastp.rst",
category="Quality Controls",
),
json=temp("tmp/fastp/report_pe/{sample}.json"),
json=temp("tmp/fastp/report_pe/{sample}.fastp.json"),
log:
"logs/fastp/{sample}.log",
benchmark:
Expand All @@ -34,4 +34,4 @@ use rule fastp_trimming_pair_ended as fastp_trimming_single_ended with:
caption="../report/fastp.rst",
category="Quality Controls",
),
json=temp("tmp/fastp/report_se/{sample}.json"),
json=temp("tmp/fastp/report_se/{sample}.fastp.json"),
14 changes: 14 additions & 0 deletions workflow/rules/samtools_stats.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
rule samtools_stats:
input:
bam="results/{species}.{build}.{release}.{datatype}/Mapping/{sample}.bam",
bai="results/{species}.{build}.{release}.{datatype}/Mapping/{sample}.bam.bai",
output:
temp("tmp/samtools/{species}.{build}.{release}.{datatype}/{sample}.txt"),
log:
"logs/samtools/{species}.{build}.{release}.{datatype}/{sample}.log",
benchmark:
"benchmark/samtools/{species}.{build}.{release}.{datatype}/{sample}.tsv"
params:
extra="",
wrapper:
f"{snakemake_wrappers_version}/bio/samtools/stats"

0 comments on commit 9f9c862

Please sign in to comment.