Hi,
I am using RUVseq for removing unwanted variation with a number of housekeeping genes as control genes but I got this error:
Error in Ycenter[, cIdx] : invalid subscript type 'list'
This is the code I use:
batchCorrectedSet <- RUVg(as.matrix(countTable), control.genes, k=1)
Also, if I remove "as.matrix" from the command I got this error:
unable to find an inherited method for function ‘RUVg’ for signature ‘"data.frame", "data.frame", "numeric"’
Any help will be appreciated. Thank you.
-A
You have to make sure that all the IDs in the control.genes vector are present in countTable.
You can use the intersect() or the match() functions to ensure that. Something along these lines should work:
Provided that your countTable object has row.names.