Hello,
I'm running DE analyses on RNA-Seq data of 4 leukemia patients. by using the 'convert' package and the 'as' function I convert the data to 'ExpressionSet' format. then I run the 'GOexpress' package, but when I reach the 'GO_analyse' function I get the following error:
"Error in aggregate.data.frame(mf[1L], mf[-1L], FUN = FUN, ...) :
no rows to aggregate"
You can see the code I'm running below:
library("DESeq2")
list.files(directory)
sampleFiles<- c("N1.counts","N3.counts",
"L2.counts","L3.counts")
sampleNames <- c("Normal1","Normal3","Leukemia2","Leukemia3")
sampleCondition <- c("control","control","treated","treated")
sampleTable <- data.frame(sampleName = sampleNames,
fileName = sampleFiles,
condition = sampleCondition)
ddsHTSeq <- DESeqDataSetFromHTSeqCount(sampleTable = sampleTable,
design = ~ condition)
library(GOexpress)
data(AlvMac)
AlvMac
library("Biobase")
library(convert)
z=as(ddsHTSeq,'ExpressionSet')
z
AlvMac=z
It does not make any differences in producing error running AlvMac=z or not. I ran the code using #AlvMac=z, but I faced the same error.
head(pData(z))
head(rownames(exprs(z)))
is.factor(z$condition)
z$condition
z$condition <- factor(z$condition)
AlvMac_results <- GO_analyse(eSet = z,
f = "condition",biomart_dataset= "hsapiens_gene_ensembl")
Error in aggregate.data.frame(mf[1L], mf[-1L], FUN = FUN, ...) :
no rows to aggregate
Any idea to help me understand where the problem is or how to solve it would be appreciated.
Thanks, Reza
Hi,
Your code is very difficult to read without appropriate formatting. Please use the online editor to help you format text and code clearly, which helps me help you. See below for a rapid cleanup and comments. Note that you can use
reprex::reprex({...})
to produce code and output that you can copy pasteAlso, I appreciate that you sent me the sample files directly by email, but it would be more helpful for everyone (you, me, other readers) if you could use a publicly available example (e.g.
AlvMac
) to demonstrate the error. Using publicly available data avoids any privacy issue, and allows other people to run the code that you provide to reproduce the error.Below, using local paths specific to your machine makes the example irreproducible. There is no need for this. When you prepare your code, just create a new directory, move there in your own R session, and give us code that works within that directory.
Clear code, but it would be great it used public files or data.
This code is useless in your post if you don't use AlvMac to illustrate your problem.
Good code. Thanks. If you used public data, it would be perfect, no one knows what
z
looks like.Why do you keep switching between
AlvMac
andz
? In yourGOanalyse
example below, the only thing that seems to matter isz
. But again, if you can show me that you can reproduce your error using the publicly availableAlvMac
, then it would be a lot more helpful for me and others to debug your situation.This is the key command that produces your error.
For clarity, it would be better to show the error at this point.