Skip to content

Commit 7065bdb

Browse files
authored
Merge pull request #229 from deeptools/develop
[WIP] Release 3.4
2 parents a18f3e4 + c58e934 commit 7065bdb

File tree

126 files changed

+58062
-523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+58062
-523
lines changed

.travis.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ jobs:
2929
- LINT=1
3030
- TRAVIS_OS_NAME=linux
3131
before_install:
32-
- curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o
33-
miniconda.sh
32+
- curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
3433
- bash miniconda.sh -b -p $HOME/miniconda
3534
- PATH_WITHOUT_CONDA="$PATH"
3635
- export PATH="$HOME/miniconda/bin:$PATH"
@@ -46,10 +45,10 @@ before_install:
4645
- export TEST_DATA_DIR="`pwd`/pygenometracks/test/test_data/"
4746
- echo $TEST_DATA_DIR
4847
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
49-
curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
48+
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
5049
; fi
51-
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl
52-
https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh
50+
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
51+
curl -L https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh
5352
; fi
5453
- bash miniconda.sh -b -p $HOME/miniconda
5554
- PATH_WITHOUT_CONDA="$PATH"
@@ -60,10 +59,7 @@ before_install:
6059
- conda info -a
6160
install:
6261
- conda install --yes -c bioconda -c conda-forge python=$TRAVIS_PYTHON_VERSION --file requirements.txt
63-
- conda install --yes -c conda-forge -c bioconda pytest
64-
- conda install --yes -c conda-forge -c bioconda nose
65-
- conda install --yes -c conda-forge -c bioconda ghostscript
66-
- conda install --yes pathlib
62+
- conda install --yes -c conda-forge -c bioconda pytest nose ghostscript pathlib
6763
- python setup.py install
6864
script:
6965
- py.test pygenometracks --doctest-modules

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ optional arguments:
112112
By default, the horizontal alignment of the track
113113
labels is left. This alignemnt can be changed to right
114114
or center.
115+
--decreasingXAxis By default, the x-axis is increasing. Use this option
116+
if you want to see all tracks with a decreasing
117+
x-axis.
115118
--version show program's version number and exit
116119
```
117120
<!--- End of possible arguments of pgt -->

docs/conf.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323

2424
# import mock
2525

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

3534
for mod_name in MOCK_MODULES:
3635
sys.modules[mod_name] = Mock()

docs/content/all_default_properties_rst.txt

Lines changed: 62 additions & 55 deletions
Large diffs are not rendered by default.

docs/content/all_possible_properties.txt

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
- **overlay_previous**:
2+
3+
- for *x_axis, epilogos, links, domains, bed, gtf, narrow_peak, bigwig, bedgraph, bedgraph_matrix, hlines, hic_matrix, scalebar, spacer*: no, yes, share-y
4+
15
- **where**:
26

3-
- for *x-axis*: top, bottom
7+
- for *x_axis*: top, bottom
48

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

711
- **orientation**:
812

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

1115
- **links_type**:
1216

@@ -22,35 +26,35 @@
2226

2327
- **merge_transcripts**:
2428

25-
- for *domains, bed*: true, false
29+
- for *domains, bed, gtf*: true, false
2630

2731
- **style**:
2832

29-
- for *bed*: flybase, UCSC, tssarrow
33+
- for *bed, gtf*: flybase, UCSC, tssarrow
3034

3135
- **display**:
3236

33-
- for *bed*: collapsed, triangles, interleaved, stacked
37+
- for *bed, gtf*: collapsed, triangles, interleaved, stacked
3438

3539
- **labels**:
3640

37-
- for *bed*: true, false
41+
- for *bed, gtf*: true, false
3842

3943
- **global_max_row**:
4044

41-
- for *bed*: true, false
45+
- for *bed, gtf*: true, false
4246

4347
- **arrowhead_included**:
4448

45-
- for *bed*: true, false
49+
- for *bed, gtf*: true, false
4650

4751
- **all_labels_inside**:
4852

49-
- for *bed*: true, false
53+
- for *bed, gtf*: true, false
5054

5155
- **labels_in_margin**:
5256

53-
- for *bed*: true, false
57+
- for *bed, gtf*: true, false
5458

5559
- **type**:
5660

@@ -76,6 +80,16 @@
7680

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

83+
- **transform**:
84+
85+
- for *bigwig, bedgraph*: no, log, log1p, -log, log2, log10
86+
87+
- for *hic_matrix*: no, log, log1p, -log
88+
89+
- **y_axis_values**:
90+
91+
- for *bigwig, bedgraph*: original, transformed
92+
7993
- **nans_to_zeros**:
8094

8195
- for *bigwig, bedgraph*: true, false
@@ -96,10 +110,6 @@
96110

97111
- for *bedgraph_matrix*: true, false
98112

99-
- **transform**:
100-
101-
- for *hic_matrix*: no, log, log1p, -log
102-
103113
- **show_masked_bins**:
104114

105115
- for *hic_matrix*: true, false

docs/content/all_tracks.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
All available tracks
2+
====================
3+
4+
5+
:doc:`tracks/bed`
6+
7+
:doc:`tracks/bedgraph`
8+
9+
:doc:`tracks/bedgraph_matrix`
10+
11+
:doc:`tracks/bigwig`
12+
13+
:doc:`tracks/domains`
14+
15+
:doc:`tracks/epilogos`
16+
17+
:doc:`tracks/gtf`
18+
19+
:doc:`tracks/hic_matrix`
20+
21+
:doc:`tracks/hlines`
22+
23+
:doc:`tracks/links`
24+
25+
:doc:`tracks/narrow_peak`
26+
27+
:doc:`tracks/scalebar`
28+
29+
:doc:`tracks/spacer`
30+
31+
:doc:`tracks/x_axis`

docs/content/examples.rst

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Examples
22
========
33

4-
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.
4+
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.
55

66

77
.. contents::
@@ -267,3 +267,46 @@ The configuration file for this image is:
267267
$ pyGenomeTracks --tracks browser_tracks_hic.ini --region X:2500000-3500000 --trackLabelFraction 0.23 --width 38 --dpi 130 -o master_plot_hic.png
268268
269269
270+
Log transform and Operation Examples
271+
--------------------------
272+
273+
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...
274+
275+
.. image:: ../../pygenometracks/tests/test_data/master_operation.png
276+
277+
The configuration file for this image is:
278+
279+
.. literalinclude:: ../../pygenometracks/tests/test_data/operation.ini
280+
:language: INI
281+
282+
.. code:: bash
283+
284+
$ pyGenomeTracks --tracks operation.ini --region X:2700000-3100000 --trackLabelFraction 0.2 --dpi 130 -o master_operation.png
285+
286+
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:
287+
288+
.. image:: ../../pygenometracks/tests/test_data/master_log1p.png
289+
290+
The configuration file for this image is:
291+
292+
.. literalinclude:: ../../pygenometracks/tests/test_data/log1p.ini
293+
:language: INI
294+
295+
.. code:: bash
296+
297+
$ pyGenomeTracks --tracks log1p.ini --region X:2700000-3100000 --trackLabelFraction 0.2 --dpi 130 -o master_log1p.png
298+
299+
With ``operation`` you can also do log transformation however nothing will be written on the left of the y axis:
300+
301+
.. image:: ../../pygenometracks/tests/test_data/master_log.png
302+
303+
The configuration file for this image is:
304+
305+
.. literalinclude:: ../../pygenometracks/tests/test_data/log.ini
306+
:language: INI
307+
308+
.. code:: bash
309+
310+
$ pyGenomeTracks --tracks log.ini --region chr2:73,800,000-75,744,000 --trackLabelFraction 0.2 --width 38 --dpi 130 -o master_log.png
311+
312+

docs/content/releases.rst

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Releases
2+
========
3+
4+
:doc:`releases/3.4`
5+
"""""""""""""""""""
6+
:doc:`releases/3.3`
7+
"""""""""""""""""""
8+
:doc:`releases/3.2.1`
9+
"""""""""""""""""""""
10+
:doc:`releases/3.2`
11+
"""""""""""""""""""
12+
:doc:`releases/3.1.2`
13+
"""""""""""""""""""""
14+
:doc:`releases/3.1.1`
15+
"""""""""""""""""""""
16+
:doc:`releases/3.1`
17+
"""""""""""""""""""
18+
:doc:`releases/3.0`
19+
"""""""""""""""""""
20+
:doc:`releases/2.1`
21+
"""""""""""""""""""
22+
:doc:`releases/2.0`
23+
"""""""""""""""""""
24+
:doc:`releases/1.0`
25+
"""""""""""""""""""
26+
27+
Main changes in configuration files:
28+
Since v3.2:
29+
30+
- there is no more space in the name of the parameters (``line width`` become ``line_width``)
31+
- all on/off, yes/no, 0/1 become true/false
32+
33+
Since v3.4:
34+
35+
- gtf has its own file_type (``file_type = gtf``).
36+
37+
**Warning** in version 4.0 the old configuration files will not work anymore

docs/content/releases/1.0.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
1.0
2+
===
3+
4+
This version added python3 compatibility to the code

docs/content/releases/2.0.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2.0
2+
===
3+
4+
This release makes it **very easy to add new tracks**! See the Readme for examples on how to do that.
5+
6+
Furthermore, this release:
7+
8+
* Adds Hi-C tracks
9+
* Allows a track be plotted over the previous. There is not limit on the tracks that can be plotted on top of each other
10+
* Removed unnecessary empty space around the resulting image
11+
* Enlarged the README.md file with new examples and a mini-tutorial on how to add new tracks.
12+
* Added chromosome name and title to x-axis plot
13+
* Added option to plot links as 'triangles'. This is useful to overlay links with Hi-C data to identify the contact pixel.
14+
* Added line width to bed track
15+
* Added 'bed graph' track
16+
* Added a track that can plot .narrowPeaks

docs/content/releases/2.1.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2.1
2+
===
3+
4+
* Support for epilogos #38
5+
* HiC improvements and migration to use `HiCMatrix <https://github.com/deeptools/HiCMatrix>`_. Thanks to *@joachimwolff* for these changes.
6+
* Different coloring of negative and positive bigwig values is now possible. Thanks to *@Phlya* for this improvement.

