Skip to main content

pytest ngs fixtures

Project description

pytest-ngsfixtures

https://anaconda.org/percyfal/pytest-ngsfixtures/badges/version.svg https://badge.fury.io/py/pytest-ngsfixtures.svg https://travis-ci.org/percyfal/pytest-ngsfixtures.svg?branch=master

About

This is a pytest plugin that enables next generation sequencing pytest fixtures, including fastq files and output files from a variety of bioinformatics applications and tools. There are sequencing fixtures for some common sample layouts, but it’s easy to generate additional sample fixture layouts using fixture factories.

See the pytest-ngsfixtures documentation for more information and usage.

  • Free software: GNU General Public License v3

Features

  • ngs data sets of different sizes

  • predefined sample layouts

  • factories for generating new sample layouts

  • result files from a variety of bioinformatics applications and tools

  • wrappers for quickly setting up workflow tests

Installation

$ conda install -c percyfal pytest-ngsfixtures
$ pip install pytest-ngsfixtures

Usage

from pytest_ngsfixtures.fixtures import sample
from pytest_ngsfixtures.wm import snakemake

Snakefile = snakemake.snakefile_factory("/path/to/Snakefile")

def test_workflow(Snakefile, sample):
    snakemake.run(Snakefile, target="s1.bam")
    assert sample.join("s1.bam").exist()

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.6.3 (2018-01-02)

  • Remove obsolete working directory argument - requires snakemake >= 4.4.0

  • Install correct docker API (#50)

  • Allow modifying path in shell wrapper (#51)

0.6.2 (2017-12-19)

Add shell wrappers and wrappers for easily setting up workflow tests.

Add tutorial.

Bugfixes.

  • Update pypi badge

  • Remove tox.ini

  • Defer setting alias to FixtureFile (#42)

  • ReadFixtureFile.SM now returns id (#39)

  • Options ngs_layout and ngs_runfmt are now lists (#41)

  • Update project layout configuration (#40)

  • Add function to return runfmt and alias as tuple (#43)

  • Read 1 and 2 have same id when alias required (#45)

  • Census is not increased for read 2 (#44)

  • Add option to only setup sampleinfo (#47)

  • Add tutorial (#46)

  • Add working snakemake tests (#8)

0.6.1 (2017-11-22)

Added some fixes that turned out to be necessary for optional performance.

  • Add fixture that parametrizes over input parameters (#37)

  • Fix bug that returned wrong number of snakemake targets in application output generation (#36)

  • Add travis builds (#35)

  • Fix reference layout error for python 3.5 (#34)

  • Update option defaults (#32)

  • Expose fewer predefined fixtures via plugin (#31)

  • Unify parameter names (#33)

0.6.0 (2017-11-21)

This is a major revision of the code. Several new abstraction classes have been introduced to ease interaction with local test files, along with new factory functions. For backwards compatibility, most factory functions should work as previously. Documentation has been much improved.

  • Clarify fixture function naming convention (#29)

  • Expose bulk of factory inner functions (#24)

  • Create separate module for os-related functions (#27)

  • Use separate conda build statements to build for different python versions (#23)

0.5.2 (2017-11-16)

  • Add pool fixtures (#22)

  • Add safe_copy function (#21)

0.5.1 (2017-10-25)

  • Change name to pytest-ngsfixtures (#20)

  • Add bcftools versions 1.4, 1.4.1, 1.5, 1.6

  • Add bowtie 1.2.1.1

0.5.0 (2017-09-25)

  • Add star application

  • Add vsearch application

  • Add rseqc application

  • Add snakemake dependency

  • Update docs

  • Separate qualimap pe and se output (#12)

  • Add mapdamage2 (#11)

  • Fix mapdamage2 missing output (#18)

  • Use realpath to determine download url (#17)

  • Rename download_ngsfixtures_data.py to pytest_ngsfixtures_download_data.py

  • Update versions for samtools

0.4.0 (2017-03-28)

  • Add picard output data

  • Add functions for dealing with application fixtures

  • Move docs to gh-pages

  • Add pytest_ngsfixtures_add_application.py for templating new applications

  • Application outputs now implemented as dictionaries for multiple-output applications

0.3.1 (2017-03-03)

Defer download to script, minor bug fixes

  • Add application_fixtures to config module

  • Fix sample_alias bug (#4)

  • Add script download_ngsfixtures_data.py for manual download of data (#5)

0.3.0 (2017-03-02)

Add application data, pool data, and functions for downloading data

  • Add application data for cutadapt, fastqc, qualimap and samtools

  • Add pooled sequencing data

  • Add functionality for downloading large data sets

  • Improve make targets for easier releases

  • Minor bug fixes

0.2.0 (2017-02-24)

Add new reference files, test files, and factory functions.

  • Use snakemake instead of make to generate data files

  • Add separate test file for factory functions

  • Add scaffold file with randomly inserted N’s

  • Improve safe_symlink

  • Add threads options for running tests

  • Add Snakefile and rules for generating application files

  • Add fileset, filetype factory functions

0.1.0 (2017-01-24)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-ngsfixtures-0.6.3.tar.gz (44.7 MB view hashes)

Uploaded Source

Built Distribution

pytest_ngsfixtures-0.6.3-py2.py3-none-any.whl (45.0 MB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page