# HG changeset patch # User shian_su # Date 1393213808 -39600 # Node ID 17befe9f8b033af5026bff9223547ee236e788e1 # Parent f8af57d6f60b6517dcccfac863bca5dc64e46da6# Parent 17fee072622161de169971a34447d435861382f2 Merged branches diff -r 17fee0726221 -r 17befe9f8b03 hairpinTool.R --- a/hairpinTool.R Thu Feb 20 20:55:28 2014 -0500 +++ b/hairpinTool.R Mon Feb 24 14:50:08 2014 +1100 @@ -170,10 +170,6 @@ offenders, " are repeated") } # Check that IDs in sample annotation are unique -if (any(is.na(match(samples$ID, colnames(counts))))) { - stop("not all samples have groups specified") -} # Check that a group has be specifed for each sample - if (inputType=="fastq") { if (any(table(hairpins$ID)>1)){ @@ -182,8 +178,11 @@ stop("ID column of hairpin annotation must have unique values, values ", offenders, " are repeated") } # Check that IDs in hairpin annotation are unique - + } else if (inputType=="counts") { + if (any(is.na(match(samples$ID, colnames(counts))))) { + stop("not all samples have groups specified") + } # Check that a group has be specifed for each sample if (any(table(counts$ID)>1)){ tab <- table(counts$ID) @@ -293,7 +292,7 @@ # Make the names of groups syntactically valid (replace spaces with periods) data$samples$group <- make.names(data$samples$group) -} else { +} else if (inputType=="counts") { # Process counts information, set ID column to be row names rownames(counts) <- counts$ID counts <- counts[ , !(colnames(counts)=="ID")]