The Python GTF toolkit (pygtftk) package: easy handling of GTF files
Project description
Pip package |
|
Bioconda package |
|
License |
|
Platforms |
|
Languages |
|
Build status |
|
Repository size |
|
Latest conda |
|
Downloads |
|
Codacy |
|
Contribution |
|
Github hits |
|
Issues |
|
Citing |
|
Documentation |
Python GTF toolkit (pygtftk)
The Python GTF toolkit (pygtftk) package is intented to ease handling of GTF/GFF2.0 files (Gene Transfer Format). It currently does not support GFF3 file format. The pygtftk package is compatible with Python >=3.5,<3.7 and relies on libgtftk, a library of functions written in C.
The package comes with a set of UNIX commands that can be accessed through the gtftk program. The gtftk program proposes several atomic tools to filter, convert, or extract data from GTF files. The gtftk set of Unix commands can be easily extended using a basic plugin architecture. All these aspects are covered in the help sections.
While the gtftk Unix program comes with hundreds of unitary and functional tests, it is still upon active development and may thus suffer from bugs that remain to be discovered. Feel free to post any problem or required enhancement in the issue section of the github repository.
NB: The Documentation about the latest release is available as a github page. The readthedoc version won’t be maintained and will be close in the near future. This choice was motivated by the impossibility to maintain a dynamic documentation (using sphinx/sphinxcontrib-programoutput) given the computing time provided by readthedoc server.
System requirements
Depending on the size of the GTF file, pygtftk and gtftk may require lot of memory to perform selected tasks. A computer with 16Go is recommended in order to be able to pipe several commands when working with human annotations from ensembl release (e.g. 91). When working with a cluster think about reserving sufficient memory.
At the moment, the gtftk program has been tested on:
Linux (Ubuntu 12.04 and 18.04)
OSX (Yosemite, El Capitan, Mojave).
Installation
Installation through conda package building
Installation through conda should be the preferred install solution. The pygtftk package and gtftk command line tool require external dependencies with some version constrains.
If conda is not available on your system, first install miniconda from the official web site and make sure you have bioconda and conda-forge channels set up in the order below.
conda config --add channels defaults conda config --add channels bioconda conda config --add channels conda-forge
Then you can simply install pygtftk in its own isolated environment and activate it.
conda create -n pygtftk -c bioconda pygtftk conda activate pygtftk
Installation through setup.py
This is not the preferred way for installation. Choose conda whenever possible. We have observed several issues with dependencies that still need to be fixed.
git clone git@github.com:dputhier/pygtftk.git pygtftk cd pygtftk # Check your Python version (>=3.5,<3.7) pip install -r requirements.txt python setup.py install
Installation through pip
Prerequisites
Again, this is not the preferred way for installation. Please choose conda whenever possible. We have observed several issues with dependencies that still need to be fixed.
Running pip
Installation through pip can be done as follow.
pip install -r requirements.txt pip install pygtftk # It is important to call gtftk -h # to look for plugins and their # CLI in ~/.gtftk # before going further gtftk -h
Documentation
Documentation about the latest release is available as a github page.
Testing
Running functional tests
A lot of functional tests have been developed to ensure consistency with expected results. This does not rule out that bugs may hide throughout the code… In order to check that installation is functional you may be interested in running functional tests. The definition of all functional tests declared in gtftk commands is accessible using the -p/–plugin-tests argument:
gtftk -p
To run the tests, you will need to install bats (Bash Automated Testing System). Once bats is installed run the following commands:
# The tests should be run in the pygtftk git # directory because several tests contains references (relative path) # to file enclosed in pygtftk/data directory. gtftk -p > gtftk_test.bats bats gtftk_test.bats
Note, alternatively you may directly call the tests using the Makefile.
make clean make test
Or run tests in parallel using:
make clean make test_para -j 10 # Using 10 cores
Running unitary tests
Several unitary tests have been implemented using doctests. You can run them using nose through the following command line:
make nose
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for pygtftk-1.0.6-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb4b9df77c8779bfd2345cfd8b5cc45723d9cac3cbec398422a9ff9afae796a4 |
|
MD5 | c560dadf6383ae55ba5292c4a0ecb946 |
|
BLAKE2b-256 | 50d3361d2519204216e3044895227ef4972f47f592780eb973ca1134157bdcc5 |
Hashes for pygtftk-1.0.6-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01991c82ba9d827d3f8bd8e16201bc67addfa2ac0b43db3741e22be8913e3a68 |
|
MD5 | 330ffffbcaa5cfc60a085a4b0c87a809 |
|
BLAKE2b-256 | 1bc072483d2f25fd1c9846283e804de231284ef3557057ef54103a96554b2fc6 |
Hashes for pygtftk-1.0.6-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78b6428522a7563ca0e82b502c95e3b480387f90264a475b1604c8b0048c6d2a |
|
MD5 | a9a79cabb4a2c5b478d60f726f74b97e |
|
BLAKE2b-256 | ce4dfd001f22f7aa420a43c368d3478c395a7d57f11aa48caf9f223c5d7243a5 |
Hashes for pygtftk-1.0.6-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cf2d55b97bbf914bbc458834495816abc2a80f5315488d3eec9268b4fc096a8 |
|
MD5 | a80cac3724dad75d6a9cb322d9ce4259 |
|
BLAKE2b-256 | fce8e62fee40994668bfc10b0e06330f99bdad8513edc21ed3b114dcb33e352f |