Skip to main content

Tools for analysis of genomics & sequencing data

Project description

For documentation, see our home page on ReadtheDocs.

To run the tests, download the test dataset and unpack it into plastid/test.

Introduction

plastid is a Python library for genomic analysis – in particular, high-throughput sequencing data – with an emphasis on simplicity for users. It was written by Joshua Dunn in Jonathan Weissman’s lab at UCSF, initially for analysis of ribosome profiling and RNA-seq data. Versions of it have been used in several publications.

plastid intended audience includes computational and traditional biologists, software developers, and even those who are new to sequencing analysis. It is released under the BSD 3-Clause license.

This package provides:

  1. A set of scripts that implement common sequencing analyses

  2. A set of classes for exploratory data analysis. These provide simple and consistent interfaces for manipulating genomic features, read alignments, and quantitative data; and readily interface with existing scientific tools, like the SciPy stack.

  3. Script writing tools that make it easy to use the objects implemented in plastid.

  4. Extensive documentation, both in source code and at our home page on ReadtheDocs.

Installation

Bioconda

install with bioconda

Bioconda is a channel for the conda package manager with a focus on bioinformatics software. Once you have Bioconda installed, installing plastid is as easy as running:

$ conda create -n plastid plastid
$ source activate plastid

This will install all of the necessary dependencies for plastid in an isolated environment.

PyPI

plastid can be installed directly from PyPI

$ pip install numpy pysam cython $ pip install plastid

If you get any runtime warnings about numpy versions having changed, or about a missing module in Pysam, or about some object being the wrong size, try regenerating the included C source files from the original Cython code. To do this type:

$ pip install --upgrade  --install-option='--recythonize' plastid

Running the tests

  • NOTE: to run the entire test suite you’ll first need to download our test dataset and unpack it into plastid/test/data.

We use nose as our test runner, and test under different versions of Python using tox. To completely control the environment (e.g. compilers et c), we recommend running the tests inside the Docker container, which contains large data files needed for the tests that aren’t packaged with plastid by default:

# build & run the Docker image from within the project folder
$ docker build --pull -t plastid .
$ docker run -it --rm plastid

# inside the container, run the tests over all default configurations
root@plastid $ tox

Our tox config lets developers run subsets of tests rather than the full suite. All positional arguments are passed through to nosetests

# run all tests within the plastid.test.unit subpackage
root@plastid $ tox plastid.test.unit

# run tests in two files
root@plastid $ tox plastid.test.unit.genomics.readers.test_bed plastid.test.unit.util.io.test_binary

By default, tox recompiles all C extensions before running the tests. This can be slow. To avoid doing that, set the environment variable PLASTID_NOREBUILD to true:

# run unit tests without rebuilding the C extensions
root@plastid $ env PLASTID_NOREBUILD=true tox plastid.test.unit

Finally, if you only want to test in some, not all environments, you can do so with typical tox syntax:

# list available test environments
root@plastid $ tox -l
py36-pinned
py36-latest
py39-latest

# run only in 2 selected environments
root@plastid $ tox -e py36-pinned,py39-latest plastid.test.unit

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

plastid-0.6.1.tar.gz (1.7 MB view details)

Uploaded Source

File details

Details for the file plastid-0.6.1.tar.gz.

File metadata

  • Download URL: plastid-0.6.1.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for plastid-0.6.1.tar.gz
Algorithm Hash digest
SHA256 7a63f8a3b760e9c91e7c6d95ff781d9a8f2f967d705fcd8555ebb1e6d3b08b7b
MD5 bb94cf1774a161432f20004164fe61e6
BLAKE2b-256 67de2411d344559d862a69eaa1ce19448882816c011784a4276de51980b2742d

See more details on using hashes here.

Supported by

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