Entering edit mode
5.0 years ago
mark.pekarsky
▴
20
Hi, I am trying to follow this ballgown tutorial https://rpubs.com/selveyad/ballgown_tutorial
I do create two ballgown objects, e.g.
bg = ballgown(dataDir = "ballgown", samplePattern = "HI.3923.001.Index", pData = phenodata )
and
bg_filt = subset(bg, "rowVars(texpr(bg)) >1", genomesubset=TRUE)
however when it comes to results_transcripts step I have the following error
results_transcripts <- stattest(bg_filt,
feature="transcript",
covariate="tissue",
adjustvars=c("state"),
getFC = TRUE,
meas = "FPKM")
**Error in stattest(bg_filt, feature = "transcript", covariate = "tissue", :
invalid covariate name**
I thought it is due to the factorisation or smth. but nope, the tissue column is a 2-lvl factor:
str(phenodata)
'data.frame': 12 obs. of 3 variables:
$ id : Factor w/ 12 levels "HI.3923.001.Index_1.1BD1",..: 1 5 6 7 8 9 10 11 12 2 ...
$ tissue: Factor w/ 2 levels "brain","intestine": 1 1 1 1 1 1 2 2 2 2 ...
$ state : Factor w/ 3 levels "control","fasted",..: 1 2 3 1 2 3 3 1 1 2 ...
I wonder, therefore, what is that "covariate name" problem?
Can anyone help me with that? I would be very much obliged. Thank you!
Do you get the same error on the unfiltered
bg
data set? btw this is the code that's generating the error:It's checking if the covariate specified exists in your dataframe. For whatever reason it's not seeing it....