#### changed computation of rank in patternMarkers

Genevieve Stein-O'Brien authored on 18/04/2018 14:47:50
Showing 1 changed files

 ... ... `@@ -36,7 +36,7 @@ threshold="all", lp=NA, full=FALSE)` 36 36 ` }` 37 37 ` for (i in 1:nP){` 38 38 ` sstat[,i] <- apply(Arowmax, 1, function(x) sqrt(t(x-lp)%*%(x-lp)))` 39 `- ssranks[order(sstat[,i]),i] <- 1:dim(sstat)[1]` 39 `+ ssranks[,i]<-rank(sstat[,i])` 40 40 ` ssgenes[,i]<-names(sort(sstat[,i],decreasing=FALSE,na.last=TRUE))` 41 41 ` }` 42 42 ` }` ... ... `@@ -46,7 +46,8 @@ threshold="all", lp=NA, full=FALSE)` 46 46 ` lp <- rep(0,dim(Amatrix)[2])` 47 47 ` lp[i] <- 1` 48 48 ` sstat[,i] <- unlist(apply(Arowmax, 1, function(x) sqrt(t(x-lp)%*%(x-lp))))` 49 `- ssranks[order(sstat[,i]),i] <- 1:dim(sstat)[1]` 49 `+ #ssranks[order(sstat[,i]),i] <- 1:dim(sstat)[1]` 50 `+ ssranks[,i]<-rank(sstat[,i])` 50 51 ` ssgenes[,i]<-names(sort(sstat[,i],decreasing=FALSE,na.last=TRUE))` 51 52 ` }` 52 53 ` }` ... ... `@@ -59,7 +60,6 @@ threshold="all", lp=NA, full=FALSE)` 59 60 ` pIndx<-unlist(apply(sstat,1,which.min))` 60 61 ` gBYp <- list()` 61 62 ` for(i in sort(unique(pIndx))){` 62 `- #gBYp[[i]]<-names(pIndx[pIndx==i])` 63 63 ` gBYp[[i]]<-sapply(strsplit(names(pIndx[pIndx==i]),"[.]"),function(x) x[[1]][1])` 64 64 ` ` 65 65 ` }`