I'm learning how to use the BioMM package from Bioconductor just for making some predictions about cancer types based on epigenomic data, but when I follow the tutorial (https://bioconductor.org/packages/devel/bioc/vignettes/BioMM/inst/doc/BioMMtutorial.html) I have a problem with the part of the code that should plot some data: instead of getting the plot I just get an output with this:
posFeature: 50
null device
1
The code I use is exactly the same as the one used in the tutorial:
library(BioMM)
library(BiocParallel)
library(parallel)
library(ranger)
library(rms)
library(glmnet)
library(e1071)
library(pROC)
library(vioplot)
library(variancePartition)
library(CMplot)
## Pathway level data or stage-2 data prepared by reconBySupervised()
stage2dataA <- readRDS(system.file("extdata", "/stage2dataA.rds",
package="BioMM"))
head(stage2dataA[, 1:5])
dim(stage2dataA)
### Alternatively, 'stage2dataA' can be created by the following code:
## Parameters
classifier <- "randForest"
predMode <- "probability"
paramlist <- list(ntree=300, nthreads=40)
param1 <- MulticoreParam(workers = 1)
param2 <- MulticoreParam(workers = 10)
set.seed(123)
## This will take a bit longer to run
stage2dataA <- reconBySupervised(trainDataList=pathlist, testDataList=NULL,
resample="BS", dataMode="allTrain",
repeatA=25, repeatB=1, nfolds=10,
FSmethod=NULL, cutP=0.1, fdr=NULL, FScore=param1,
classifier, predMode, paramlist,
innerCore=param2, outFileA=NULL, outFileB=NULL)
param <- MulticoreParam(workers = 1)
plotVarExplained(data=stage2dataA, posF=TRUE),
core=param, horizontal=FALSE, fileName=NULL)
I have problems too with others visualizations, because code runs but I can't get any plots:
param <- MulticoreParam(workers = 10)
topPath <- plotRankedFeature(data=stage2dataA,
posF=TRUE, topF=10,
blocklist=pathlist,
rankMetric="R2",
colorMetric="size",
core=param, fileName=NULL)
However, I have no problems getting plots from others packages as 'ggplot2', so... please, does someone have any idea about what I'm doing wrong or if something is missing?
Thank you so much.
For the BioMM release version, you could try to run the following line:
Otherwise, you will have to install the 'development' version (which will be released at the end of Oct) using
To plot the ranked pathways (in this tutorial, pathways are considered as the 2nd stage features), you will need to assign the value to the object 'pathlist' at first. See the example at the beginning of the tutorial.
I didn't get "null device" but still haven't got generate a plot using that line:
and I'm not sure if I correctly understood what you said about to assign the value to 'pathlist', but I tried it too with:
and I obtain an error with the ID column in 'featureAnno':
So I'm afraid I'm still stuck...
Could you try this?
For the 'featureAnno', you did not use the correct code, see the following code:
fixed! thank you so much! :D