Skip to content

Commit ca4d06b

Browse files
committed
computematrix metagene handler
1 parent 31c506a commit ca4d06b

File tree

5 files changed

+740
-150
lines changed

5 files changed

+740
-150
lines changed

deeptools4.0.0_changes.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
- --sortRegions 'no' option no longer exists
44
- Sorting ascend / descend no longer has subsorting by position.
5-
6-
5+
- --quiet / -q option no longer exists.
6+
- bed files in computeMatrix no longer support '#' to define groups.
77

88
# normalization
99

@@ -25,3 +25,4 @@ Exactscaling is no longer an option, it's always performed.
2525
- sortRegions: descend, ascend, keep
2626
- sortUsing: mean, median, max, min, sum, region_length
2727
- averageTypeBins: mean, median, min, max ,std, sum
28+
- skipZeros

pydeeptools/deeptools/computeMatrix.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,6 @@ def process_args(args=None):
379379
def main(args=None):
380380

381381
args = process_args(args)
382-
383382
parameters = {'upstream': args.beforeRegionStartLength,
384383
'downstream': args.afterRegionStartLength,
385384
'body': args.regionBodyLength,

pydeeptools/deeptools/computeMatrix2.py

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ def computeMatrixRequiredArgs(args=None):
7777
metavar='File',
7878
help='File name or names, in BED or GTF format, containing '
7979
'the regions to plot. If multiple bed files are given, each one is considered a '
80-
'group that can be plotted separately. Also, adding a "#" symbol in the bed file '
81-
'causes all the regions until the previous "#" to be considered one group.',
80+
'group that can be plotted separately.',
8281
nargs='+',
8382
required=True)
8483
required.add_argument('--scoreFileName', '-S',
@@ -301,14 +300,6 @@ def computeMatrixOptArgs(case=['scale-regions', 'reference-point'][0]):
301300
'contains a space E.g. --samplesLabel label-1 "label 2" ',
302301
nargs='+')
303302

304-
# in contrast to other tools,
305-
# computeMatrix by default outputs
306-
# messages and the --quiet flag supresses them
307-
optional.add_argument('--quiet', '-q',
308-
help='Set to remove any warning or processing '
309-
'messages.',
310-
action='store_true')
311-
312303
optional.add_argument('--verbose',
313304
help='Being VERY verbose in the status messages. --quiet will disable this.',
314305
action='store_true')
@@ -336,9 +327,6 @@ def process_args(args=None):
336327
parse_arguments().print_help()
337328
sys.exit()
338329

339-
if args.quiet is True:
340-
args.verbose = False
341-
342330
# Ensure before and after region length is positive
343331
if args.beforeRegionStartLength < 0:
344332
print(f"beforeRegionStartLength changed from {args.beforeRegionStartLength} into {abs(args.beforeRegionStartLength)}")
@@ -361,6 +349,10 @@ def process_args(args=None):
361349
args.samplesLabel = []
362350
if not args.sortUsingSamples:
363351
args.sortUsingSamples = []
352+
if not args.minThreshold:
353+
args.minThreshold = 0.0
354+
if not args.maxThreshold:
355+
args.maxThreshold = 0.0
364356
return args
365357

366358

@@ -388,8 +380,7 @@ def main(args=None):
388380
'unscaled 3 prime': args.unscaled3prime
389381
}
390382
# Assert all regions and scores exist
391-
print(parameters)
392-
print(args)
383+
#print(args)
393384
r_computematrix(
394385
args.command,
395386
args.regionsFileName,
@@ -402,7 +393,12 @@ def main(args=None):
402393
args.regionBodyLength,
403394
args.binSize,
404395
args.missingDataAsZero,
396+
args.keepExons, # --metagene or not.
397+
args.scale,
405398
args.nanAfterEnd,
399+
args.skipZeros,
400+
args.minThreshold,
401+
args.maxThreshold,
406402
args.averageTypeBins,
407403
args.sortRegions,
408404
args.sortUsing,

0 commit comments

Comments
 (0)