[dspchip] r236 committed - typos and bugfixes

1 view
Skip to first unread message

dsp...@googlecode.com

unread,
Feb 11, 2011, 9:45:55 AM2/11/11
to dspchi...@googlegroups.com
Revision: 236
Author: daweonline
Date: Fri Feb 11 06:44:48 2011
Log: typos and bugfixes

http://code.google.com/p/dspchip/source/detail?r=236

Modified:
/trunk/src/dclib/DSP.py
/trunk/src/dclib/IO.py
/trunk/src/dclib/NumAnalysis.py

=======================================
--- /trunk/src/dclib/DSP.py Fri Feb 11 06:15:31 2011
+++ /trunk/src/dclib/DSP.py Fri Feb 11 06:44:48 2011
@@ -188,7 +188,10 @@
data1 = np.append(np.zeros(window / 2), data1)
data2 = np.append(data2, np.zeros(window / 2))
data2 = np.append(np.zeros(window / 2), data2)
- Debug(1, timestring(), "Autocorrelation: window size", expWindow, "step
size:", wstep)
+ if convolve:
+ Debug(1, timestring(), "Convolution: window size", expWindow, "step
size:", wstep)
+ else:
+ Debug(1, timestring(), "Cross-correlation: window size",
expWindow, "step size:", wstep)
if convolve:
# I know I can use -data2 to convolve instead of a separate np call...
but I trust numpy...
y = np.array([np.convolve(data1[x:x+window], data2[x:x+window],
mode='valid') for x in np.arange(0, len(data1) - window, step)]).ravel()
=======================================
--- /trunk/src/dclib/IO.py Fri Feb 11 06:23:44 2011
+++ /trunk/src/dclib/IO.py Fri Feb 11 06:44:48 2011
@@ -762,13 +762,12 @@

if len(error):
# these should be essentially Warnings
- Debug(1, error)
-
- # remove tab file
- os.unlink(gTabName)
-
- # mv the temporary file to previous one
- os.rename(tmpFile, fname)
+ Debug(1, "There was this error, skipping this...", error)
+ else:
+ # remove tab file
+ os.unlink(gTabName)
+ # mv the temporary file to previous one
+ os.rename(tmpFile, fname)


def writeBedGraph(fh, data, options, chrom=None):
=======================================
--- /trunk/src/dclib/NumAnalysis.py Fri Feb 11 06:15:31 2011
+++ /trunk/src/dclib/NumAnalysis.py Fri Feb 11 06:44:48 2011
@@ -189,7 +189,7 @@
Debug(1, timestring(), "Getting maxima and minima")
# We need minima to split peaks later on
# Minima and maxima for original data are when the filter crosses zero
- dataMinMax = DSP.fastZero(sobelFilter + e)
+ dataMinMax = DSP.fastZero(sobelFilter + epsilon)

# Now that we have the data maxima and minima
# we need flexus point that are maxima and minima

Reply all
Reply to author
Forward
0 new messages