Skip to content

Commit

Permalink
Merge branch 'release/0.9.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
dputhier committed Sep 19, 2018
2 parents df43a8f + 995443d commit e3d85a6
Show file tree
Hide file tree
Showing 73 changed files with 577 additions and 1,038 deletions.
17 changes: 6 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ test_para: $(OUTPUT2)

clean:
@make bats_cmd CMD=clean
@git checkout docs/manual/source/conf.py pygtftk/version.py; rm -rf pygtftk.egg-info build airway_love.txt* ENCFF630HEX_Total_RNAseq_K562_count_mini.txt STDIN.e* STDIN.o* dist cmd_list.txt example_list.txt tmp_list.txt simple.chromInfo prgm_list.txt test_list.txt *.bats *.completed *mini_real* heatmap_* tx_classes* *~ \#* hh profile_* toto tott; cd docs/manual/; make clean; cd ../..; find . -type f -name '*~' -exec rm -f '{}' \;
@git checkout docs/manual/source/conf.py pygtftk/version.py; rm -rf pygtftk.egg-info build airway_love.txt* ENCFF630HEX_Total_RNAseq_K562_count_mini.txt STDIN.e* closest_1.tsv STDIN.o* dist cmd_list.txt example_list.txt tmp_list.txt simple.chromInfo prgm_list.txt test_list.txt *.bats *.completed *mini_real* heatmap_* tx_classes* *~ \#* hh profile_* toto tott; cd docs/manual/; make clean; cd ../..; find . -type f -name '*~' -exec rm -f '{}' \;

check_cmd_has_example:
@for i in $$(gtftk -l); do if grep -q "^$$i" docs/manual/source/presentation.rst; then echo "" >/dev/null; else echo $$i; fi; done
Expand All @@ -116,15 +116,10 @@ check_example_has_cmd:
@for i in $$(cat example_list.txt); do if $$(cat cmd_list.txt | grep -q "^$$i") ; then echo "" >/dev/null; else echo $$i; fi; done
@#rm -f cmd_list.txt example_list.txt tmp_list.txt

prepare_pip:
@touch pypi_release_in_progress
@rm -rf build/ dist/ pygtftk.egg-info/
@python setup.py sdist
@python setup.py bdist_wheel
@rm -f pypi_release_in_progress

send_to_pypi:
@twine upload --repository-url https://test.pypi.org/legacy/ dist/* --verbose

nb_test:
@gtftk -p| perl -ne 'BEGIN{$$/="{"}{/\@test\s+"(\w+)_\d+"/; print $$1,"\n"}'| sort | uniq -c | sort -nr
release:
@touch release_in_progress

