Skip to main content
https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat https://img.shields.io/pypi/v/dinopy.svg?style=flat https://img.shields.io/bitbucket/pipelines/HenningTimm/dinopy https://img.shields.io/readthedocs/dinopy https://img.shields.io/pypi/l/dinopy https://zenodo.org/badge/DOI/10.5281/zenodo.4389307.svg

Dinopy - DNA input and output for Python and Cython

Dinopy’s goal is to make files containing biological sequences easily and efficiently accessible for Python and Cython programmers, allowing them to focus on their application instead of file-io.

#!python

import dinopy
fq_reader = dinopy.FastqReader("reads.fastq")
for sequence, name, quality in fq_reader.reads(quality_values=True):
    if some_function(quality):
        analyze(seq)

Features

  • Easy to use reader and writer for FASTA-, FASTQ-, and SAM-files.

  • Specifiable data type and representation for return values (bytes, bytearrays, strings and integers see dtype for more information).

  • Implemented in Cython for additional speedup.

  • Offers a Cython API to avoid introducing Python code into Cython projects.

  • Works directly on gzipped files.

  • Iterators for q-grams of a sequence (also allowing shaped q-grams).

  • (Reverse) complement.

  • Chromosome selection from FASTA files.

Getting Started

  • If you are new to dinopy you can get started by following the first-steps tutorial.

  • A full list of features, as well as the documentation, can be found here.

Installation

Dinopy can be installed with pip:

$ pip install dinopy

or with conda:

$ conda install -c bioconda dinopy

Additionally, dinopy can be downloaded from Bitbucket and compiled using its setup.py:

  1. Download source code from bitbucket.

  2. Install globally:

    $ python setup.py install

    or only for the current user:

    $ python setup.py install --user
  3. Use dinopy:

    $ python
    
    >>> import dinopy

Installation requirements

  • python >= 3.8

  • numpy >= 1.17

  • cython >= 3.0.0

  • C and C++ compilers, for example from build-essentials (Linux) or Xcode (OSX)

We recommend using anaconda and the bioconda channel.

$ conda config --add channels bioconda
$ conda create -n dinoenv dinopy

Platform support

Dinopy has been tested on Ubuntu, Arch Linux and OS X (Yosemite and El Capitan).

We do not officially support Windows - dinopy will probably work, but there might be problems due to different linebreak styles; we assume \n as separator but the probability to encounter files with \r\n as line-separator might be higher on Windows.

Contact

If you want to report a bug or want to suggest a new feature, feel free to do so over at bitbucket.

Email:
  • Henning Timm: name.surname <at> tu-dortmund.de

  • Till Hartmann: name.surname <at> tu-dortmund.de

License

Dinopy is Open Source and licensed under the MIT License.

Metadata

Release files for dinopy 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dinopy 3.0.0
File Size Uploaded
dinopy-3.0.0.tar.gz 744.7 kB Details

Release files / dinopy-3.0.0.tar.gz

Download URL dinopy-3.0.0.tar.gz
Size 744.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9b2238c20c946a7ea34b979fec4dd182f3474958e9a03075dfbbb464e9d84028
BLAKE2b-256 checksum
How to use checksums
e3fd06182a3e21bd400c172ef973512a070968c039a0f18f41c54c933fcafef9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

3.0.0 This release

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.1.0

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page