This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Why am I receiving an error with RUVg in RUVseq

I am trying to do an RUV batch correction of an RNA Seq matrix with a set of control genes stored in a vector.

counts: a matrix of integer counts with rownames = gene names and colnames = sample names

housekeeping_genes <- c("a", "b", "c") example of datatype

When I look for length(housekeeping_genes %in% rownames(mrna)) I find all 3 genes in my rownames of my matrix.

However, when I run

set <- newSeqExpressionSet(as.matrix(counts)) 
set1 <- RUVg(x = set, cIdx = housekeeping, k=1)

Nonetheless, I get the error:

Error in RUVg(x = set, cIdx = housekeeping, k = 1) : 
  'cIdx' must contain gene names present in 'x'

Can anyone help me out here? As far as I understand, this should not be occurring.

ruvseq batch-correction rna-seq

what does !all(housekeeping %in% rownames(set)) return?

0 answers

No answers yet.

Log in to answer this question.