Skip to content

Commit

Permalink
Merge de4f76d into 71fe819
Browse files Browse the repository at this point in the history
  • Loading branch information
cokelaer committed Dec 20, 2023
2 parents 71fe819 + de4f76d commit 35dab49
Show file tree
Hide file tree
Showing 20 changed files with 5,047 additions and 429 deletions.
39 changes: 20 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@ name: Tests
on:
push:
branches:
- master
- main
- dev
workflow_dispatch:
pull_request:
branches-ignore: []
schedule:
- cron: '0 0 30 * *'

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 All @@ -26,36 +30,33 @@ jobs:
- name: checkout git repo
uses: actions/checkout@v2

- name: Set up Python 3.X
uses: actions/setup-python@v2
- name: conda/mamba
uses: mamba-org/setup-micromamba@v1
with:
python-version: ${{ matrix.python }}
micromamba-version: '1.3.1-0'
environment-file: environment.yml
create-args: |
python=${{ matrix.python }}
cache-environment: true
cache-downloads: true

- 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
- name: conda
- name: install package itself
shell: bash -el {0}
run: |
conda install -c conda-forge mamba --quiet
mamba install -c bioconda -c conda-forge --quiet -y fastqc bwa samtools bamtools sambamba pigz
pip install .
- name: Install dependencies
shell: bash -el {0}
run: |
pip install coveralls pytest-cov pytest pytest-xdist
- name: install package itself
run: |
pip install .
- name: testing
shell: bash -el {0}
run: |
pytest -v --cov-report term-missing --cov=sequana_pipelines.quality_control
- name: coveralls
shell: bash -l {0}
run: |
echo $COVERALLS_REPO_TOKEN
coveralls --service=github
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,32 @@ on:
jobs:
build-n-publish:
name: Build and publish to PyPI and TestPyPI
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
- uses: actions/checkout@main
- name: Set up Python 3.8
uses: actions/setup-python@v2
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
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
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 }}
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

files: '\.(py|rst|sh)$'
fail_fast: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
#- id: check-executables-have-shebangs
- id: check-ast

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args: ["-j8", "--ignore=E203,E501,W503,E722", "--max-line-length=120", "--exit-zero"]

- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
args: ["--line-length=120"]
exclude: E501

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"] # solves conflicts between black and isort

6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

20 changes: 10 additions & 10 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:alt: JOSS (journal of open source software) DOI

.. image:: https://github.com/sequana/quality_control/actions/workflows/main.yml/badge.svg
:target: https://github.com/sequana/quality_control/actions/workflows
:target: https://github.com/sequana/quality_control/actions/workflows


This pipeline is not maintained anymore but should be functional. It is a short-read quality control pipeline
Expand Down Expand Up @@ -39,15 +39,15 @@ Usage
::

sequana_quality_control --help
sequana_quality_control --input-directory DATAPATH
sequana_quality_control --input-directory DATAPATH

This creates a directory with the pipeline and configuration file. You will then need
This creates a directory with the pipeline and configuration file. You will then need
to execute the pipeline::

cd quality_control
sh quality_control.sh # for a local run

This launch a snakemake pipeline. If you are familiar with snakemake, you can
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 quality_control.rules -c config.yaml --cores 4 --stats stats.txt
Expand All @@ -61,8 +61,6 @@ This pipelines requires the following executable(s):

- fastqc
- bwa
- kraken2 (optional)
- krona (optional)
- sambamba
- samtools
- pigz
Expand All @@ -74,15 +72,15 @@ This pipelines requires the following executable(s):
Details
~~~~~~~

This pipeline runs **quality_control** in parallel on the input fastq files (paired or not).
This pipeline runs **quality_control** in parallel on the input fastq files (paired or not).
A brief sequana summary report is also produced.


Rules and configuration details
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Here is the `latest documented configuration file <https://raw.githubusercontent.com/sequana/sequana_quality_control/master/sequana_pipelines/quality_control/config.yaml>`_
to be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file.
to be used with the pipeline. Each rule used in the pipeline may have a section in the configuration file.

ChangeLog
~~~~~~~~~
Expand All @@ -91,9 +89,11 @@ ChangeLog
========= ====================================================================
Version Description
========= ====================================================================
0.10.0 * add missing MANIFEST
0.11.0 * switch to click, pyproject. remove kraken (see multitax pipeline
instead)
0.10.0 * add missing MANIFEST
0.9.0 * remove design_file for cutadapt to reflect changes in
sequana 0.12.0
sequana 0.12.0
* update kraken rules to use a kraken2 version
* Update to use new sequana framework (0.12)
* added CI action
Expand Down
19 changes: 19 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: mapper

channels:
- conda-forge
- bioconda
- defaults

dependencies:
- bwa
- samtools
- pigz
- fastqc
- sambamba
- pip:
- sequana
- cutadapt
- atropos


Loading

0 comments on commit 35dab49

Please sign in to comment.