Skip to content

Commit c42e74e

Browse files
author
Lucille Delisle
authored
Merge pull request #386 from deeptools/develop
Release 3.7
2 parents 488a6d3 + b832a7b commit c42e74e

File tree

210 files changed

+25607
-922
lines changed

Some content is hidden

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

210 files changed

+25607
-922
lines changed

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# yaml file to configure readthedocs build
22
python:
3-
version: 3.6
3+
version: 3.7
44
setup_py_install: true
55
pip_install: False

.travis.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

README.md

Lines changed: 43 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[![PyPI Version](https://img.shields.io/pypi/v/pyGenomeTracks.svg?style=plastic)](https://pypi.org/project/pyGenomeTracks/) [![bioconda-badge](https://img.shields.io/conda/vn/bioconda/pyGenomeTracks.svg?style=plastic)](https://anaconda.org/bioconda/pygenometracks)
22
[![bioconda-badge](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=plastic)](http://bioconda.github.io)
3-
[![Build Status](https://travis-ci.org/deeptools/pyGenomeTracks.svg?branch=master)](https://travis-ci.org/deeptools/pyGenomeTracks)
3+
[![Build Status on Azure](https://dev.azure.com/wolffj/pyGenomeTracks/_apis/build/status/deeptools.pyGenomeTracks?branchName=master)](https://dev.azure.com/wolffj/pyGenomeTracks/_build/latest?definitionId=2&branchName=master)
44
![Coverage](./docs/coverage.svg)
55
[![European Galaxy server](https://img.shields.io/badge/usegalaxy-.eu-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAASCAYAAABB7B6eAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAACC2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1w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opXIGzRTdjcAupOK09RA6kzr1NTrTj7V1ugM4VgPGWEw+e39CxO6JUw5XhhKihmaDacU2GiR0Ohcc4cZ+Kq3AjlEnEeRSazLs6/9b/kh4eTC+hngE3QQD7Yyclxsrf3cpxsPXn+cFdenF9aqlBXMXaDiEyfyfawBz2RqC/O9WF1ysacOpytlUSoqNrtfbS642+4D4CS9V3xb4u8P/ACI4O810efRu6KsC0QnjHJGaq4IOGUjWTo/YDZDB3xSIxcGyNlWcTucb4T3in/3IaueNrZyX0lGOrWndstOr+w21UlVFokILjJLFhPukbVY8OmwNQ3nZgNJNmKDccusSb4UIe+gtkI+9/bSLJDjqn763f5CQ5TLApmICkqwR0QnUPKZFIUnoozWcQuRbC0Km02knj0tPYx63furGs3x/iPnz83zJDVNtdP3QAAAABJRU5ErkJggg==)](https://usegalaxy.eu/root?tool_id=pygenomeTracks)
66

7-
87
pyGenomeTracks
98
==============
109

@@ -17,10 +16,13 @@ are highly customizable. Currently, it is possible to plot:
1716
* bigwig
1817
* bed/gtf (many options)
1918
* bedgraph
19+
* bedgraph matrices (like TAD-separation scores)
2020
* epilogos
2121
* narrow peaks
22-
* links (represented as arcs)
23-
* Hi-C matrices
22+
* links (represented as arcs, triangles or squares)
23+
* Hi-C matrices (as triangle or squares)
24+
* fasta
25+
* maf (multiple alignment format)
2426

2527
Here is a scheme which describe how pyGenomeTracks is working (graphical abstract of [Lopez-Delisle et al. 2020](https://doi.org/10.1093/bioinformatics/btaa692)):
2628

@@ -33,60 +35,76 @@ pyGenomeTracks from [Ramírez et al. 2017](https://www.nature.com/articles/s4146
3335

3436
Table of content
3537
----------------
36-
* [Installation](#installation)
37-
* [Usage](#usage)
38-
* [Citation](#citation)
39-
* [Documentation](#documentation)
40-
* [External users](#external-users)
41-
4238

39+
* [Installation](#installation)
40+
* [Usage](#usage)
41+
* [Citation](#citation)
42+
* [Documentation](#documentation)
43+
* [External users](#external-users)
4344

4445
Installation
4546
------------
46-
pyGenomeTracks works with python >=3.6.
47+
48+
pyGenomeTracks works with python >=3.7.
4749

4850
The recommended way to install pyGenomeTracks is via conda
4951

5052
```bash
51-
$ conda create -n pygenometracks -c bioconda -c conda-forge pygenometracks python=3.7
53+
conda create -n pygenometracks -c bioconda -c conda-forge pygenometracks python=3.7
5254
```
55+
5356
To get a specific version, one can specify it. For example:
5457

5558
```bash
56-
$ conda create -n pygenometracks -c bioconda -c conda-forge pygenometracks=3.5 python=3.7
59+
conda create -n pygenometracks -c bioconda -c conda-forge pygenometracks=3.5 python=3.7
5760
```
5861

59-
Also, pyGenomeTracks can be installed using pip
62+
However, we noticed that conda installation can be quite slow so using mamba can help.
63+
You first need to create the environment and install mamba:
6064

6165
```bash
62-
$ pip install pyGenomeTracks
66+
conda create -n pygenometracks -c bioconda -c conda-forge mamba python=3.7
6367
```
6468

65-
Since version 3.5, pyGenomeTracks uses BEDTools, don't forget to install it or load it into your environment
69+
Then activate the environment and install pygenometracks with mamba:
6670

71+
```bash
72+
conda activate pygenometracks
73+
mamba install -c defaults -c bioconda -c conda-forge pygenometracks
74+
```
6775

68-
If the latest version wants to be installed use:
76+
or if you want a specific version:
6977

7078
```bash
71-
$ pip install git+https://github.com/deeptools/pyGenomeTracks.git
79+
conda create -n pygenometracks -c bioconda -c conda-forge mamba python=3.7
80+
conda activate pygenometracks
81+
mamba install -c defaults -c bioconda -c conda-forge pygenometracks=3.5
7282
```
7383

84+
Also, pyGenomeTracks can be installed using pip
85+
86+
```bash
87+
pip install pyGenomeTracks
88+
```
89+
90+
Since version 3.5, pyGenomeTracks uses BEDTools, don't forget to install it or load it into your environment.
7491

7592
Usage
7693
-----
94+
7795
To run pyGenomeTracks a configuration file describing the tracks is required. The easiest way to create this file is using the program `make_tracks_file` which creates a configuration file with
7896
defaults that can be easily changed. The format is:
7997

8098
```bash
81-
$ make_tracks_file --trackFiles <file1.bed> <file2.bw> ... -o tracks.ini
99+
make_tracks_file --trackFiles <file1.bed> <file2.bw> ... -o tracks.ini
82100
```
83101

84102
`make_tracks_file` uses the file ending to guess the file type.
85103

86104
Then, a region can be plotted using:
87105

88106
```bash
89-
$ pyGenomeTracks --tracks tracks.ini --region chr2:10,000,000-11,000,000 --outFileName nice_image.pdf
107+
pyGenomeTracks --tracks tracks.ini --region chr2:10,000,000-11,000,000 --outFileName nice_image.pdf
90108
```
91109

92110
The ending `--outFileName` defines the image format. If `.pdf` is used, then the resulting image is a pdf. The options are pdf, png and svg.
@@ -102,8 +120,9 @@ optional arguments:
102120
--region REGION Region to plot, the format is chr:start-end
103121
--BED BED Instead of a region, a file containing the regions to
104122
plot, in BED format, can be given. If this is the
105-
case, multiple files will be created using a prefix
106-
the value of --outFileName
123+
case, multiple files will be created. It will use the
124+
value of --outFileName as a template and put the
125+
coordinates between the file name and the extension.
107126
--width WIDTH figure width in centimeters (default is 40)
108127
--plotWidth PLOTWIDTH
109128
width in centimeters of the plotting (central) part
@@ -136,14 +155,14 @@ optional arguments:
136155
<!--- End of possible arguments of pgt -->
137156

138157
Citation
139-
---------
158+
--------
159+
140160
If you use pyGenomeTracks in your analysis, you can cite the following papers:
141161

142162
Fidel Ramírez, Vivek Bhardwaj, Laura Arrigoni, Kin Chung Lam, Björn A. Grüning, José Villaveces, Bianca Habermann, Asifa Akhtar & Thomas Manke. High-resolution TADs reveal DNA sequences underlying genome organization in flies. Nature Communications (2018) [doi:10.1038/s41467-017-02525-w](https://www.nature.com/articles/s41467-017-02525-w)
143163

144164
Lopez-Delisle L, Rabbani L, Wolff J, Bhardwaj V, Backofen R, Grüning B, Ramírez F, Manke T. pyGenomeTracks: reproducible plots for multivariate genomic data sets. Bioinformatics. 2020 Aug 3:btaa692. [doi: 10.1093/bioinformatics/btaa692](https://doi.org/10.1093/bioinformatics/btaa692). Epub ahead of print. PMID: 32745185.
145165

146-
147166
Documentation
148167
-------------
149168

azure-pipelines.yml

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
pr:
2+
autoCancel: true
3+
4+
stages:
5+
- stage: test
6+
jobs:
7+
- job: Linux
8+
timeoutInMinutes: 0
9+
pool:
10+
vmImage: 'ubuntu-latest'
11+
strategy:
12+
matrix:
13+
Python37LowMatplotlib:
14+
python.version: '3.7'
15+
matplotlib.version: '3.1.1'
16+
Python37HighMatplotlib:
17+
python.version: '3.7'
18+
matplotlib.version: '3.5.1'
19+
Python38LowMatplotlib:
20+
python.version: '3.8'
21+
matplotlib.version: '3.1.1'
22+
Python38HighMatplotlib:
23+
python.version: '3.8'
24+
matplotlib.version: '3.5.1'
25+
Python39HighMatplotlib:
26+
python.version: '3.9'
27+
matplotlib.version: '3.5.1'
28+
29+
steps:
30+
- bash: |
31+
echo "##vso[task.prependpath]$CONDA/bin"
32+
hash -r
33+
displayName: Add conda to PATH
34+
- bash: |
35+
conda config --set always_yes yes --set changeps1 no
36+
conda info -a
37+
cat requirements_CI.txt | awk -v v=$(matplotlib.version) '{if($0~/matplotlib/){$0="matplotlib =="v}; print}' > requirements_CI_updated.txt
38+
conda create -n pygenometracks --yes -c conda-forge -c bioconda python=$(python.version) mamba
39+
source activate pygenometracks
40+
mamba install --yes -c defaults -c conda-forge -c bioconda --file requirements_CI_updated.txt
41+
python setup.py install
42+
displayName: installing dependencies
43+
- script: |
44+
source activate pygenometracks
45+
flake8 . --exclude=.venv,.build,build --ignore=E501,F403,E402,F999,F405,E712,W503
46+
displayName: linting
47+
- script: |
48+
source activate pygenometracks
49+
py.test pygenometracks --doctest-modules -n 4
50+
displayName: pytest
51+
52+
- job: OSX
53+
timeoutInMinutes: 0
54+
pool:
55+
vmImage: 'macOS-11'
56+
strategy:
57+
matrix:
58+
Python37LowMatplotlib:
59+
python.version: '3.7'
60+
matplotlib.version: '3.1.1'
61+
Python37HighMatplotlib:
62+
python.version: '3.7'
63+
matplotlib.version: '3.5.1'
64+
Python38LowMatplotlib:
65+
python.version: '3.8'
66+
matplotlib.version: '3.1.1'
67+
Python38HighMatplotlib:
68+
python.version: '3.8'
69+
matplotlib.version: '3.5.1'
70+
Python39HighMatplotlib:
71+
python.version: '3.9'
72+
matplotlib.version: '3.5.1'
73+
74+
steps:
75+
- bash: |
76+
echo "##vso[task.prependpath]$CONDA/bin"
77+
hash -r
78+
displayName: Add conda to PATH
79+
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
80+
# We need to take ownership if we want to update conda or install packages globally
81+
- bash: sudo chown -R $USER $CONDA
82+
displayName: Take ownership of conda installation
83+
- bash: |
84+
conda config --set always_yes yes --set changeps1 no
85+
conda info -a
86+
cat requirements_CI.txt | awk -v v=$(matplotlib.version) '{if($0~/matplotlib/){$0="matplotlib =="v}; print}' > requirements_CI_updated.txt
87+
conda create -n pygenometracks --yes -c conda-forge -c bioconda python=$(python.version) mamba
88+
source activate pygenometracks
89+
mamba install --yes -c defaults -c conda-forge -c bioconda --file requirements_CI_updated.txt
90+
python setup.py install
91+
displayName: installing dependencies
92+
- script: |
93+
source activate pygenometracks
94+
flake8 . --exclude=.venv,.build,build --ignore=E501,F403,E402,F999,F405,E712,W503
95+
displayName: linting
96+
- script: |
97+
source activate pygenometracks
98+
py.test pygenometracks --doctest-modules -n 4
99+
displayName: pytest
100+
101+
- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/master') }}:
102+
- stage: Deploy
103+
dependsOn: [test]
104+
condition: succeeded()
105+
jobs:
106+
- job: pypi
107+
pool:
108+
vmImage: 'Ubuntu-latest'
109+
container: python:3.8
110+
steps:
111+
- script: |
112+
python setup.py sdist bdist_wheel
113+
python -m pip install --user --upgrade twine
114+
python -m twine upload -r pypi dist/*
115+
env:
116+
TWINE_USERNAME: lldelisle
117+
TWINE_PASSWORD: $(TWINE_LUCILLE_PASSWORD)
118+
displayName: 'Push to Python Package Index'

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,12 @@
2626
MOCK_MODULES = ['pygenometracks.tracksClass', # (required for both)
2727
# For plotTracks in plotTracks
2828
'matplotlib',
29+
'matplotlib.pyplot',
2930
# For plotTracks in utilities
31+
'matplotlib.ticker',
3032
'numpy',
3133
'tqdm',
34+
'pyfaidx',
3235
'intervaltree',
3336
'pybedtools']
3437

@@ -70,7 +73,7 @@ def get_version():
7073
# Add any Sphinx extension module names here, as strings. They can be
7174
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
7275
# ones.
73-
extensions = ['sphinxarg.ext']
76+
extensions = ['sphinx_rtd_theme', 'sphinxarg.ext']
7477

7578
# Add any paths that contain templates here, relative to this directory.
7679
templates_path = ['_templates']

0 commit comments

Comments
 (0)