Browse code

changed standard init again

chakalakka authored on 11/02/2016 09:28:05
Showing 3 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: chromstaR
2 2
 Type: Package
3 3
 Title: Analysis of ChIP-Seq data for single and multiple histone modifications
4
-Version: 0.9.3
4
+Version: 0.9.4
5 5
 Date: 2014-05-03
6 6
 Author: Aaron Taudt, Maria Colome Tatche, Matthias Heinig, Minh Anh Nguyen
7 7
 Maintainer: Aaron Taudt <a.s.taudt@umcg.nl>
... ...
@@ -44,6 +44,11 @@
44 44
 #' @export
45 45
 callPeaksUnivariate2 <- function(binned.data, ID, prefit.on.chr, short=TRUE, eps=0.01, init="standard", max.time=NULL, max.iter=NULL, num.trials=1, eps.try=NULL, num.threads=1, read.cutoff=TRUE, read.cutoff.quantile=1, read.cutoff.absolute=500, max.mean=Inf, FDR=0.5, control=FALSE, keep.posteriors=FALSE, keep.densities=FALSE, verbosity=1) {
46 46
 
47
+	if (class(binned.data) == 'character') { 
48
+		message("Loading file ",binned.data)
49
+		binned.data <- get(load(binned.data))
50
+	}
51
+
47 52
 	pre.binned.data <- binned.data[seqnames(binned.data)==prefit.on.chr]
48 53
 	pre.model <- callPeaksUnivariate(pre.binned.data, ID=ID, eps=eps, init=init, max.time=max.time, max.iter=max.iter, num.trials=num.trials, eps.try=eps.try, num.threads=num.threads, read.cutoff=read.cutoff, read.cutoff.quantile=read.cutoff.quantile, read.cutoff.absolute=read.cutoff.absolute, max.mean=max.mean, FDR=FDR, control=control, keep.posteriors=FALSE, keep.densities=FALSE, verbosity=verbosity)
49 54
 
... ...
@@ -116,7 +116,7 @@ void R_univariate_hmm(int* O, int* T, int* N, double* size, double* prob, int* m
116 116
 				else if (i_state == 2)
117 117
 				{
118 118
 					//FILE_LOG(logDEBUG) << "Initializing size and prob for state 2";
119
-					imean = mean+1;
119
+					imean = mean*2;
120 120
 					ivariance = variance*2;
121 121
 				} 
122 122
 				// Make sure variance is greater than mean