Skip to content

Commit

Permalink
Merge pull request #229 from deeptools/develop
Browse files Browse the repository at this point in the history
[WIP] Release 3.4
  • Loading branch information
lldelisle authored May 8, 2020
2 parents a18f3e4 + c58e934 commit 7065bdb
Show file tree
Hide file tree
Showing 126 changed files with 58,062 additions and 523 deletions.
14 changes: 5 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ jobs:
- LINT=1
- TRAVIS_OS_NAME=linux
before_install:
- curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o
miniconda.sh
- curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- PATH_WITHOUT_CONDA="$PATH"
- export PATH="$HOME/miniconda/bin:$PATH"
Expand All @@ -46,10 +45,10 @@ before_install:
- export TEST_DATA_DIR="`pwd`/pygenometracks/test/test_data/"
- echo $TEST_DATA_DIR
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl
https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh
; fi
- bash miniconda.sh -b -p $HOME/miniconda
- PATH_WITHOUT_CONDA="$PATH"
Expand All @@ -60,10 +59,7 @@ before_install:
- conda info -a
install:
- conda install --yes -c bioconda -c conda-forge python=$TRAVIS_PYTHON_VERSION --file requirements.txt
- conda install --yes -c conda-forge -c bioconda pytest
- conda install --yes -c conda-forge -c bioconda nose
- conda install --yes -c conda-forge -c bioconda ghostscript
- conda install --yes pathlib
- conda install --yes -c conda-forge -c bioconda pytest nose ghostscript pathlib
- python setup.py install
script:
- py.test pygenometracks --doctest-modules
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ optional arguments:
By default, the horizontal alignment of the track
labels is left. This alignemnt can be changed to right
or center.
--decreasingXAxis By default, the x-axis is increasing. Use this option
if you want to see all tracks with a decreasing
x-axis.
--version show program's version number and exit
```
<!--- End of possible arguments of pgt -->
Expand Down
15 changes: 7 additions & 8 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@

# import mock

MOCK_MODULES = ['numpy', 'numpy.core', 'numpy.core.multiarray', 'numpy.distutils.core', 'pandas', 'pysam', 'intervaltree',
'scipy', 'scipy.sparse', 'scipy.stats', 'scipy.ndimage', 'scipy.special',
'matplotlib', 'matplotlib.pyplot', 'matplotlib.gridspec', 'matplotlib.ticker',
'matplotlib.textpath', 'matplotlib.patches', 'matplotlib.colors', 'matplotlib.cm',
'mpl_toolkits', 'mpl_toolkits.axisartist', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid1',
'Bio', 'Bio.Seq', 'Bio.Alphabet', 'pyBigWig', 'tables', 'pytables', 'future', 'past', 'past.builtins',
'future.utils', 'cooler', 'logging', 'unidecode', 'hic2cool', 'hicmatrix', 'hicmatrix.HiCMatrix',
'hicmatrix.lib', 'pybedtools']
MOCK_MODULES = ['pygenometracks.tracksClass', # (required for both)
# For plotTracks in plotTracks
'matplotlib',
# For plotTracks in utilities
'numpy',
'tqdm',
'intervaltree']

for mod_name in MOCK_MODULES:
sys.modules[mod_name] = Mock()
Expand Down
117 changes: 62 additions & 55 deletions docs/content/all_default_properties_rst.txt

Large diffs are not rendered by default.

38 changes: 24 additions & 14 deletions docs/content/all_possible_properties.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
- **overlay_previous**:

- for *x_axis, epilogos, links, domains, bed, gtf, narrow_peak, bigwig, bedgraph, bedgraph_matrix, hlines, hic_matrix, scalebar, spacer*: no, yes, share-y

- **where**:

- for *x-axis*: top, bottom
- for *x_axis*: top, bottom

- for *scalebar*: left, right, top, bottom

- **orientation**:

- for *epilogos, links, domains, bed, narrow_peak, bigwig, bedgraph, bedgraph_matrix, hlines, hic_matrix*: inverted, not set
- for *epilogos, links, domains, bed, gtf, narrow_peak, bigwig, bedgraph, bedgraph_matrix, hlines, hic_matrix*: inverted, not set

- **links_type**:

Expand All @@ -22,35 +26,35 @@

- **merge_transcripts**:

- for *domains, bed*: true, false
- for *domains, bed, gtf*: true, false

- **style**:

- for *bed*: flybase, UCSC, tssarrow
- for *bed, gtf*: flybase, UCSC, tssarrow

- **display**:

- for *bed*: collapsed, triangles, interleaved, stacked
- for *bed, gtf*: collapsed, triangles, interleaved, stacked

- **labels**:

- for *bed*: true, false
- for *bed, gtf*: true, false

- **global_max_row**:

- for *bed*: true, false
- for *bed, gtf*: true, false

- **arrowhead_included**:

- for *bed*: true, false
- for *bed, gtf*: true, false

- **all_labels_inside**:

- for *bed*: true, false
- for *bed, gtf*: true, false

- **labels_in_margin**:

- for *bed*: true, false
- for *bed, gtf*: true, false

- **type**:

Expand All @@ -76,6 +80,16 @@

- for *bedgraph*: mean, average, max, min, stdev, dev, coverage, cov, sum, not set

- **transform**:

- for *bigwig, bedgraph*: no, log, log1p, -log, log2, log10

- for *hic_matrix*: no, log, log1p, -log

- **y_axis_values**:

- for *bigwig, bedgraph*: original, transformed

- **nans_to_zeros**:

- for *bigwig, bedgraph*: true, false
Expand All @@ -96,10 +110,6 @@

- for *bedgraph_matrix*: true, false

- **transform**:

- for *hic_matrix*: no, log, log1p, -log

- **show_masked_bins**:

- for *hic_matrix*: true, false
Expand Down
31 changes: 31 additions & 0 deletions docs/content/all_tracks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
All available tracks
====================


:doc:`tracks/bed`

:doc:`tracks/bedgraph`

:doc:`tracks/bedgraph_matrix`

:doc:`tracks/bigwig`

:doc:`tracks/domains`

:doc:`tracks/epilogos`

:doc:`tracks/gtf`

:doc:`tracks/hic_matrix`

:doc:`tracks/hlines`

:doc:`tracks/links`

:doc:`tracks/narrow_peak`

:doc:`tracks/scalebar`

:doc:`tracks/spacer`

:doc:`tracks/x_axis`
45 changes: 44 additions & 1 deletion docs/content/examples.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Examples
========

These examples and the input data for these examples can found in the `examples/ <https://github.com/deeptools/pyGenomeTracks/tree/master/examples>`_ or `test_data/ <https://github.com/deeptools/pyGenomeTracks/tree/master/tests/test_data>`_ folders of the github repository.
These examples and the input data for these examples can found in the `examples/ <https://github.com/deeptools/pyGenomeTracks/tree/master/examples>`_ or `test_data/ <https://github.com/deeptools/pyGenomeTracks/tree/master/pygenometracks/tests/test_data>`_ folders of the github repository.


