Skip to content

Commit

Permalink
check number of columns in 'counts'
Browse files Browse the repository at this point in the history
  • Loading branch information
lmweber committed Oct 11, 2016
1 parent 4d0d7cb commit 075e908
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/class_RegspliceData.R
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,10 @@ RegspliceData <- function(counts, gene_IDs = NULL, n_exons = NULL, condition = N
}

if (sum(n_exons) != nrow(counts)) {
stop("total number of exons 'sum(n_exons)' does not match number of rows in counts")
stop("total number of exons 'sum(n_exons)' does not match number of rows in 'counts'")
}
if (length(condition) != ncol(counts)) {
stop("number of samples (length of 'condition' vector) does not match number of columns in 'counts'")
}

gene_IDs_rep <- unname(unlist(mapply(rep, gene_IDs, n_exons)))
Expand Down

0 comments on commit 075e908

Please sign in to comment.