Mercurial > repos > kyost > atac_primer_tool
comparison find_qPCR_regions.R @ 3:fbfe7b785ea7 draft
Add test for 0 standard deviation.
author | kyost |
---|---|
date | Wed, 02 May 2018 13:20:01 -0400 |
parents | fd3ea97a96bc |
children | 3cd53127a838 |
comparison
equal
deleted
inserted
replaced
2:6f5ce4e865a5 | 3:fbfe7b785ea7 |
---|---|
55 n <- nrow(asplit[[i]])-1 | 55 n <- nrow(asplit[[i]])-1 |
56 m <- ncol(asplit[[i]]) | 56 m <- ncol(asplit[[i]]) |
57 | 57 |
58 a_split <- asplit[[i]] | 58 a_split <- asplit[[i]] |
59 b_split <- bsplit[[i]] | 59 b_split <- bsplit[[i]] |
60 | |
61 if (sd(t(a_split[1,5:m])) == 0 || sd(t(b_split[-1,5:m])) == 0 ){ | |
62 next | |
63 } | |
60 | 64 |
61 #calculate correlation between total peak reads and spanning reads in each window | 65 #calculate correlation between total peak reads and spanning reads in each window |
62 corb <- data.frame(cor(t(a_split[1,5:m]) | 66 corb <- data.frame(cor(t(a_split[1,5:m]) |
63 , t(b_split[-1,5:m]) | 67 , t(b_split[-1,5:m]) |
64 , method = "pearson")) | 68 , method = "pearson")) |