Mercurial > repos > shians > shrnaseq
changeset 5:17befe9f8b03
Merged branches
author | shian_su <registertonysu@gmail.com> |
---|---|
date | Mon, 24 Feb 2014 14:50:08 +1100 |
parents | f8af57d6f60b (diff) 17fee0726221 (current diff) |
children | 3d04308a99f9 |
files | |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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")]