diff --git a/MACS2/IO/CallPeakUnit.pyx b/MACS2/IO/CallPeakUnit.pyx index afadf863..79441dbc 100644 --- a/MACS2/IO/CallPeakUnit.pyx +++ b/MACS2/IO/CallPeakUnit.pyx @@ -1,4 +1,4 @@ -# Time-stamp: <2015-04-20 14:21:12 Tao Liu> +# Time-stamp: <2015-04-24 10:05:31 Tao Liu> """Module for Calculate Scores. @@ -216,6 +216,7 @@ cdef float mean_from_value_length ( np.ndarray value, list length ): int32_t tmp_l float tmp_v, sum_v + sum_v = 0 tmp = zip( value, length ) l = sum( length ) @@ -256,7 +257,7 @@ cdef tuple find_optimal_cutoff( list x, list y ): sst = sum( ( npy[:i] - np.mean( npy[:i] ) ) ** 2 ) sse = sum( ( npy[:i] - m*npx[:i] - c ) ** 2 ) rsq = 1 - sse/sst - print i, x[i], y[i], m, c, rsq + #print i, x[i], y[i], m, c, rsq return ( 1.0, 1.0 ) diff --git a/MACS2/OptValidator.py b/MACS2/OptValidator.py index 2a051d09..27f62cfe 100644 --- a/MACS2/OptValidator.py +++ b/MACS2/OptValidator.py @@ -1,4 +1,4 @@ -# Time-stamp: <2015-03-05 13:56:30 Tao Liu> +# Time-stamp: <2015-04-24 17:17:25 Tao Liu> """Module Description @@ -173,10 +173,19 @@ def opt_validate ( options ): )) if options.pvalue: - options.argtxt += "# pvalue cutoff = %.2e\n" % (options.pvalue) - options.argtxt += "# qvalue will not be calculated and reported as -1 in the final output.\n" + if options.broad: + options.argtxt += "# pvalue cutoff for narrow/strong regions = %.2e\n" % (options.pvalue) + options.argtxt += "# pvalue cutoff for broad/weak regions = %.2e\n" % (options.broadcutoff) + options.argtxt += "# qvalue will not be calculated and reported as -1 in the final output.\n" + else: + options.argtxt += "# pvalue cutoff = %.2e\n" % (options.pvalue) + options.argtxt += "# qvalue will not be calculated and reported as -1 in the final output.\n" else: - options.argtxt += "# qvalue cutoff = %.2e\n" % (options.qvalue) + if options.broad: + options.argtxt += "# qvalue cutoff for narrow/strong regions = %.2e\n" % (options.qvalue) + options.argtxt += "# qvalue cutoff for broad/weak regions = %.2e\n" % (options.broadcutoff) + else: + options.argtxt += "# qvalue cutoff = %.2e\n" % (options.qvalue) if options.downsample: options.argtxt += "# Larger dataset will be randomly sampled towards smaller dataset.\n"