Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 57 additions & 23 deletions .github/workflows/apptainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,91 @@ on:
branches:
- main
- dev
workflow_dispatch:
pull_request:
branches-ignore: []
schedule:
- cron: '0 0 * * SUN'
- cron: '0 0 1 * *'

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


steps:

- name: precleanup
# Clean up unnecessary preinstalled packages to free disk space
- name: Pre-cleanup
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: install graphviz

# Cache APT .deb packages
- name: Cache APT archives
uses: actions/cache@v3
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-cache-v1

# Cache Apptainer installation
- name: Cache Apptainer install
id: cache-apptainer
uses: actions/cache@v3
with:
path: |
/usr/bin/apptainer
/usr/lib/apptainer
/etc/apptainer
key: ${{ runner.os }}-apptainer-v1

# Install Apptainer only if not cached
- name: Install Apptainer
if: steps.cache-apptainer.outputs.cache-hit != 'true'
run: |
sudo apt update
sudo apt-get install -y graphviz software-properties-common
sudo apt-get update
sudo apt-get install -y software-properties-common graphviz
sudo add-apt-repository -y ppa:apptainer/ppa
sudo apt update
sudo apt install -y apptainer
sudo apt-get update
sudo apt-get install -y apptainer

# Cache Apptainer image cache (~/.apptainer/cache)
- name: Cache Apptainer images
uses: actions/cache@v3
with:
path: ~/.apptainer/cache
key: ${{ runner.os }}-apptainer-images-v1

- name: checkout git repo
uses: actions/checkout@v3
# Checkout repository
- name: Checkout repo
uses: actions/checkout@v4

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

# Install dependencies
- name: Install dependencies
run: |
pip install .[testing]
python -m pip install --upgrade pip
pip install .

- name: install package itself
# Install pinned pulp
- name: Install pinned pulp
run: |
pip install .
pip install "pulp>=2.8" --no-deps

- name: testing
# Run tests using Apptainer
- name: Run Apptainer tests
run: |
sequana_ribofinder --input-directory test/data \
--reference-file test/data/Lepto.fa \
--gff-file test/data/Lepto.gff \
--use-apptainer --apptainer-prefix ~/.apptainer/cache

sequana_ribofinder --input-directory test/data --reference-file test/data/Lepto.fa --gff-file test/data/Lepto.gff --use-apptainer && cd ribofinder && sh ribofinder.sh





cd ribofinder && bash ribofinder.sh
14 changes: 8 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,33 @@ jobs:
strategy:
max-parallel: 5
matrix:
python: [3.8, 3.9, '3.10']
python: ['3.11', '3.12']
fail-fast: false


steps:

- name: install graphviz
run: |
sudo apt-get update -qq
sudo apt-get install -y graphviz

- name: checkout git repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: conda/mamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment.yml
extra-specs: |
create-args: >-
python=${{ matrix.python }}
cache-environment: true
cache-downloads: true

- name: install package itself
shell: bash -l {0}
run: |
pip install .


- name: Install dependencies
shell: bash -l {0}
run: |
Expand All @@ -54,6 +55,7 @@ jobs:
pytest -v --cov-report term-missing --cov=sequana_pipelines.ribofinder

- name: coveralls
continue-on-error: true
shell: bash -l {0}
run: |
echo $COVERALLS_REPO_TOKEN
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Publish to PyPI
on:
on:
workflow_dispatch:
push:
tags:
Expand All @@ -8,32 +8,33 @@ on:
jobs:
build-n-publish:
name: Build and publish to PyPI and TestPyPI
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@main
- name: Set up Python 3.8
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.11

- name: Install package
- name: Install package
run: |
pip install build poetry

- name: Build source tarball
run: |
rm -rf dist;
poetry build

- name: Publish distribution to Test PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
29 changes: 25 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
.. image:: https://github.com/sequana/ribofinder/actions/workflows/main.yml/badge.svg
:target: https://github.com/sequana/ribofinder/actions/workflows/main.yml

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



Expand Down Expand Up @@ -67,12 +67,16 @@ Requirements

This pipelines requires the following executable(s):

- bowtie1 >= 1.3.0
- bowtie2 >= 2.4.0
- bwa
- sambamba
- bedtools
- samtools
- bamtools
- pigz

The aligner is selectable at the command line with ``--aligner bowtie2`` (default)
or ``--aligner bwa``. You only need to install the one(s) you intend to use.

.. image:: https://raw.githubusercontent.com/sequana/ribofinder/master/sequana_pipelines/ribofinder/dag.png

Details
Expand Down Expand Up @@ -109,6 +113,23 @@ Changelog
========= ====================================================================
Version Description
========= ====================================================================
1.2.0 * Replace bowtie1 with bowtie2 (default) and bwa as aligner options
for rRNA mapping; the aligner is now user-selectable via
``--aligner bowtie2|bwa``.
* Drop the bowtie1-specific ``fix_bowtie1_log`` workaround and the
standalone ``bam_indexing`` / ``samtools_faidx`` rules; the new
sequana-wrappers already produce sorted+indexed BAMs and a
faidx'ed reference.
* For bwa, feed multiqc with ``samtools stats`` output (bwa has no
native multiqc module); the mapping-rate plot in the HTML report
is built from ``multiqc_samtools_stats.txt``.
* For bowtie2, the HTML summary uses ``sequana.multiqc.plots.Bowtie2``
which handles both single-end and paired-end outputs.
* Rewrite the HTML summary introduction to explain what the
pipeline does, how it works step-by-step, and how to interpret
each of the three plots (mapping rate, per-sequence proportions,
per-sequence RPKM).
(``bowtie2``, ``bwa``, ``sambamba`` replace ``bowtie``/``bamtools``).
1.1.1 * hotfix for running on HPC (slurm)
1.1.0 * Uses click (refactoring of sequana_pipetools)
1.0.1 * add sequana_wrappers in the config/pipeline
Expand Down
6 changes: 4 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ channels:
- r

dependencies:
- 'bowtie>=1.3.0'
- 'bowtie2>=2.4.0'
- bwa
- sambamba
- samtools>1.7
- bamtools
- bedtools
- pigz
- graphviz
25 changes: 17 additions & 8 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-ribofinder"
version = "1.1.1"
version = "1.2.0"
description = "A multi-sample identification of ribosomal content"
authors = ["Sequana Team"]
license = "BSD-3"
Expand All @@ -19,9 +19,9 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Information Analysis",
Expand All @@ -33,20 +33,29 @@ packages = [


[tool.poetry.dependencies]
python = ">=3.8,<4.0"
sequana = ">=0.15.0"
sequana_pipetools = ">=0.16.0"
python = ">=3.9,<4.0"
sequana = ">=0.18.0"
sequana_pipetools = ">=1.5.4"
sequana-wrappers = ">=26.3.19"
click-completion = "^0.5.2"

snakemake = ">=7.32"
pulp = ">=2.8"

[tool.poetry.scripts]
sequana_ribofinder = "sequana_pipelines.ribofinder.main:main"


[tool.poetry.group.dev.dependencies]
black = "^23.7.0"
pytest = "^7.4.0"
pytest = "^8.0.0"
mock = "^5.1.0"
pytest-mock = "^3.11.1"
pytest-cov = "^4.1.0"

[tool.pytest.ini_options]
filterwarnings = [
"ignore::pytest.PytestDeprecationWarning",
"ignore::DeprecationWarning:click_completion",
"ignore::DeprecationWarning:importlib",
]
asyncio_mode = "auto"
Loading
Loading