Skip to content

Commit

Permalink
Merge pull request #4 from cokelaer/main
Browse files Browse the repository at this point in the history
add apptainer CI
  • Loading branch information
cokelaer committed May 22, 2023
2 parents 9fa9f61 + 3434147 commit a1064de
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 20 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/apptainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Apptainer Run

on:
push:
branches:
- main
- dev
pull_request:
branches-ignore: []
schedule:
- cron: '0 0 1 * *'

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


steps:

- name: precleanup
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: install graphviz
run: |
sudo apt update
sudo apt-get install -y graphviz software-properties-common
sudo add-apt-repository -y ppa:apptainer/ppa
sudo apt update
sudo apt install -y apptainer
- name: checkout git repo
uses: actions/checkout@v3

- name: Set up Python 3.X
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}

- name: Install dependencies
run: |
pip install .[testing]
- name: install package itself
run: |
pip install .
- name: testing
run: |
sequana_revcomp --input-directory test/data/ --use-apptainer && cd revcomp && sh revcomp.sh
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
max-parallel: 5
matrix:
python: [3.7, 3.8, 3.9]
python: [3.8, 3.9, '3.10']
fail-fast: false

steps:
Expand Down
19 changes: 9 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
:target: https://github.com/sequana/revcomp/actions/workflows


.. image:: https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C3.10-blue.svg
:target: https://pypi.python.org/pypi/sequana
:alt: Python 3.8 | 3.9 | 3.10

This is is the **revcomp** pipeline from the `Sequana <https://sequana.readthedocs.org>`_ projet

Expand All @@ -18,29 +21,24 @@ This is is the **revcomp** pipeline from the `Sequana <https://sequana.readthedo
:Output: A set of reverse completed files
:Status: production
:Citation: Cokelaer et al, (2017), ‘Sequana’: a Set of Snakemake NGS pipelines, Journal of Open Source Software, 2(16), 352, JOSS DOI doi:10.21105/joss.00352
:Authors: Thomas Cokelaer





Installation
~~~~~~~~~~~~

You must install Sequana first::

pip install sequana

Then, just install this package::

pip install sequana_revcomp
If you already have all requirements, you can install the packages using pip::

pip install sequana_mapper --upgrade

Usage
~~~~~

::

sequana_pipelines_revcomp --input-directory DATAPATH
sequana_revcomp --input-directory DATAPATH

This creates a directory with the pipeline and configuration file. You will then need
to execute the pipeline::
Expand All @@ -52,7 +50,8 @@ to execute the pipeline::
This launch a snakemake pipeline. If you are familiar with snakemake, you can
retrieve the pipeline itself and its configuration files and then execute the pipeline yourself with specific parameters::

snakemake -s revcomp.rules -c config.yaml --cores 4 --stats stats.txt
snakemake -s revcomp.rules -c config.yaml --cores 4 \
--wrapper-prefix https://raw.githubusercontent.com/sequana/sequana-wrappers/

Or use `sequanix <https://sequana.readthedocs.io/en/main/sequanix.html>`_ interface.

Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sequana>=0.8.4
sequana_pipetools>=0.2.1
sequana>=0.15.1
sequana_pipetools>=0.12.4
3 changes: 3 additions & 0 deletions sequana_pipelines/revcomp/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ input_directory: ''
input_readtag: _R[12]_
input_pattern: '*.fastq.gz'

apptainers:
seqtk: "https://zenodo.org/record/5729951/files/seqtk_1.3.0.img"


##############################################################################
# Revcomp section
Expand Down
2 changes: 1 addition & 1 deletion sequana_pipelines/revcomp/revcomp.rules
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ rule revcomp:
log:
temp("logs/{sample}.logs")
container:
"https://zenodo.org/record/5729951/files/seqtk_1.3.0.img"
config["apptainers"]["seqtk"]
shell:
"""
# -k means keep original data
Expand Down
2 changes: 2 additions & 0 deletions sequana_pipelines/revcomp/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ mapping:
type: str
"threads":
type: int
"apptainers":
type: any

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

_MAJOR = 0
_MINOR = 9
_MAJOR = 1
_MINOR = 0
_MICRO = 0
version = '%d.%d.%d' % (_MAJOR, _MINOR, _MICRO)
release = '%d.%d' % (_MAJOR, _MINOR)
Expand All @@ -27,9 +27,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
3 changes: 0 additions & 3 deletions upload.sh

This file was deleted.

0 comments on commit a1064de

Please sign in to comment.