Previous changeset 2:076ca575208f (2014-02-21) Next changeset 5:17befe9f8b03 (2014-02-24) |
Commit message:
Fixed bug causing fastq input to break - Moved misplaced error check causing fastq inputs to not function |
modified:
hairpinTool.R |
b |
diff -r 076ca575208f -r f8af57d6f60b hairpinTool.R --- a/hairpinTool.R Fri Feb 21 12:52:56 2014 +1100 +++ b/hairpinTool.R Mon Feb 24 14:41:39 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")] |