diff 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
line wrap: on
line diff
--- a/find_qPCR_regions.R	Sat Apr 28 19:45:57 2018 -0400
+++ b/find_qPCR_regions.R	Wed May 02 13:20:01 2018 -0400
@@ -57,6 +57,10 @@
 	
 	a_split <- asplit[[i]]
 	b_split <- bsplit[[i]]
+	
+	if (sd(t(a_split[1,5:m])) == 0 || sd(t(b_split[-1,5:m])) == 0 ){
+		next
+	}
 
 	#calculate correlation between total peak reads and spanning reads in each window
     corb <- data.frame(cor(t(a_split[1,5:m])