Skip to content

Commit c24522b

Browse files
authored
Merge pull request #1295 from deeptools/develop
v3.5.5
2 parents 4a4029b + 5440be3 commit c24522b

37 files changed

+199
-746
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ for contributing to the repository :**
1717

1818
## Testing
1919

20-
* Please make sure that travis tests are passing
20+
* Please make sure that github actions are passing

.github/test_and_build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ channels:
22
- conda-forge
33
- bioconda
44
dependencies:
5-
- python >= 3.7
5+
- python > 3.7
66
- numpy
77
- scipy
88
- flake8

.github/workflows/planemo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
runs-on: ubuntu-latest
5050
strategy:
5151
matrix:
52-
python-version: ['3.7', '3.11']
52+
python-version: ['3.8', '3.11']
5353
steps:
5454
- uses: actions/download-artifact@v3
5555
with:

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,22 @@ jobs:
6363
micromamba activate test_and_build
6464
rm -f dist/*
6565
python -m build
66-
- uses: actions/upload-artifact@master
66+
- uses: actions/upload-artifact@v3
6767
with:
68-
name: "Dist files"
68+
name: "distfiles"
6969
path: "dist"
7070
test-wheels:
7171
name: test wheel
7272
runs-on: ubuntu-latest
7373
needs: build-linux
7474
strategy:
7575
matrix:
76-
python-version: ['3.7','3.8','3.9','3.10', '3.11']
76+
python-version: ['3.8','3.9','3.10', '3.11', '3.12']
7777
steps:
7878
- uses: actions/checkout@v3
7979
- uses: actions/download-artifact@v3
8080
with:
81-
name: "Dist files"
81+
name: "distfiles"
8282
path: ~/dist/
8383
- uses: actions/setup-python@v4
8484
with:

.readthedocs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@ version: 2
33
build:
44
os: ubuntu-22.04
55
tools:
6-
python: "3.11"
6+
python: "3.12"
77

88
sphinx:
99
configuration: docs/conf.py
1010

1111
python:
1212
install:
13+
- method: pip
14+
path: .
1315
- requirements: docs/requirements.txt

CHANGES.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
3.5.5
2+
* drop support for python 3.7
3+
* doc fixes (argparse properly displayed, minor changes in installation instructions)
4+
* deepblue support stops
5+
* initiate deprecation of tight_layout in plotheatmap, in favor of constrained_layout. Minor changes in paddings, etc can occur (but for the better).
6+
* documentation changes to improve ESS tab, table constraints have been lifted & sphinx_rtd_theme to v2.0.0
7+
* upload artifact in gh test runner pinned to 3
8+
* Try to get the number of processors from sched_getaffinity, to avoid using to many in job submissions for example. #1199
9+
* Fix typo in estimateScaleFactor that fixes broken argparsing. #1286
10+
11+
3.5.4
12+
* error handling and cases for bwAverage with >2 samples
13+
* Tick.label deprecation for mpl 3.8
14+
* minimal mpl version is 3.5
15+
* cicd update for pypi push
16+
117
3.5.3
218
* requirement cap for matplotlib lifted (changes in plotting can occur)
319
* nose has been deprecated in favor of pytests

README.md

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat)](http://bioconda.github.io/recipes/deeptools/README.html)
55
[![European Galaxy server](https://img.shields.io/badge/usegalaxy-.eu-brightgreen?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAASCAYAAABB7B6eAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsTAAALEwEAmpwYAAACC2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS40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2GiR0Ohcc4cZ+Kq3AjlEnEeRSazLs6/9b/kh4eTC+hngE3QQD7Yyclxsrf3cpxsPXn+cFdenF9aqlBXMXaDiEyfyfawBz2RqC/O9WF1ysacOpytlUSoqNrtfbS642+4D4CS9V3xb4u8P/ACI4O810efRu6KsC0QnjHJGaq4IOGUjWTo/YDZDB3xSIxcGyNlWcTucb4T3in/3IaueNrZyX0lGOrWndstOr+w21UlVFokILjJLFhPukbVY8OmwNQ3nZgNJNmKDccusSb4UIe+gtkI+9/bSLJDjqn763f5CQ5TLApmICkqwR0QnUPKZFIUnoozWcQuRbC0Km02knj0tPYx63furGs3x/iPnz83zJDVNtdP3QAAAABJRU5ErkJggg==)](https://usegalaxy.eu/root?tool_id=deeptools_compute_matrix)
66
![test](https://github.com/deeptools/deepTools/actions/workflows/test.yml/badge.svg)
7-
![planemo](https://github.com/deeptools/deepTools/actions/workflows/planemo.yml/badge.svg)
87

98

109
## User-friendly tools for exploring deep-sequencing data
@@ -34,35 +33,26 @@ Our [Gallery](http://deeptools.readthedocs.org/en/latest/content/example_gallery
3433

3534
deepTools are available for:
3635

37-
* Command line usage (via pip/anaconda/github)
36+
* Command line usage (via pip / conda / github)
3837
* Integration into Galaxy servers (via toolshed/API/web-browser)
3938

40-
There are many easy ways to install deepTools. Details can be found [here](https://deeptools.readthedocs.io/en/latest/content/installation.html)
39+
There are many easy ways to install deepTools. More details can be found [here](https://deeptools.readthedocs.io/en/latest/content/installation.html).
4140

42-
**Install by cloning this repository:**
41+
In Brief:
4342

44-
You can install any one of the deepTools branches on command line (linux/mac) by cloning this git repository :
43+
**Install through pypi**
4544

46-
$ git clone https://github.com/deeptools/deepTools
47-
$ cd deepTools
48-
$ python setup.py install
49-
50-
By default, the script will install the python library and executable
51-
codes globally, which means you need to be root or administrator of
52-
the machine to complete the installation. If you need to
53-
provide a nonstandard install prefix, or any other nonstandard
54-
options, you can provide many command line options to the install
55-
script.
45+
$ pip install deeptools
5646

57-
$ python setup.py --help
47+
**Install via conda**
5848

59-
For example, to install under a specific location use:
49+
$ conda install -c bioconda deeptools
6050

61-
$ python setup.py install --prefix <target directory>
51+
**Install by cloning the repository**
6252

63-
To install into your home directory, use:
64-
65-
$ python setup.py install --user
53+
$ git clone https://github.com/deeptools/deepTools
54+
$ cd deepTools
55+
$ pip install .
6656

6757
<a name="galaxy"/></a>
6858
### Galaxy Installation

deeptools/alignmentSieve.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,8 @@
77
from deeptools import parserCommon
88
from deeptools.bamHandler import openBam
99
from deeptools.mapReduce import mapReduce
10-
try: # keep python 3.7 support.
11-
from importlib.metadata import version
12-
except ModuleNotFoundError:
13-
from importlib_metadata import version
1410
from deeptools.utilities import getTLen, smartLabels, getTempFileName
11+
from importlib.metadata import version
1512

1613

1714
def parseArguments():

deeptools/bamPEFragmentSize.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
# own tools
1919
from deeptools.parserCommon import writableFile
2020
from deeptools.getFragmentAndReadSize import get_read_and_fragment_length
21-
try: # keep python 3.7 support.
22-
from importlib.metadata import version
23-
except ModuleNotFoundError:
24-
from importlib_metadata import version
21+
from importlib.metadata import version
2522

2623

2724
def parse_arguments():

deeptools/bigwigAverage.py

Lines changed: 3 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
import argparse # to parse command line arguments
3+
import argparse
44
import sys
5-
import multiprocessing
6-
import os
75
import numpy as np
86
from deeptools import parserCommon
97
from deeptools import writeBedGraph_bam_and_bw
10-
import deeptools.deepBlue as db
118

129
debug = 0
1310

1411

1512
def parse_arguments(args=None):
1613
parentParser = parserCommon.getParentArgParse()
1714
outputParser = parserCommon.output()
18-
dbParser = parserCommon.deepBlueOptionalArgs()
1915
parser = argparse.ArgumentParser(
20-
parents=[parentParser, outputParser, dbParser],
16+
parents=[parentParser, outputParser],
2117
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
2218
description='This tool average multiple bigWig files based on the number '
2319
'of mapped reads. To average the bigWig files, the genome is '
@@ -59,7 +55,7 @@ def parse_arguments(args=None):
5955

6056
def getType(fname):
6157
"""
62-
Tries to determine if a file is a wiggle file from deepBlue or a bigWig file.
58+
Tries to determine if a file is a wiggle file a bigWig file.
6359
Returns 'wiggle' if the file name ends with .wig, otherwise 'bigwig'
6460
"""
6561
if fname.endswith(".wig") or fname.endswith(".wiggle"):
@@ -119,29 +115,6 @@ def main(args=None):
119115
FUNC = average
120116
function_args = {'scaleFactors': scaleFactors}
121117

122-
# Preload deepBlue files, which need to then be deleted
123-
deepBlueFiles = []
124-
for idx, fname in enumerate(args.bigwigs):
125-
if db.isDeepBlue(fname):
126-
deepBlueFiles.append([fname, idx])
127-
if len(deepBlueFiles) > 0:
128-
sys.stderr.write("Preloading the following deepBlue files: {}\n".format(",".join([x[0] for x in deepBlueFiles])))
129-
foo = db.deepBlue(deepBlueFiles[0][0], url=args.deepBlueURL, userKey=args.userKey)
130-
regs = db.makeChromTiles(foo)
131-
for x in deepBlueFiles:
132-
x.extend([args, regs])
133-
if len(deepBlueFiles) > 1 and args.numberOfProcessors > 1:
134-
pool = multiprocessing.Pool(args.numberOfProcessors)
135-
res = pool.map_async(db.preloadWrapper, deepBlueFiles).get(9999999)
136-
else:
137-
res = list(map(db.preloadWrapper, deepBlueFiles))
138-
139-
# substitute the file names with the temp files
140-
for (ftuple, r) in zip(deepBlueFiles, res):
141-
args.bigwigs[ftuple[1]] = r
142-
deepBlueFiles = [[x[0], x[1]] for x in deepBlueFiles]
143-
del regs
144-
145118
writeBedGraph_bam_and_bw.writeBedGraph(
146119
[(b, getType(b)) for b in args.bigwigs],
147120
args.outFileName, 0, FUNC,
@@ -154,12 +127,3 @@ def main(args=None):
154127
smoothLength=False,
155128
missingDataAsZero=not args.skipNonCoveredRegions,
156129
extendPairedEnds=False)
157-
158-
# Clean up temporary bigWig files, if applicable
159-
if not args.deepBlueKeepTemp:
160-
for k, v in deepBlueFiles:
161-
os.remove(args.bigwigs[v])
162-
else:
163-
for k, v in deepBlueFiles:
164-
foo = args.bigwigs[v]
165-
print("{} is stored in {}".format(k, foo))

0 commit comments

Comments
 (0)