Skip to content
Closed
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
61 changes: 61 additions & 0 deletions .github/workflows/apptainer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Apptainer Run

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

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python: [3.8, '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_ribofinder --input-directory test/data --reference-file test/data/Lepto.fa --gff-file test/data/Lepto.gff --use-apptainer && cd ribofinder && sh ribofinder.sh





42 changes: 23 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,61 @@ name: Tests
on:
push:
branches:
- master
- main
- dev
workflow_dispatch:
pull_request:
branches-ignore: []
schedule:
- 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.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: Set up Python 3.X
uses: actions/setup-python@v2
- name: conda/mamba
uses: mamba-org/setup-micromamba@v2
with:
python-version: ${{ matrix.python }}

- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
conda update ruamel_yaml
environment-file: environment.yml
create-args: >-
python=${{ matrix.python }}
cache-environment: true
cache-downloads: true

- name: conda
- name: install package itself
shell: bash -l {0}
run: |
conda install -c conda-forge --quiet mamba python=${{ matrix.python }}
mamba install -c bioconda -c conda-forge --quiet -y bowtie samtools bamtools pigz bedtools
pip install .

- name: Install dependencies
shell: bash -l {0}
run: |
pip install coveralls pytest-cov pytest pytest-xdist

- name: install package itself
run: |
pip install .

- name: testing
shell: bash -l {0}
run: |
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
coveralls --service=github
Expand Down
25 changes: 13 additions & 12 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,33 @@ on:
jobs:
build-n-publish:
name: Build and publish to PyPI and TestPyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: 3.8

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

- name: Build source tarball
run: |
rm -rf dist;
python setup.py sdist

poetry build
- name: Publish distribution to Test PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
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@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

14 changes: 13 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
.. 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.11%20%7C%203.12-blue.svg
:target: https://pypi.python.org/pypi/sequana_ribofinder
:alt: Python 3.11 | 3.12


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

Expand Down Expand Up @@ -62,8 +66,10 @@ Requirements

This pipelines requires the following executable(s):

- bowtie1
- bowtie1 >= 1.3.0
- bedtools
- samtools
- bamtools
- pigz

.. image:: https://raw.githubusercontent.com/sequana/ribofinder/master/sequana_pipelines/ribofinder/dag.png
Expand Down Expand Up @@ -102,6 +108,12 @@ Changelog
========= ====================================================================
Version Description
========= ====================================================================
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
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)
0.11.0 * Fix multiqc plot using same fix as in sequna_rnaseq pipelines
* add utility plot to check rate of ribosomal per sequence and also
Expand Down
14 changes: 14 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: sequana_ribofinder

channels:
- conda-forge
- bioconda
- defaults
- r

dependencies:
- 'bowtie>=1.3.0'
- samtools>1.7
- bamtools
- bedtools
- pigz
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "sequana-ribofinder"
version = "1.1.1"
description = "A multi-sample identification of ribosomal content"
authors = ["Sequana Team"]
license = "BSD-3"
repository = "https://github.com/sequana/ribofinder"
readme = "README.rst"
keywords = ["snakemake", "ribosomal", "rRNA", "sequana"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Education",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Developers",
"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",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Information Analysis",
]

packages = [
{include = "sequana_pipelines"}
]


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


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


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

2 changes: 0 additions & 2 deletions requirements.txt

This file was deleted.

15 changes: 10 additions & 5 deletions sequana_pipelines/ribofinder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import pkg_resources
try:
version = pkg_resources.require("sequana_ribofinder")[0].version
except:
version = ">=0.8.0"
import importlib.metadata as metadata

def get_package_version(package_name):
try:
version = metadata.version(package_name)
return version
except metadata.PackageNotFoundError:
return f"{package_name} not found"

version = get_package_version("sequana-ribofinder")

14 changes: 11 additions & 3 deletions sequana_pipelines/ribofinder/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
# If input_directory provided, use it otherwise if input_pattern provided,
# use it, otherwise use input_samples.
# ============================================================================
sequana_wrappers: "v23.11.18"

input_directory:
input_readtag: _R[12]_
input_pattern: '*fastq.gz'
Expand Down Expand Up @@ -37,10 +39,16 @@ general:
rRNA_file: ''
rRNA_feature: rRNA
genbank_file: ''
gff_file:
reference_file:

gff_file:
reference_file:

apptainers:
sequana_ribofinder: "https://zenodo.org/record/7348115/files/sequana_ribofinder_0.12.0.img"
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"
multiqc: "https://zenodo.org/record/10205070/files/multiqc_1.16.0.img"

#############################################################################
# bowtie1_mapping_rna used to align reads against ribosomal RNA
Expand Down
Loading
Loading