docs/content/releases/3.0.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
3.0
2+
===
3+
4+
- support for Python 2 has been removed.
5+
- regions smaller than 200000 can be plotted with a warning message for plotting TADs.
6+
- non existing chromosomes in some or all of the input files can be asked as regions to plot the tracks.

docs/content/releases/3.1.1.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
3.1.1
2+
=====
3+
4+
* small bug fix for summit usage (@lldelisle)
5+
* I added a vertical bar in the narrowPeaks when plotted as box to be able to see the summits (@lldelisle)

docs/content/releases/3.1.2.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
3.1.2
2+
=====
3+
4+
change infos to warnings

docs/content/releases/3.1.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
3.1
2+
===
3+
4+
* add the ability to control alpha of bedgraph tracks (thanks to @mikewolfe)
5+
* add GTF support (thanks to @lldelisle)
6+
* add support for various BED flavors (thanks to @lldelisle)
7+
* adopt codebase to lastest matplotlib changes (thanks to @lldelisle)
8+
* various new tests, code cleanups and smaller fixes all over

docs/content/releases/3.2.1.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
3.2.1
2+
=====
3+
4+
- 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).
5+
6+
7+
**Warning:** In version 4.0 no parameter with space will be accepted.

docs/content/releases/3.2.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
3.2
2+
===
3+
4+
This is a major release with a lot of new features but also some deprecations in preparation for a new 4.0 release.
5+
6+
During the years we have introduced several ways to enable/disable settings.
7+
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.
8+
9+
We also removed all 2/3/4 words items and concatenate them now by ``_`` `#132 <https://github.com/deeptools/pyGenomeTracks/pull/132>`_.
10+
For example ``line width`` is now ``line_width``. Thanks @LeilyR!
11+
12+
A few new features in this release:
13+
14+
* Every config is now checked for syntax errors before anything is executed (@lldelisle)
15+
* Added the possibility to merge transcripts into one single gene representation when using gtf (@lldelisle)
16+
* Added the possibility to rasterize bedgraph plots (@lldelisle)
17+
* Added the possibility to use summary functions on bedgraphs (@lldelisle)
18+
* 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)
19+
* Generate an empty track if a chromosome is missing in bedgraph files (@lldelisle)
20+
* Improved UCSC style for intron arrows (@lldelisle)
21+
* Flybase style now supports color_utr and height_uts (@lldelisle)
22+
* A new tracktype ``hlines`` was added (@lldelisle)
23+
* 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)
24+
* Allow to plot rectangle on a heatmap for loops. Fixed `#47 <https://github.com/deeptools/pyGenomeTracks/issues/47>`_ (@Phlya, @lldelisle)
25+
* A lot of HiC Matrix improvements (@lldelisle)
26+
* The ``alpha`` property can now be used nearly everywhere (@lldelisle)
27+
28+
Also checkout our updated `readme <https://github.com/deeptools/pyGenomeTracks/blob/master/README.md>`_).
29+
30+
Special thanks to @lldelisle & @LeilyR for such a feature-rich release.
31+
32+
Merry Xmas and a happy new year!
33+
Your PGT team!

0 commit comments

Comments
 (0)