unrelease:
@rm -f release_in_progress
33 changes: 14 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,58 @@
[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg)](https://github.com/dputhier/gtftk) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dputhier/gtftk/issues) [![HitCount](http://hits.dwyl.io/puthier/gtftk.svg)](http://hits.dwyl.io/puthier/gtftk)
![GitHub release](https://img.shields.io/github/release/qubyte/rubidium.svg)
[![Packagist](https://img.shields.io/packagist/l/doctrine/orm.svg)](https://github.com/dputhier/pygtftk) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/dputhier/pygtftk/issues) [![HitCount](http://hits.dwyl.com/dputhier/pygtftk.svg)](http://hits.dwyl.com/dputhier/pygtftk)


# Python GTF toolkit (pygtftk)


The **Python GTF toolkit (pygtftk) package** is intented to ease handling of GTF (Gene Transfer Format) files. The pygtftk package is compatible with Python 2.7 and relies on **libgtftk**, a library of functions **written in C**.
The **Python GTF toolkit (pygtftk) package** is intented to ease handling of GTF (Gene Transfer Format) files. The pygtftk package is compatible with Python 2.7 and Python >=3.5 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.

## System requirements

Depending on the **size of the GTF file**, pygtftk 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).
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).

At the moment, the gtftk program has been tested on:

- Linux (Ubuntu 12.04 and 18.04)
- OSX (Yosemite, El Capitan).
- WSL/Bash on Ubuntu on Windows.


## Installation through conda package building

Installation through **conda** should be the **prefered install solution**. Although the GTF interface of pygtftk should work properly after a pip install (see next section), the UNIX commands (gtftk program) require several external dependencies with some version constrains.
Installation through **conda** should be the **prefered install solution**. The pygtftk package and gtftk command line tool require external dependencies with some version constrains (e.g. bedtools that, we observed, displays some back compatibility issue).

At the moment, there is no built conda package available. You can however create an environment with all prerequisites using the commands below.
A conda package will be available in the near future. In the meantime, you can however create an environment with all prerequisites using the commands below.
If conda is not available on your system, first install miniconda from the official [web site](http://conda.pydata.org/miniconda.html).

git clone [email protected]:dputhier/pygtftk.git pygtftk
cd pygtftk
conda env create -n pygtftk_py3k -f conda/env.yaml python=3.6
source activate pygtftk_py3k
make install
# It is important to call gtftk -h
# to find and dump plugin parsers
# before going further
gtftk -h

Note for developpers: You can install the develop branch using the same approach.

git clone [email protected]:dputhier/pygtftk.git pygtftk
cd pygtftk
git checkout develop
conda env create -n pygtftk_py3k_dev -f conda/env.yaml python=3.6
source activate pygtftk_py3k_dev
make install

## Installation through pip

### Prerequesites

Again, this is not the prefered way for installation. Please choose conda whenever possible. The gtftk Unix command line program requires at least bedtools (command line).
Again, this is not the prefered way for installation. Please choose conda whenever possible. The gtftk Unix command line program has been tested with bedtools 2.27.1 (be aware that we have encountered some back compatibility issues with bedtools).

### 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 find and dump plugin parsers
# before going further
gtftk -h

## Running functional tests

Expand Down
Empty file added bin/__init__.py
Empty file.
29 changes: 21 additions & 8 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
## Changelog
# Changelog

### v0.9.2 (not-yet-release)
## v0.9.4 (not-yet-release)

#### Bug Fixes
### Bug Fixes

#### API Changes
### API Changes

### New Features

#### New Features

- pygtftk is now compatible with both python 2 and 3.
## v0.9.3

### Bug Fixes

- User-defined colors are now applied when calling profile command (bug in 0.9.2).
- Fixed test issues when using md5sum under Linux.
- Lots of typo fixed (their must be lot remaining unfortunatly...).

### API Changes


### New Features

- pygtftk is now compatible with both python 2.7 and >=3.5.
- libstdcxx is no more required in env.yaml.
- 'Makefile clean' also reset version.py and conf.py to repository version.
- Improved parser loading.
- 5p_3p_coord has been renamed get_5p_3p_coords.
- Lots of typo fixed (their must be lot remaining unfortunatly...).
- Added a pip requirement.txt file for developers.
- Added a specific conda environment file for py2k.
- The default conda environment targets Python3.6.
- The default conda environment targets Python 3.6.
- Improve garbage collector behavior upon exit.
- Added --system-info argument to gtftk.
4 changes: 2 additions & 2 deletions conda/env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ dependencies:
- pandas >=0.23.3
- scipy >=1.1.0
- pybedtools >=0.7.8
- pybigwig >=0.3.10
- pysam >=0.9.1.4
- pyyaml >=3.12
- gcc >=4.8.5
- requests >=2.13.0
Expand All @@ -30,4 +28,6 @@ dependencies:
- plotnine >=0.4.0
- pip:
- future
- pyBigWig >=0.3.12
- future

6 changes: 3 additions & 3 deletions conda/env_py2k.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ dependencies:
- scipy >=1.1.0
- pybedtools >=0.7.8
- pybigwig >=0.3.10
- pysam >=0.9.1.4
- pyyaml >=3.12
- gcc >=4.8.5
- requests >=2.13.0
- cffi >=1.10.0
- pyparsing >=2.2.0
- biopython >=1.69
- zlib >=1.2.11
- matplotlib >=2.0.2
- matplotlib >=2.0.2,<3
- plotnine >=0.4.0
- pip:
- future
- sphinxcontrib-programoutput
- pyBigWig >=0.3.12
- future
6 changes: 4 additions & 2 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ requirements:
- scipy >=1.1.0
- pybedtools >=0.7.8
- pybigwig >=0.3.10
- pysam >=0.9.1.4
- pyyaml >=3.12
- gcc >=4.8.5
- requests >=2.13.0
Expand All @@ -33,6 +32,8 @@ requirements:
- plotnine >=0.4.0
- pip:
- future
- pyBigWig >=0.3.12
- future

run:
- GitPython >=2.1.8
Expand All @@ -46,7 +47,6 @@ requirements:
- scipy >=1.1.0
- pybedtools >=0.7.8
- pybigwig >=0.3.10
- pysam >=0.9.1.4
- pyyaml >=3.12
- gcc >=4.8.5
- requests >=2.13.0
Expand All @@ -58,6 +58,8 @@ requirements:
- plotnine >=0.4.0
- pip:
- future
- pyBigWig >=0.3.12
- future

test:
commands:
Expand Down
12 changes: 6 additions & 6 deletions conda/meta_py2k.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ requirements:
- pandas >=0.23.3
- scipy >=1.1.0
- pybedtools >=0.7.8
- pybigwig >=0.3.10
- pysam >=0.9.1.4
- pyyaml >=3.12
- gcc >=4.8.5
- requests >=2.13.0
- cffi >=1.10.0
- pyparsing >=2.2.0
- biopython >=1.69
- zlib >=1.2.11
- matplotlib >=2.0.2
- matplotlib >=2.0.2,<3
- plotnine >=0.4.0
- pip:
- future
- pybigwig >=0.3.12
- future

run:
- GitPython >=2.1.8
Expand All @@ -45,19 +45,19 @@ requirements:
- pandas >=0.23.3
- scipy >=1.1.0
- pybedtools >=0.7.8
- pybigwig >=0.3.10
- pysam >=0.9.1.4
- pyyaml >=3.12
- gcc >=4.8.5
- requests >=2.13.0
- cffi >=1.10.0
- pyparsing >=2.2.0
- biopython >=1.69
- zlib >=1.2.11
- matplotlib >=2.0.2
- matplotlib >=2.0.2,<3
- plotnine >=0.4.0
- pip:
- future
- pybigwig >=0.3.12
- future

test:
commands:
Expand Down
2 changes: 1 addition & 1 deletion docs/manual/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5bba3f85f3e759061303af1056946e93
config: 3eeb7851cd4315f822ba357e4cc51edd
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/manual/build/html/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.9.2',
VERSION: '0.9.3',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
Expand Down
6 changes: 3 additions & 3 deletions docs/manual/build/html/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>About pygtftk &#8212; gtftk 0.9.2 documentation</title>
<title>About pygtftk &#8212; gtftk 0.9.3 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
Expand Down Expand Up @@ -35,7 +35,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="index.html" title="&lt;no title&gt;"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.3 documentation</a> &#187;</li>
</ul>
</div>

Expand Down Expand Up @@ -199,7 +199,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="index.html" title="&lt;no title&gt;"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.3 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
6 changes: 3 additions & 3 deletions docs/manual/build/html/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Help on Python package (pygtftk) &#8212; gtftk 0.9.2 documentation</title>
<title>Help on Python package (pygtftk) &#8212; gtftk 0.9.3 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
Expand Down Expand Up @@ -35,7 +35,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="presentation.html" title="Help on gtftk Unix commands"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.3 documentation</a> &#187;</li>
</ul>
</div>

Expand Down Expand Up @@ -3265,7 +3265,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="presentation.html" title="Help on gtftk Unix commands"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.3 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
6 changes: 3 additions & 3 deletions docs/manual/build/html/bwig_coverage.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The gtftk.bam.bam_coverage_matrix module &#8212; gtftk 0.9.2 documentation</title>
<title>The gtftk.bam.bam_coverage_matrix module &#8212; gtftk 0.9.3 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
Expand Down Expand Up @@ -35,7 +35,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="api.html" title="Help on Python package (pygtftk)"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.3 documentation</a> &#187;</li>
</ul>
</div>

Expand Down Expand Up @@ -157,7 +157,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="api.html" title="Help on Python package (pygtftk)"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.3 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
6 changes: 3 additions & 3 deletions docs/manual/build/html/developers.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Writing your own commands &#8212; gtftk 0.9.2 documentation</title>
<title>Writing your own commands &#8212; gtftk 0.9.3 documentation</title>
<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
Expand All @@ -31,7 +31,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="bwig_coverage.html" title="The gtftk.bam.bam_coverage_matrix module"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.3 documentation</a> &#187;</li>
</ul>
</div>

Expand Down Expand Up @@ -232,7 +232,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="bwig_coverage.html" title="The gtftk.bam.bam_coverage_matrix module"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">gtftk 0.9.3 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
Binary file modified docs/manual/build/html/example_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_01a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_01b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_04_max_a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_04_max_b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_04b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_06b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_09b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/manual/build/html/example_13.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e3d85a6

Please sign in to comment.