Skip to content

Commit 069652b

Browse files
committed
improve error message of computeGCbias when a DNA sequence containing NNNs is found
1 parent 885aca4 commit 069652b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bin/computeGCBias

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ def getRequiredArgs():
169169

170170
return parser
171171

172+
172173
def getPositionsToSample(chrom, start, end, stepSize):
173174
"""
174175
check if the region submitted to the worker
@@ -257,6 +258,7 @@ def countReadsPerGC_worker(chromNameBam,
257258
gc = getGC_content(tbit[chromNameBit].get(i, i + regionSize))
258259
except Exception as detail:
259260
if verbose:
261+
print "{}:{}-{}".format(chromNameBit, i, i + regionSize)
260262
print detail
261263
continue
262264
numberReads = bam.count(chromNameBam, i, i + regionSize)

deeptools/utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def getGC_content(dnaString, as_fraction=True):
88
if len(dnaString) == 0:
99
return None
1010
if dnaString.count('N') > len(dnaString) * 0.05:
11-
raise Exception("too many NNNs in assembly sequence")
11+
raise Exception("WARNING: too many NNNs present in sequence of length {}".format(len(dnaString)))
1212
return None
1313

1414
gc = 0

0 commit comments

Comments
 (0)