mccabes292 / actor

5 stars 0 forks source link

Can't find columns `Adipose_Visceral_.Omentum.`, #1

Open hbeale opened 4 years ago

hbeale commented 4 years ago

When I walk through the vignette, I am unable to generate a gene plot; I get the error "Can't find columns Adipose_Visceral_.Omentum., Brain_Putamen_.basal_ganglia. in .data." I assume this is an issue with name formatting, so I try specifying tissues with simple names and I get the error "Error in actorObj$tissuePhi[geneList[i], tissueList] : subscript out of bounds"

Details below. Thanks for your help.

The following code can be run at https://rstudio.cloud/project/964199

library(actor)
set.seed(1994)
m1=actor(isoData,reduceTissue = TRUE) # generates 41 warnings, e.g. 
# 1: In FUN(newX[, i], ...) : no non-missing arguments to max; returning -Inf

m1$numIter=10
m1$numClass=2

fit1=actorFit(m1)

fit1$dirEta
plot(fit1,plotType = "TissueMem")

plot(fit1,plotType = "ClassMem")

makeGenePlots(actorObj=fit1,isoData=isoData,geneList="ENSG00000108797.7")

# error:
# Error: Can't find columns `Adipose_Visceral_.Omentum.`, `Brain_Putamen_.basal_ganglia.` in `.data`.

tissueListA=c("Brain_Amygdala","Brain_Cerebellum","Pancreas","Nerve_Tibial")
makeGenePlots(actorObj=fit1,isoData=isoData,geneList="ENSG00000108797.7",
              tissueList =tissueListA)

# error
# Error in actorObj$tissuePhi[geneList[i], tissueList] : 
#  subscript out of bounds
mccabes292 commented 4 years ago

Thanks for bringing this to my attention! The warnings had been handled internally and were not an issue to the function. These warnings are now suppressed. The issue with the tissue labels has been addressed in the new version of the package and should no longer give an error. Also, the tissueList parameter within makeGenePlots must contain tissues which are within the actor object (fit1). The vignettes have been updated to make this more clear.

Thanks!

jodilee539 commented 4 years ago

Hi there, There seems to be an issue with the new version of makeGenePlots, as when I walk through the vignette, I get:

makeGenePlots(actorObj=fit1,isoData=isoData,geneList="ENSG00000122484.8",tissueList = c("Brain_Amygdala","Brain_Cerebellar_Hemisphere"))

Making Plot for ENSG00000122484.8

Error in actorObj$tissuePhi[geneList[i], tissueList] :

  subscript out of bounds

Thanks for the help!

mccabes292 commented 4 years ago

Are you running the model on your own data or the data provided in the package? It could be that ENSG00000122484.8 is not a gene in the final model. I've added an error message to show if the gene is not able to be plotted. You can check which genes can be plotted by looking at rownames(fit1$posteriorEst) Thanks!

jodilee539 commented 4 years ago

Yes, I am running the model on my own data, which is structured as directed in the vignette, but would it be the case that I need to compare an existing gene within the genes listed in my data? @mccabes292