summaryrefslogtreecommitdiff
path: root/Code/correlation_per_tissue.R
diff options
context:
space:
mode:
Diffstat (limited to 'Code/correlation_per_tissue.R')
-rw-r--r--Code/correlation_per_tissue.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/Code/correlation_per_tissue.R b/Code/correlation_per_tissue.R
index d9aadf9..0a16d4f 100644
--- a/Code/correlation_per_tissue.R
+++ b/Code/correlation_per_tissue.R
@@ -77,7 +77,7 @@ for (ul in unique.label) {
X <- as.matrix(X0[, index.rnaseq])
sd.1 <- apply(X, 1, sd) # sd of each row
s0 <- apply(X, 1, function(c) sum(c==0)) # number of zeros in each row
- sd.tau <- (quantile(sd.1)[1] + quantile(sd.1)[2]) / 2.0 # min SD
+ sd.tau <- (quantile(sd.1, na.rm=TRUE)[1] + quantile(sd.1, na.rm=TRUE)[2]) / 2.0 # min SD
good <- sd.1 > max(sd.tau, 0.05)
tf_good <- which( good & (all_genes %in% tfs) == T )
target_good <- which( good & (all_genes %in% targets) == T )