diffSplice: Error in exon.genes[o, , drop = FALSE] : incorrect number of dimensions
1
0
Entering edit mode
7.3 years ago

I'm trying to run the exon level analysis RNA-seq data according to: https://www.bioconductor.org/help/course-materials/2014/BioC2014/BioC2014_edgeR_voom.html#/38. . However for some reason after running the diffSplice it gives me the error: Error in exon.genes[o, , drop = FALSE] : incorrect number of dimensions. No idea where that might come from. Both geneid and exonid vectors are character vectors as they are supposed to be. Could anyone help with this. The code is shown below:

dge <- DGEList(counts=countdata_merged, samples = coldata, group = coldata$CASE_CONTROL)
dge$genes$GeneID <- GeneID

#Lets do the model matrix

x <- model.matrix(~ CASE_CONTROL + PRE_MID_POST + CASE_CONTROL:subject.nested + CASE_CONTROL:PRE_MID_POST, coldata)
all.zero <- apply(x, 2, function(x) all(x==0))
all.zero

idx <- which(all.zero)
full <- x[,-idx]
design <- full
design
#Lets do some prefiltering if we want to
A <- rowSums(dge$counts)
dge <- dge[A>10, ,keep.lib.sizes=FALSE]

#Lets calculate the calcNormFactors
dge <- calcNormFactors(dge)

#Linear modelling
v <- voom(dge,design,plot=TRUE)
fit <- lmFit(v,design)

# 1)  DiffSplice
ex <- diffSplice(fit, geneid= "GeneID", exonid = "ExonID", verbose=TRUE)

Error in exon.genes[o, , drop = FALSE] : incorrect number of dimensions

diffSplice edgeR voom exon • 3.3k views
ADD COMMENT
1
Entering edit mode

Adding to the previous answer you should make sure that the dge$genes is a data.frame (and not a character vector) that includes the two columns GeneID and ExonID.

ADD REPLY
0
Entering edit mode

I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:

101010 Button

ADD REPLY
0
Entering edit mode

Was this solved, I have a similar issue?

ADD REPLY
2
Entering edit mode
5.4 years ago
Gordon Smyth ★ 7.7k

diffSplice has been used many times and is pretty robust. I am unable to reproduce the error you report even by deliberating giving incorrect input to the function.

I have to assume that there is something wrong with your input data or, possibly, that you have an ancient version of the software. The error would have to arise from manipulating the ID vectors GeneID and ExonID but you don't show us any values for either of them. Can you show the output from head(fit$genes)? That would at least reassure us that the column ExonID exists.

ADD COMMENT

Login before adding your answer.

Traffic: 1725 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6