Skip to content

Commit

Permalink
Update summary, pin sequana to use new plots
Browse files Browse the repository at this point in the history
  • Loading branch information
cokelaer committed Aug 19, 2024
1 parent e8da918 commit 5c1e016
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ Changelog
========= ====================================================================
Version Description
========= ====================================================================
0.19.4 * Fix regression due to new sequana version
*
0.20.0 * Fix regression due to new sequana version
* Update summary html to use new sequana plots
0.19.3 * fix regression with click to set the default rRNA to 'rRNA' again.
0.19.2 * fix bowtie1 regression in the log file, paired end case in
multiqc and rnadiff script (regression)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "sequana-rnaseq"
version = "0.19.4"
version = "0.20.0"
description = "A RNAseq pipeline from raw reads to feature counts"
authors = ["Sequana Team"]
license = "BSD-3"
Expand Down Expand Up @@ -34,7 +34,7 @@ packages = [

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
sequana = ">=0.17.2"
sequana = ">=0.17.3"
sequana_pipetools = ">=1.0.2"
click-completion = "^0.5.2"
pulp = "<2.8.0"
Expand Down
18 changes: 6 additions & 12 deletions sequana_pipelines/rnaseq/rnaseq.rules
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,7 @@ else:
#
if int(config['bowtie1_mapping_rna']['nreads']) != -1:
extra = int(config['bowtie1_mapping_rna']['nreads']) * 4
config['bowtie1_mapping_rna']['nreads'] -= extra

config['bowtie1_mapping_rna']['nreads'] = extra

rule sample_rRNA:
input:
Expand Down Expand Up @@ -1159,14 +1158,9 @@ onsuccess:
intro += """<h2>Mapping rate</h2>"""
if config['general']['aligner'] == "bowtie2":
from sequana.multiqc.plots import Bowtie2
if not manager.paired:
filename = "multiqc/multiqc_data/mqc_bowtie2_se_plot_1.txt"
if not os.path.exists(filename):
filename = "multiqc/multiqc_report_data/mqc_bowtie2_se_plot_1.txt"
else:
filename = "multiqc/multiqc_data/mqc_bowtie2_pe_plot_1.txt"
if not os.path.exists(filename):
filename = "multiqc/multiqc_report_data/mqc_bowtie2_pe_plot_1.txt"
filename = "multiqc/multiqc_data/multiqc_bowtie2.txt"
if not os.path.exists(filename):
filename = "multiqc/multiqc_report_data/multiqc_bowtie2.txt"
br = Bowtie2(filename)
fig = br.plot(html_code=True)
from plotly import offline
Expand All @@ -1185,9 +1179,9 @@ onsuccess:
try:
from sequana.multiqc.plots import FeatureCounts
intro += """<h2>Annotation rate</h2>"""
filename = "multiqc/multiqc_report_data/mqc_featureCounts_assignment_plot_1.txt"
filename = "multiqc/multiqc_report_data/multiqc_featureCounts.txt"
if not os.path.exists(filename):
filename = "multiqc/multiqc_data/mqc_featureCounts_assignment_plot_1.txt"
filename = "multiqc/multiqc_data/multiqc_featureCounts.txt"

br = FeatureCounts(filename)
fig = br.plot(html_code=True)
Expand Down
2 changes: 1 addition & 1 deletion sequana_pipelines/rnaseq/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ mapping:
"nreads":
type: int
required: True
range: { min: -1}
range: { min: -1, max: 1e15}

'igvtools':
type: map
Expand Down
4 changes: 2 additions & 2 deletions test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def test_full():
with tempfile.TemporaryDirectory() as directory:
wk = directory

cmd = f"sequana_rnaseq --input-directory {sharedir} --genome-directory {saccer3} --aligner-choice bowtie2 --working-directory {wk} --force"
cmd = f"sequana_rnaseq --input-directory {sharedir} --genome-directory {saccer3} --aligner-choice bowtie2 --working-directory {wk} --force --rRNA-feature rRNA_gene"
subprocess.call(cmd.split())

cmd = "snakemake -s rnaseq.rules --wrapper-prefix https://raw.githubusercontent.com/sequana/sequana-wrappers/ -p --cores 2 "
Expand All @@ -182,7 +182,7 @@ def test_full_star():
with tempfile.TemporaryDirectory() as directory:
wk = directory

cmd = f"sequana_rnaseq --input-directory {sharedir} --genome-directory {saccer3} --aligner-choice star --working-directory {wk} --force"
cmd = f"sequana_rnaseq --input-directory {sharedir} --genome-directory {saccer3} --aligner-choice star --working-directory {wk} --force --rRNA-feature rRNA_gene"
subprocess.call(cmd.split())

cmd = "snakemake -s rnaseq.rules --wrapper-prefix https://raw.githubusercontent.com/sequana/sequana-wrappers/ -p --cores 2 "
Expand Down

0 comments on commit 5c1e016

Please sign in to comment.