visualization problem with BioMM package
0
1
Entering edit mode
parra.sev ▴ 20
@parrasev-23808
Last seen 4.4 years ago

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.

BioMM • 1.0k views
ADD COMMENT
1
Entering edit mode

For the BioMM release version, you could try to run the following line:

plotVarExplained(data=stage2dataA, posF=TRUE, stratify="pathway", core=param, fileName=NULL)

Otherwise, you will have to install the 'development' version (which will be released at the end of Oct) using

BiocManager::install(version='devel')

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.

ADD REPLY
0
Entering edit mode

I didn't get "null device" but still haven't got generate a plot using that line:

plotVarExplained(data=stage2dataA, posF=TRUE, stratify="pathway", core=param, fileName=NULL)

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:

featureAnno <- readRDS(system.file("extdata", "stage2dataA.rds", package="BioMM"))
pathlist <- omics2pathlist(data=stage2dataA, pathlistDBsub, featureAnno)

param <- MulticoreParam(workers = 1)  
plotVarExplained(data=stage2dataA, posF=TRUE, core=param, horizontal=FALSE, fileName=NULL)

and I obtain an error with the ID column in 'featureAnno':

> pathlist <- omics2pathlist(data=stage2dataA, pathlistDBsub, featureAnno)
Error in omics2pathlist(data = stage2dataA, pathlistDBsub, featureAnno) : 
  No 'ID' column in 'featureAnno'!

So I'm afraid I'm still stuck...

ADD REPLY
1
Entering edit mode

Could you try this?

stage2dataA <- readRDS(system.file("extdata", "/stage2dataA.rds",   package="BioMM"))
param <- MulticoreParam(workers = 1) 
plotVarExplained(data=stage2dataA, posF=TRUE, stratify="pathway", core=param, fileName=NULL)

For the 'featureAnno', you did not use the correct code, see the following code:

featureAnno <- readRDS(system.file("extdata", "cpgAnno.rds", package="BioMM"))
ADD REPLY
1
Entering edit mode

fixed! thank you so much! :D

ADD REPLY

Login before adding your answer.

Traffic: 772 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6