.. contents::
Expand Down Expand Up @@ -267,3 +267,46 @@ The configuration file for this image is:
$ pyGenomeTracks --tracks browser_tracks_hic.ini --region X:2500000-3500000 --trackLabelFraction 0.23 --width 38 --dpi 130 -o master_plot_hic.png
Log transform and Operation Examples
--------------------------

With the parameter ``operation`` you can make operations between one or two files (here two bigwig files but this is also working with two bedgraph files). For example, difference, log ratio, scaling...

.. image:: ../../pygenometracks/tests/test_data/master_operation.png

The configuration file for this image is:

.. literalinclude:: ../../pygenometracks/tests/test_data/operation.ini
:language: INI

.. code:: bash
$ pyGenomeTracks --tracks operation.ini --region X:2700000-3100000 --trackLabelFraction 0.2 --dpi 130 -o master_operation.png
With the parameter ``transformation`` you can log transform your data and decide to put on the y axis either the transformed values or the original values:

.. image:: ../../pygenometracks/tests/test_data/master_log1p.png

The configuration file for this image is:

.. literalinclude:: ../../pygenometracks/tests/test_data/log1p.ini
:language: INI

.. code:: bash
$ pyGenomeTracks --tracks log1p.ini --region X:2700000-3100000 --trackLabelFraction 0.2 --dpi 130 -o master_log1p.png
With ``operation`` you can also do log transformation however nothing will be written on the left of the y axis:

.. image:: ../../pygenometracks/tests/test_data/master_log.png

The configuration file for this image is:

.. literalinclude:: ../../pygenometracks/tests/test_data/log.ini
:language: INI

.. code:: bash
$ pyGenomeTracks --tracks log.ini --region chr2:73,800,000-75,744,000 --trackLabelFraction 0.2 --width 38 --dpi 130 -o master_log.png
37 changes: 37 additions & 0 deletions docs/content/releases.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Releases
========

