[med-svn] [Git][med-team/python-deeptools][master] 5 commits: New upstream version 3.5.1
Nilesh Patra
gitlab at salsa.debian.org
Thu Apr 22 21:10:39 BST 2021
Nilesh Patra pushed to branch master at Debian Med / python-deeptools
Commits:
efaae4b3 by Nilesh Patra at 2021-04-23T01:33:36+05:30
New upstream version 3.5.1
- - - - -
9b83e558 by Nilesh Patra at 2021-04-23T01:33:51+05:30
Update upstream source from tag 'upstream/3.5.1'
Update to upstream version '3.5.1'
with Debian dir a960579e013391845fbe32386618b2b6336f62e4
- - - - -
63139ee7 by Nilesh Patra at 2021-04-23T01:36:11+05:30
Update versioned B-D
- - - - -
5a3e635b by Nilesh Patra at 2021-04-23T01:36:25+05:30
Declare compliance with policy 4.5.1
- - - - -
64f7c5cc by Nilesh Patra at 2021-04-23T01:37:22+05:30
Update changelog
- - - - -
24 changed files:
- .planemo.sh
- CHANGES.txt
- debian/changelog
- debian/control
- deeptools/_version.py
- deeptools/bamPEFragmentSize.py
- deeptools/computeGCBias.py
- deeptools/computeMatrixOperations.py
- deeptools/correlation.py
- deeptools/correlation_heatmap.py
- deeptools/plotCoverage.py
- deeptools/plotEnrichment.py
- deeptools/plotFingerprint.py
- deeptools/plotHeatmap.py
- deeptools/plotProfile.py
- deeptools/utilities.py
- galaxy/wrapper/computeMatrixOperations.xml
- galaxy/wrapper/deepTools_macros.xml
- galaxy/wrapper/test-data/bamPEFragmentSize_result1.txt
- galaxy/wrapper/test-data/bamPEFragmentSize_table1.txt
- galaxy/wrapper/test-data/plotFingerprint_quality_metrics.tabular
- galaxy/wrapper/test-data/plotPCA_result2.tabular
- requirements.txt
- setup.py
Changes:
=====================================
.planemo.sh
=====================================
@@ -28,5 +28,5 @@ else
fi
planemo lint ${wrappers}
-planemo test --no_dependency_resolution --galaxy_branch release_18.05 --install_galaxy ${wrappers} 2>&1 | grep -v -e "^galaxy" | grep -v -e "^requests"
+planemo test --no_dependency_resolution --galaxy_branch release_20.09 --install_galaxy ${wrappers} 2>&1 | grep -v -e "^galaxy" | grep -v -e "^requests"
test ${PIPESTATUS[0]} -eq 0
=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,14 @@
+3.5.1
+* cmp usage is updated to fit the recent mpl updates.
+* The requirements.txt is updated.
+* "NA" occurences in plotFingerprint.py have been replaced by numpy.NAN (PR #1002)
+* computeMatrixOperations.xml is fixed (brought up in #1003)
+* plotly error is fixed. (issue #1013)
+* relase version is updated in planemo.sh
+* fixed galaxy tests
+* A bug is taken care of in computeMatrixOperations.py / dataRange
+* in plotProfile.py legen location is changed from auto to best (issue #1042)
+
3.5.0
* Fixed a small issue in computeGCBias (issue #969)
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+python-deeptools (3.5.1-1) UNRELEASED; urgency=medium
+
+ * Team Upload.
+ * New upstream version 3.5.1
+ * Update versioned B-D
+ * Declare compliance with policy 4.5.1
+
+ -- Nilesh Patra <nilesh at debian.org> Fri, 23 Apr 2021 01:36:46 +0530
+
python-deeptools (3.5.0-1) unstable; urgency=medium
* New upstream version
=====================================
debian/control
=====================================
@@ -9,15 +9,15 @@ Build-Depends: debhelper-compat (= 13),
python3-setuptools,
python3-numpy,
python3-scipy (>=0.17.0),
- python3-matplotlib (>=2.1.2),
+ python3-matplotlib (>=3.3.0),
python3-pysam (>=0.14.0),
python3-py2bit,
python3-numpydoc,
python3-pybigwig,
- python3-plotly (>=2.0.0),
+ python3-plotly (>=4.9.0),
python3-deeptoolsintervals,
python3-nose <!nocheck>
-Standards-Version: 4.5.0
+Standards-Version: 4.5.1
Vcs-Browser: https://salsa.debian.org/med-team/python-deeptools
Vcs-Git: https://salsa.debian.org/med-team/python-deeptools.git
Homepage: https://github.com/deeptools/deepTools
=====================================
deeptools/_version.py
=====================================
@@ -2,4 +2,4 @@
# This file is originally generated from Git information by running 'setup.py
# version'. Distribution tarballs contain a pre-generated copy of this file.
-__version__ = '3.5.0'
+__version__ = '3.5.1'
=====================================
deeptools/bamPEFragmentSize.py
=====================================
@@ -341,7 +341,7 @@ def main(args=None):
if args.plotFileFormat == 'plotly':
fig = go.Figure()
- fig['data'] = data
+ fig.add_traces(data)
fig['layout']['yaxis1'].update(title='Frequency')
fig['layout']['xaxis1'].update(title='Fragment Length')
fig['layout'].update(title=args.plotTitle)
=====================================
deeptools/computeGCBias.py
=====================================
@@ -571,7 +571,7 @@ def plotlyGCbias(file_name, frequencies, reads_per_gc, region_size):
x = np.linspace(0, 1, frequencies.shape[0])
trace = go.Scatter(x=x, y=np.log2(frequencies[:, 2]), xaxis='x2', yaxis='y2', showlegend=False, line=dict(color='rgb(107,174,214)'))
data.append(trace)
- fig['data'] = data
+ fig.add_traces(data)
fig['layout']['annotations'] = annos
py.plot(fig, filename=file_name, auto_open=False)
=====================================
deeptools/computeMatrixOperations.py
=====================================
@@ -73,7 +73,7 @@ or
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
parents=[infoArgs(), relabelArgs()],
help="Change sample and/or group label information",
- usage='An example usage is:\n computeMatrixOperations relabel -m input.mat.gz -o output.mat.gz --samples "sample 1" "sample 2"\n\n')
+ usage='An example usage is:\n computeMatrixOperations relabel -m input.mat.gz -o output.mat.gz --sampleLabels "sample 1" "sample 2"\n\n')
# subset
subparsers.add_parser(
@@ -795,10 +795,9 @@ def main(args=None):
hm = heatmapper.heatmapper()
if not isinstance(args.matrixFile, list):
hm.read_matrix_file(args.matrixFile)
-
if args.command == 'info':
printInfo(hm)
- if args.command == 'dataRange':
+ elif args.command == 'dataRange':
printDataRange(hm)
elif args.command == 'subset':
sIdx = getSampleBounds(args, hm)
=====================================
deeptools/correlation.py
=====================================
@@ -1,5 +1,6 @@
import sys
import itertools
+import copy
import numpy as np
import scipy.cluster.hierarchy as sch
import scipy.stats
@@ -291,7 +292,7 @@ class Correlation:
link_color_func=lambda k: 'darkred')
axdendro.set_xticks([])
axdendro.set_yticks([])
- cmap = plt.get_cmap(colormap)
+ cmap = copy.copy(plt.get_cmap(colormap))
# this line simply makes a new cmap, based on the original
# colormap that goes from 0.0 to 0.9
@@ -421,7 +422,7 @@ class Correlation:
data[-1]['colorbar'].update(title="log10(instances per bin)", titleside="right")
data[-1].update(showscale=True)
- fig['data'] = data
+ fig.add_traces(data)
fig['layout'].update(title=plot_title, showlegend=False, annotations=annos)
offline.plot(fig, filename=plot_filename, auto_open=False)
@@ -588,7 +589,7 @@ class Correlation:
annos.append({'yanchor': 'bottom', 'xref': 'paper', 'xanchor': 'center', 'yref': 'paper', 'text': 'PCA', 'y': 1.0, 'x': 0.25, 'font': {'size': 16}, 'showarrow': False})
annos.append({'yanchor': 'bottom', 'xref': 'paper', 'xanchor': 'center', 'yref': 'paper', 'text': 'Scree plot', 'y': 1.0, 'x': 0.75, 'font': {'size': 16}, 'showarrow': False})
- fig['data'] = data
+ fig.add_traces(data)
fig['layout']['annotations'] = annos
offline.plot(fig, filename=plotFile, auto_open=False)
=====================================
deeptools/correlation_heatmap.py
=====================================
@@ -6,6 +6,7 @@ import numpy as np
import scipy.cluster.hierarchy as sch
from matplotlib import rcParams
import matplotlib.colors as pltcolors
+import copy
rcParams['pdf.fonttype'] = 42
rcParams['svg.fonttype'] = 'none'
@@ -43,7 +44,7 @@ def plot_correlation(corr_matrix, labels, plotFileName, vmax=None,
link_color_func=lambda k: 'darkred')
axdendro.set_xticks([])
axdendro.set_yticks([])
- cmap = plt.get_cmap(colormap)
+ cmap = copy.copy(plt.get_cmap(colormap))
# this line simply makes a new cmap, based on the original
# colormap that goes from 0.0 to 0.9
=====================================
deeptools/plotCoverage.py
=====================================
@@ -320,7 +320,7 @@ def main(args=None):
# Don't clip plots
y_max = max(y_max)
if args.plotFileFormat == "plotly":
- fig['data'] = data
+ fig.add_traces(data)
fig['layout']['yaxis1'].update(range=[0.0, min(1, y_max + (y_max * 0.10))])
fig['layout']['yaxis2'].update(range=[0.0, 1.0])
py.plot(fig, filename=args.plotFile, auto_open=False)
=====================================
deeptools/plotEnrichment.py
=====================================
@@ -440,7 +440,7 @@ def plotEnrichment(args, featureCounts, totalCounts, features):
ax.set_ylim(0.0, 100.0)
if args.plotFileFormat == 'plotly':
- fig['data'] = data
+ fig.add_traces(data)
py.plot(fig, filename=args.plotFile, auto_open=False)
# colors
else:
=====================================
deeptools/plotFingerprint.py
=====================================
@@ -202,10 +202,10 @@ def getCHANCE(args, idx, mat):
"""
# Get the index of the reference sample
if args.JSDsample not in args.bamfiles:
- return ["NA", "NA", "NA"]
+ return [np.NAN, np.NAN, np.NAN]
refIdx = args.bamfiles.index(args.JSDsample)
if refIdx == idx:
- return ["NA", "NA", "NA"]
+ return [np.NAN, np.NAN, np.NAN]
subMatrix = np.copy(mat[:, [idx, refIdx]])
subMatrix[np.isnan(subMatrix)] = 0
@@ -271,10 +271,10 @@ def getJSD(args, idx, mat):
# Get the index of the reference sample
if args.JSDsample not in args.bamfiles:
- return "NA"
+ return np.NAN
refIdx = args.bamfiles.index(args.JSDsample)
if refIdx == idx:
- return "NA"
+ return np.NAN
# These will hold the coverage histograms
chip = np.zeros(MAXLEN, dtype=np.int)
@@ -338,7 +338,7 @@ def getJSDcommon(chip, input):
if abs(sum(PMFinput) - 1) > 0.01 or abs(sum(PMFchip) - 1) > 0.01:
sys.stderr.write("Warning: At least one PMF integral is significantly different from 1! The JSD will not be returned")
- return "NA"
+ return np.NAN
# Compute the JSD from the PMFs
M = (PMFinput + PMFchip) / 2.0
@@ -430,7 +430,7 @@ def main(args=None):
if args.plotFileFormat == 'plotly':
fig = go.Figure()
- fig['data'] = data
+ fig.add_traces(data)
fig['layout'].update(title=args.plotTitle)
fig['layout']['xaxis1'].update(title="rank")
fig['layout']['yaxis1'].update(title="fraction w.r.t bin with highest coverage")
=====================================
deeptools/plotHeatmap.py
=====================================
@@ -9,17 +9,17 @@ import matplotlib
matplotlib.use('Agg')
matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['svg.fonttype'] = 'none'
-from deeptools import cm # noqa: F401
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
import matplotlib.gridspec as gridspec
from matplotlib import ticker
-
+import copy
import sys
import plotly.offline as py
import plotly.graph_objs as go
# own modules
+from deeptools import cm # noqa: F401
from deeptools import parserCommon
from deeptools import heatmapper
from deeptools.heatmapper_utilities import plot_single, plotly_single
@@ -371,7 +371,7 @@ def plotlyMatrix(hm,
trace.update(zmin=zMinUse, zmax=zMaxUse, colorscale=convertCmap(cmap[0], vmin=zMinUse, vmax=zMaxUse))
dataSummary.extend(dataHeatmap)
- fig['data'] = dataSummary
+ fig.add_traces(dataSummary)
fig['layout']['annotations'] = annos
py.plot(fig, filename=outFilename, auto_open=False)
@@ -477,7 +477,8 @@ def plotMatrix(hm, outFileName,
if colorMapDict['colorMap']:
cmap = []
for color_map in colorMapDict['colorMap']:
- cmap.append(plt.get_cmap(color_map))
+ copy_cmp = copy.copy(plt.get_cmap(color_map))
+ cmap.append(copy_cmp)
cmap[-1].set_bad(colorMapDict['missingDataColor']) # nans are printed using this color
if colorMapDict['colorList'] and len(colorMapDict['colorList']) > 0:
@@ -529,7 +530,6 @@ def plotMatrix(hm, outFileName,
else:
color_list = cmap_plot(np.arange(numgroups) / numgroups)
alpha = colorMapDict['alpha']
-
if image_format == 'plotly':
return plotlyMatrix(hm,
outFileName,
@@ -735,7 +735,7 @@ def plotMatrix(hm, outFileName,
col = sample
ax = fig.add_subplot(grids[-1, col])
tick_locator = ticker.MaxNLocator(nbins=3)
- cbar = fig.colorbar(img, cax=ax, alpha=alpha, orientation='horizontal', ticks=tick_locator)
+ cbar = fig.colorbar(img, cax=ax, orientation='horizontal', ticks=tick_locator)
labels = cbar.ax.get_xticklabels()
ticks = cbar.ax.get_xticks()
if ticks[0] == 0:
@@ -759,7 +759,7 @@ def plotMatrix(hm, outFileName,
grid_start = 0
ax = fig.add_subplot(grids[grid_start:, -1])
- fig.colorbar(img, cax=ax, alpha=alpha)
+ fig.colorbar(img, cax=ax)
if box_around_heatmaps:
plt.subplots_adjust(wspace=0.10, hspace=0.025, top=0.85, bottom=0, left=0.04, right=0.96)
@@ -767,7 +767,7 @@ def plotMatrix(hm, outFileName,
# When no box is plotted the space between heatmaps is reduced
plt.subplots_adjust(wspace=0.05, hspace=0.01, top=0.85, bottom=0, left=0.04, right=0.96)
- plt.savefig(outFileName, bbox_inches='tight', pdd_inches=0, dpi=dpi, format=image_format)
+ plt.savefig(outFileName, bbox_inches='tight', pad_inches=0.1, dpi=dpi, format=image_format)
plt.close()
=====================================
deeptools/plotProfile.py
=====================================
@@ -99,7 +99,7 @@ class Profile(object):
plot_type='lines',
image_format=None,
color_list=None,
- legend_location='auto',
+ legend_location='best',
plots_per_row=8,
label_rotation=0,
dpi=200):
@@ -454,7 +454,7 @@ class Profile(object):
for trace in data:
trace.update(zmin=vmin, zmax=vmax)
- fig['data'] = data
+ fig.add_traces(data)
fig['layout']['annotations'] = annos
py.plot(fig, filename=self.out_file_name, auto_open=False)
@@ -668,7 +668,7 @@ class Profile(object):
zmaxUse = self.y_max[i % len(self.y_max)]
trace.update(zmin=zminUse, zmax=zmaxUse)
- fig['data'] = data
+ fig.add_traces(data)
fig['layout']['annotations'] = annos
py.plot(fig, filename=self.out_file_name, auto_open=False)
@@ -828,15 +828,16 @@ class Profile(object):
yMin = None
yMax = None
for i in range(self.numplots):
- row = rows - i / self.plots_per_row - 1
+ row = np.floor(i / self.plots_per_row)
+ # row = rows - i / self.plots_per_row - 1
col = i % self.plots_per_row
xanchor = 'x{}'.format(i + 1)
yanchor = 'y{}'.format(i + 1)
base = row * (domainHeight + bufferHeight)
domain = [base, base + domainHeight]
titleY = base + domainHeight
- base = col * (domainWidth + bufferWidth)
fig['layout']['yaxis{}'.format(i + 1)] = {'domain': domain, 'title': self.y_axis_label, 'anchor': xanchor, 'autorange': False}
+ base = col * (domainWidth + bufferWidth)
domain = [base, base + domainWidth]
titleX = base + 0.5 * domainWidth
fig['layout']['xaxis{}'.format(i + 1)] = {'domain': domain, 'anchor': yanchor}
@@ -900,7 +901,7 @@ class Profile(object):
yRange[1] = self.y_max[i % len(self.y_max)]
fig['layout'][yaxis].update(range=yRange)
- fig['data'] = data
+ fig.add_traces(data)
fig['layout']['annotations'] = annos
py.plot(fig, filename=self.out_file_name, auto_open=False)
=====================================
deeptools/utilities.py
=====================================
@@ -41,7 +41,7 @@ def convertCmap(c, vmin=0, vmax=1):
h = 1.0 / 254
colorScale = []
for k in range(255):
- C = map(np.uint8, np.array(cmap(k * h)[:3]) * 255)
+ C = list(map(np.uint8, np.array(cmap(k * h)[:3]) * 255))
colorScale.append([k * h, 'rgb' + str((C[0], C[1], C[2]))])
return colorScale
=====================================
galaxy/wrapper/computeMatrixOperations.xml
=====================================
@@ -74,6 +74,7 @@
#else if $submodule.command == "dataRange":
dataRange
-m $submodule.matrixFile
+ > $outFileTxt
#end if
]]>
</command>
@@ -159,7 +160,6 @@
<when value="dataRange">
<param argument="matrixFile" format="deeptools_compute_matrix_archive" type="data"
label="Matrix file from the computeMatrix tool" help=""/>
- </param>
</when>
</conditional>
</inputs>
=====================================
galaxy/wrapper/deepTools_macros.xml
=====================================
@@ -1,10 +1,10 @@
<macros>
<token name="@THREADS@">--numberOfProcessors "\${GALAXY_SLOTS:-4}"</token>
- <token name="@WRAPPER_VERSION@">3.5.0.0</token>
+ <token name="@WRAPPER_VERSION@">3.5.1.0</token>
<xml name="requirements">
<requirements>
- <requirement type="package" version="3.5.0">deeptools</requirement>
+ <requirement type="package" version="3.5.1">deeptools</requirement>
<requirement type="package" version="1.9">samtools</requirement>
</requirements>
<expand macro="stdio" />
=====================================
galaxy/wrapper/test-data/bamPEFragmentSize_result1.txt
=====================================
@@ -12,7 +12,7 @@ Median: 242.0
Max.: 251.0
Std: 4.496912521077347
MAD: 1.0
-Len. 10%: 241.20000000000002
+Len. 10%: 241.2
Len. 20%: 241.4
Len. 30%: 241.6
Len. 40%: 241.8
=====================================
galaxy/wrapper/test-data/bamPEFragmentSize_table1.txt
=====================================
@@ -1,2 +1,2 @@
Frag. Sampled Frag. Len. Min. Frag. Len. 1st. Qu. Frag. Len. Mean Frag. Len. Median Frag. Len. 3rd Qu. Frag. Len. Max Frag. Len. Std. Frag. Med. Abs. Dev. Frag. Len. 10% Frag. Len. 20% Frag. Len. 30% Frag. Len. 40% Frag. Len. 60% Frag. Len. 70% Frag. Len. 80% Frag. Len. 90% Frag. Len. 99% Reads Sampled Read Len. Min. Read Len. 1st. Qu. Read Len. Mean Read Len. Median Read Len. 3rd Qu. Read Len. Max Read Len. Std. Read Med. Abs. Dev. Read Len. 10% Read Len. 20% Read Len. 30% Read Len. 40% Read Len. 60% Read Len. 70% Read Len. 80% Read Len. 90% Read Len. 99%
-bowtie2 test1.bam 3 241.0 241.5 244.66666666666666 242.0 246.5 251.0 4.496912521077347 1.0 241.20000000000002 241.4 241.6 241.8 243.8 245.6 247.4 249.2 250.82 3 251.0 251.0 251.0 251.0 251.0 251.0 0.0 0.0 251.0 251.0 251.0 251.0 251.0 251.0 251.0 251.0 251.0
+bowtie2 test1.bam 3 241.0 241.5 244.66666666666666 242.0 246.5 251.0 4.496912521077347 1.0 241.2 241.4 241.6 241.8 243.8 245.6 247.4 249.2 250.82 3 251.0 251.0 251.0 251.0 251.0 251.0 0.0 0.0 251.0 251.0 251.0 251.0 251.0 251.0 251.0 251.0 251.0
=====================================
galaxy/wrapper/test-data/plotFingerprint_quality_metrics.tabular
=====================================
@@ -1,3 +1,3 @@
Sample AUC Synthetic AUC X-intercept Synthetic X-intercept Elbow Point Synthetic Elbow Point JS Distance Synthetic JS Distance % genome enriched diff. enrichment CHANCE divergence
-bowtie2 test1.bam 0.00493632029863651 0.481650684757865 0.984443061605476 1.1531044350267195e-24 0.9849408836341008 0.5232688298112538 NA 0.26900449806812143 NA NA NA
-bowtie2 test1.bam 0.00493632029863651 0.481650684757865 0.984443061605476 1.1531044350267195e-24 0.9849408836341008 0.5232688298112538 0.0 0.26900449806812143 0 0 0
+bowtie2 test1.bam 0.00493632029863651 0.481650684757865 0.984443061605476 1.1531044350267195e-24 0.9849408836341008 0.5232688298112538 nan 0.2690044980681214 nan nan nan
+bowtie2 test1.bam 0.00493632029863651 0.481650684757865 0.984443061605476 1.1531044350267195e-24 0.9849408836341008 0.5232688298112538 0.0 0.2690044980681214 0 0 0
=====================================
galaxy/wrapper/test-data/plotPCA_result2.tabular
=====================================
@@ -1,4 +1,4 @@
#plotPCA --outFileNameData
Component bowtie2-test1.bam bowtie2-test1.bam Eigenvalue
1 -0.7071067811865476 -0.7071067811865475 4.0
-2 -0.7071067811865475 0.7071067811865476 1.2325951644078315e-32
+2 -0.7071067811865475 0.7071067811865476 2.49319462166397e-32
=====================================
requirements.txt
=====================================
@@ -1,9 +1,9 @@
numpy>=1.9.0
scipy>=0.17.0
-matplotlib>=3.1.0
+matplotlib>=3.3.0
pysam>=0.14.0
py2bit>=0.2.0
numpydoc>=0.5
pyBigWig>=0.2.1
-plotly>=2.0.0
+plotly>=4.9
deeptoolsintervals>=0.1.8
=====================================
setup.py
=====================================
@@ -84,12 +84,12 @@ setup(
install_requires=[
"numpy >= 1.9.0",
"scipy >= 0.17.0",
- "matplotlib >= 3.1.0",
+ "matplotlib >= 3.3.0",
"pysam >= 0.14.0",
"numpydoc >= 0.5",
"pyBigWig >= 0.2.1",
"py2bit >= 0.2.0",
- "plotly >= 2.0.0",
+ "plotly >= 4.9",
"deeptoolsintervals >= 0.1.8"
],
zip_safe=True,
View it on GitLab: https://salsa.debian.org/med-team/python-deeptools/-/compare/778b045cad10a9ffb96c37157678a6b7126f69dc...64f7c5cccd614dd432f2676fbfc88ad92513ade2
--
View it on GitLab: https://salsa.debian.org/med-team/python-deeptools/-/compare/778b045cad10a9ffb96c37157678a6b7126f69dc...64f7c5cccd614dd432f2676fbfc88ad92513ade2
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210422/02ab903b/attachment-0001.htm>
More information about the debian-med-commit
mailing list