Skip to content

Commit

Permalink
Merge pull request #7 from cokelaer/main
Browse files Browse the repository at this point in the history
update pipeline to use latest apptainers
  • Loading branch information
cokelaer authored May 22, 2023
2 parents 2da6b54 + 33c1f02 commit 1689f2d
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 13 deletions.
1 change: 0 additions & 1 deletion .github/workflows/apptainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ jobs:
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ on:
pull_request:
branches-ignore: []
schedule:
- cron: '0 0 * * SUN'
- cron: '0 0 2 * *'

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python: [3.7, 3.8, 3.9]
python: [3.8, 3.9, '3.10']
fail-fast: false


Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ Changelog
========= ====================================================================
Version Description
========= ====================================================================
1.0.0 * use graphviz apptainer and latest wrappers
0.13.0 * add final apptainers and update CI actions
0.12.0 * set singularity containers
0.11.1 * Fix config file (removing hard-coded path)
Expand Down
1 change: 1 addition & 0 deletions sequana_pipelines/ribofinder/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ apptainers:
pigz: "https://zenodo.org/record/7346805/files/pigz_2.4.0.img"
bedtools: "https://zenodo.org/record/7346774/files/bedtools_2.30.0.img"
samtools: "https://zenodo.org/record/7215278/files/samtools_1.15.0.img"
graphviz: "https://zenodo.org/record/7928262/files/graphviz_7.0.5.img"

#############################################################################
# bowtie1_mapping_rna used to align reads against ribosomal RNA
Expand Down
48 changes: 41 additions & 7 deletions sequana_pipelines/ribofinder/ribofinder.rules
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ from sequana.gff3 import GFF3
configfile: "config.yaml"

manager = PipelineManager("ribofinder", config)

sequana_wrapper_branch = "main"


rule pipeline:
Expand Down Expand Up @@ -135,7 +135,7 @@ rule bowtie1_indexing:
container:
config['apptainers']['sequana_ribofinder']
wrapper:
"main/wrappers/bowtie1/build"
f"{sequana_wrapper_branch}/wrappers/bowtie1/build"



Expand Down Expand Up @@ -177,7 +177,7 @@ rule bowtie1_mapping_rna:
container:
config['apptainers']['sequana_ribofinder']
wrapper:
"main/wrappers/bowtie1/align"
f"{sequana_wrapper_branch}/wrappers/bowtie1/align"


# ======================================================== Fix bowtie log
Expand Down Expand Up @@ -277,12 +277,46 @@ rule bam_indexing:
#
sequana_multiqc_input = expand("{sample}/bowtie1/{sample}.sorted.bam.bai", sample=sorted(manager.samples))
sequana_multiqc_input += ["logs/fix_bowtie1_log"]
include: sm.modules["multiqc/2.0"]


rule multiqc:
input:
sequana_multiqc_input
output:
"multiqc/multiqc_report.html"
params:
options=config['multiqc']['options'],
input_directory=config['multiqc']['input_directory'],
config_file=config['multiqc']['config_file'],
modules=config['multiqc']['modules']
log:
"multiqc/multiqc.log"
wrapper:
f"{sequana_wrapper_branch}/wrappers/multiqc"


# ========================================================== rulegraph
#
sequana_rulegraph_mapper = {"multiqc": "../multiqc/multiqc_report.html"}
include: sm.modules['rulegraph']
rule rulegraph:
input: str(manager.snakefile)
output:
svg = "rulegraph/rulegraph.dot"
params:
mapper = {"multiqc": "../multiqc/multiqc_report.html"},
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}"""




Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from setuptools.command.install import install
import subprocess

_MAJOR = 0
_MINOR = 13
_MAJOR = 1
_MINOR = 0
_MICRO = 0
version = '%d.%d.%d' % (_MAJOR, _MINOR, _MICRO)
release = '%d.%d' % (_MAJOR, _MINOR)
Expand All @@ -25,9 +25,9 @@
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Scientific/Engineering :: Bio-Informatics',
'Topic :: Scientific/Engineering :: Information Analysis',
Expand Down

0 comments on commit 1689f2d

Please sign in to comment.