:doc:`releases/3.4`
"""""""""""""""""""
:doc:`releases/3.3`
"""""""""""""""""""
:doc:`releases/3.2.1`
"""""""""""""""""""""
:doc:`releases/3.2`
"""""""""""""""""""
:doc:`releases/3.1.2`
"""""""""""""""""""""
:doc:`releases/3.1.1`
"""""""""""""""""""""
:doc:`releases/3.1`
"""""""""""""""""""
:doc:`releases/3.0`
"""""""""""""""""""
:doc:`releases/2.1`
"""""""""""""""""""
:doc:`releases/2.0`
"""""""""""""""""""
:doc:`releases/1.0`
"""""""""""""""""""

Main changes in configuration files:
Since v3.2:

- there is no more space in the name of the parameters (``line width`` become ``line_width``)
- all on/off, yes/no, 0/1 become true/false

Since v3.4:

- gtf has its own file_type (``file_type = gtf``).

**Warning** in version 4.0 the old configuration files will not work anymore
4 changes: 4 additions & 0 deletions docs/content/releases/1.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
1.0
===

This version added python3 compatibility to the code
16 changes: 16 additions & 0 deletions docs/content/releases/2.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
2.0
===

This release makes it **very easy to add new tracks**! See the Readme for examples on how to do that.

Furthermore, this release:

* Adds Hi-C tracks
* Allows a track be plotted over the previous. There is not limit on the tracks that can be plotted on top of each other
* Removed unnecessary empty space around the resulting image
* Enlarged the README.md file with new examples and a mini-tutorial on how to add new tracks.
* Added chromosome name and title to x-axis plot
* Added option to plot links as 'triangles'. This is useful to overlay links with Hi-C data to identify the contact pixel.
* Added line width to bed track
* Added 'bed graph' track
* Added a track that can plot .narrowPeaks
6 changes: 6 additions & 0 deletions docs/content/releases/2.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
2.1
===

* Support for epilogos #38
* HiC improvements and migration to use `HiCMatrix <https://github.com/deeptools/HiCMatrix>`_. Thanks to *@joachimwolff* for these changes.
* Different coloring of negative and positive bigwig values is now possible. Thanks to *@Phlya* for this improvement.
6 changes: 6 additions & 0 deletions docs/content/releases/3.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
3.0
===

- support for Python 2 has been removed.
- regions smaller than 200000 can be plotted with a warning message for plotting TADs.
- non existing chromosomes in some or all of the input files can be asked as regions to plot the tracks.
5 changes: 5 additions & 0 deletions docs/content/releases/3.1.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
3.1.1
=====

* small bug fix for summit usage (@lldelisle)
* I added a vertical bar in the narrowPeaks when plotted as box to be able to see the summits (@lldelisle)
4 changes: 4 additions & 0 deletions docs/content/releases/3.1.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
3.1.2
=====

change infos to warnings
8 changes: 8 additions & 0 deletions docs/content/releases/3.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
3.1
===

* add the ability to control alpha of bedgraph tracks (thanks to @mikewolfe)
* add GTF support (thanks to @lldelisle)
* add support for various BED flavors (thanks to @lldelisle)
* adopt codebase to lastest matplotlib changes (thanks to @lldelisle)
* various new tests, code cleanups and smaller fixes all over
7 changes: 7 additions & 0 deletions docs/content/releases/3.2.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3.2.1
=====

- Small bug fix in parser when the parameter had spaces in the name and was a boolean (for example show data range instead of show_data_range).


**Warning:** In version 4.0 no parameter with space will be accepted.
33 changes: 33 additions & 0 deletions docs/content/releases/3.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
3.2
===

This is a major release with a lot of new features but also some deprecations in preparation for a new 4.0 release.

During the years we have introduced several ways to enable/disable settings.
We have used on/off, yes/no, 0/1, true/false. From now on we recommend to only use true/false so that we can unify our config files and make it more intuitive for all pgt-users.

We also removed all 2/3/4 words items and concatenate them now by ``_`` `#132 <https://github.com/deeptools/pyGenomeTracks/pull/132>`_.
For example ``line width`` is now ``line_width``. Thanks @LeilyR!

A few new features in this release:

* Every config is now checked for syntax errors before anything is executed (@lldelisle)
* Added the possibility to merge transcripts into one single gene representation when using gtf (@lldelisle)
* Added the possibility to rasterize bedgraph plots (@lldelisle)
* Added the possibility to use summary functions on bedgraphs (@lldelisle)
* Generate an empty track if a requested region is not in the given track-files. Fixed `#120 <https://github.com/deeptools/pyGenomeTracks/issues/120>`_ (@LeilyR)
* Generate an empty track if a chromosome is missing in bedgraph files (@lldelisle)
* Improved UCSC style for intron arrows (@lldelisle)
* Flybase style now supports color_utr and height_uts (@lldelisle)
* A new tracktype ``hlines`` was added (@lldelisle)
* Allow to plot the arcs of the links with a color scale based on scores as proposed in `#30 <https://github.com/deeptools/pyGenomeTracks/issues/30>`_ (@lldelisle)
* Allow to plot rectangle on a heatmap for loops. Fixed `#47 <https://github.com/deeptools/pyGenomeTracks/issues/47>`_ (@Phlya, @lldelisle)
* A lot of HiC Matrix improvements (@lldelisle)
* The ``alpha`` property can now be used nearly everywhere (@lldelisle)

Also checkout our updated `readme <https://github.com/deeptools/pyGenomeTracks/blob/master/README.md>`_).

Special thanks to @lldelisle & @LeilyR for such a feature-rich release.

Merry Xmas and a happy new year!
Your PGT team!
Loading

0 comments on commit 7065bdb

Please sign in to comment.