# HG changeset patch # User shian_su # Date 1407818547 -36000 # Node ID 8923d4ea858bc21ab68c369ed5a6099c972b4574 # Parent f1076bfb0ed19b094a1ef38850220556a89abb3a - Added check for zero library size, will now filter out zero library size samples and generate report of filtered samples in html output diff -r f1076bfb0ed1 -r 8923d4ea858b hairpinTool.R --- a/hairpinTool.R Wed Jul 30 15:13:45 2014 +1000 +++ b/hairpinTool.R Tue Aug 12 14:42:27 2014 +1000 @@ -404,6 +404,14 @@ data$samples$group <- make.names(data$samples$group) } +# Filter out any samples with zero counts +if (any(data$samples$lib.size == 0)) { + sampleSel <- data$samples$lib.size != 0 + filteredSamples <- paste(data$samples$ID[!sampleSel], collapse=", ") + data$counts <- data$counts[, sampleSel] + data$samples <- data$samples[sampleSel, ] +} + # Filter hairpins with low counts preFilterCount <- nrow(data) sel <- rowSums(cpm(data$counts) > cpmReq) >= sampleReq @@ -791,6 +799,12 @@ ListItem(tempStr) } +if (exists("filteredSamples")) { + tempStr <- paste("The following samples were filtered out for having zero", + "library size: ", filteredSamples) + ListItem(tempStr) +} + if (workMode == "classic") { ListItem("An exact test was performed on each hairpin.") } else if (workMode == "glm") { diff -r f1076bfb0ed1 -r 8923d4ea858b hairpinTool.xml --- a/hairpinTool.xml Wed Jul 30 15:13:45 2014 +1000 +++ b/hairpinTool.xml Tue Aug 12 14:42:27 2014 +1000 @@ -1,4 +1,4 @@ - + Analyse hairpin differential representation using edgeR