DNA input and output library for Python and Cython. Includes reader and writer for FASTA and FASTQ files, support for samtools faidx files, and generators for solid and gapped q-grams (k-mers).
pip install dinopy==3.0.0
Dinopy's goal is to make files containing biological sequences easily and efficiently accessible for python 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)
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:
Download source code from bitbucket.
Install globally:
$ python setup.py install
or only for the current user:
$ python setup.py install --user
Use dinopy:
$ python >>> import dinopy
build-essentials
(Linux) or Xcode
(OSX)We recommend using anaconda and the bioconda channel.
$ conda config --add channels r $ conda config --add channels bioconda $ conda create -n dinoenv dinopy
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.
If you want to report a bug or want to suggest a new feature, feel free to do so over at bitbucket.
Dinopy is Open Source and licensed under the MIT License.