Hello, as per the title I'm struggling with generating a plot using plotExonJunc
.
The error i'm getting is
Error in order(genes$Start, genes$End) : argument 1 is not a vector
I think the issue is with line 17 of the plotExonJunc
function, it tries to order the genes by order(genes$Start, genes$End)
, however genes$Start/End do not exist, instead the columns are "ExonID" and "GeneID".
Here my code;
library(limma)
library(edgeR)
# generate fake counts matrix
set.seed(25)
y <- matrix(rnbinom(4000,mu=5,size=2),ncol=4)
dge <- DGEList(counts=y, group=rep(1:2,each=2))
# list of Gene IDs
GeneID <- c(rep(74355, 250), rep(18028, 250), rep(75605, 250), rep(75033, 250))
# make fit using voom, voom 'design' defaults to unit vector
v <- voom(dge)
fit <- lmFit(v)
# make diffSplice to plot
ex <- diffSplice(fit, geneid = GeneID, verbose = FALSE)
# plot diffSplice for gene 74355
plotExonJunc(fit = ex, geneid = 74355)
Thanks for any help!
Thanks, this is really appreciated!! Got it working 😊