Skip to content

Commit 1e274d4

Browse files
authored
Merge pull request #943 from deeptools/develop
changed iteritmes() in estimateEscaleFactor to its python3 compatible items()
2 parents 09963a0 + f6570d1 commit 1e274d4

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

CHANGES.txt

100644100755
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
3.4.3
2+
3+
* Changed iteritems() in estimateEscaleFactor to its python3 compatible items().
4+
* Added the missing argument (--clusterUsingSamples) to plotProfile.
5+
16
3.4.2
27

38
* Programmed around a bug in matplotlib that prevented the plotCorrelation scatter plot from working. See https://bioinformatics.stackexchange.com/questions/12830/plot-correlation-between-several-bam-files/12831
@@ -325,7 +330,7 @@
325330
* bamPEFragmentSize now has -bs and -n options to allow adjusting the number of alignments sampled. Note that the default value is auto-adjusted if the sampling is too sparse.
326331
* bamPEFragmentSize now accepts single-end files.
327332
* The --hclust option to plotProfile and plotHeatmap continues even if one of the groups is too small for plotting (matplotlib will produce a warning that you can ignore). This was issue #280.
328-
333+
329334
2.0.1
330335

331336
* A critical bug that prevented plotPCA from running was fixed.

bin/estimateScaleFactor

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,24 +89,24 @@ def parseArguments(args=None):
8989

9090
def main(args):
9191
"""
92-
The algorithm samples the genome a number of times as specified
92+
The algorithm samples the genome a number of times as specified
9393
by the --numberOfSamples parameter to estimate scaling factors of
94-
betweeen to samples
94+
betweeen to samples
9595
9696
"""
9797
if len(args.bamfiles) > 2:
9898
print("SES method to stimate scale factors only works for two samples")
9999
exit(0)
100100

101101
sys.stderr.write("{:,} number of samples will be computed.\n".format(args.numberOfSamples))
102-
sizeFactorsDict = estimateScaleFactor(args.bamfiles, args.sampleWindowLength,
102+
sizeFactorsDict = estimateScaleFactor(args.bamfiles, args.sampleWindowLength,
103103
args.numberOfSamples,
104104
args.normalizationLength,
105105
numberOfProcessors=args.numberOfProcessors,
106106
chrsToSkip=args.ignoreForNormalization,
107107
verbose=args.verbose)
108108

109-
for k, v in sizeFactorsDict.iteritems():
109+
for k, v in sizeFactorsDict.items():
110110
print("{}: {}".format(k, v))
111111

112112

deeptools/_version.py

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# This file is originally generated from Git information by running 'setup.py
33
# version'. Distribution tarballs contain a pre-generated copy of this file.
44

5-
__version__ = '3.4.2'
5+
__version__ = '3.4.3'

deeptools/parserCommon.py

100644100755
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,14 @@ def heatmapperOptionalArgs(mode=['heatmap', 'profile'][0]):
573573
type=int,
574574
default=8)
575575

576+
optional.add_argument('--clusterUsingSamples',
577+
help='List of sample numbers (order as in '
578+
'matrix), that are used for clustering by '
579+
'--kmeans or --hclust if not given, all samples '
580+
'are taken into account for clustering. '
581+
'Example: --ClusterUsingSamples 1 3',
582+
type=int, nargs='+')
583+
576584
elif mode == 'heatmap':
577585
optional.add_argument(
578586
'--plotType',

deeptools/plotProfile.py

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,12 +909,12 @@ def main(args=None):
909909
filterHeatmapValues(hm, hm.parameters['min threshold'], hm.parameters['max threshold'])
910910

911911
if args.kmeans is not None:
912-
hm.matrix.hmcluster(args.kmeans, method='kmeans')
912+
hm.matrix.hmcluster(args.kmeans, method='kmeans', clustering_samples=args.clusterUsingSamples)
913913
else:
914914
if args.hclust is not None:
915915
print("Performing hierarchical clustering."
916916
"Please note that it might be very slow for large datasets.\n")
917-
hm.matrix.hmcluster(args.hclust, method='hierarchical')
917+
hm.matrix.hmcluster(args.hclust, method='hierarchical', clustering_samples=args.clusterUsingSamples)
918918

919919
group_len_ratio = np.diff(hm.matrix.group_boundaries) / float(len(hm.matrix.regions))
920920
if np.any(group_len_ratio < 5.0 / 1000):

galaxy/wrapper/deepTools_macros.xml

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<macros>
22

33
<token name="@THREADS@">--numberOfProcessors "\${GALAXY_SLOTS:-4}"</token>
4-
<token name="@WRAPPER_VERSION@">3.4.2.0</token>
4+
<token name="@WRAPPER_VERSION@">3.4.3.0</token>
55
<xml name="requirements">
66
<requirements>
7-
<requirement type="package" version="3.4.2">deeptools</requirement>
7+
<requirement type="package" version="3.4.3">deeptools</requirement>
88
<requirement type="package" version="1.9">samtools</requirement>
99
</requirements>
1010
<expand macro="stdio" />

0 commit comments

Comments
 (0)