Trouble following the first 5 lines of vanillaICE tutorial?
2
0
Entering edit mode
@cafelumiere12-7513
Last seen 6.7 years ago
United States

Dear All,

I am trying to analyze CNV from SNP6 data. I've run through crlmm and now trying vanillaICE. At the moment I am just following the exact same lines listed on the vanillaICE tutorial (http://www.bioconductor.org/packages/release/bioc/vignettes/VanillaICE/inst/doc/crlmmDownstream.pdf)

And I got stuck basically at the first 5 lines! It is not obvious to me what I should do about this error. Any suggestion is appreciated. 

Thanks!!

Below is the code ( basically the same as from the tutorial) :

library(oligoClasses)
library(VanillaICE)
library(crlmm)
library(SNPchip)
library(IRanges)
library(foreach)

data(cnSetExample, package="crlmm")

##registerDoSEQ()
library(snow)
library(doSNOW)

cl <- makeCluster(2, type="SOCK")
registerDoSNOW(cl)

ocSamples(2)

se <- as(cnSetExample, "SnpArrayExperiment")

And the above line is where I got the error: 

Error in { : task 1 failed - "could not find function "calculateRTheta""

session info:

R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] doSNOW_1.0.12         iterators_1.0.7       snow_0.3-13           foreach_1.4.2         SNPchip_2.14.0        crlmm_1.26.0         
 [7] preprocessCore_1.30.0 oligoClasses_1.30.0   VanillaICE_1.30.0     GenomicRanges_1.20.3  GenomeInfoDb_1.4.0    IRanges_2.2.1        
[13] S4Vectors_0.6.0       BiocGenerics_0.14.0  

loaded via a namespace (and not attached):
 [1] Rcpp_0.11.6          compiler_3.2.0       BiocInstaller_1.18.2 plyr_1.8.2           XVector_0.8.0        tools_3.2.0          zlibbioc_1.14.0     
 [8] base64_1.1           bit_1.1-12           RSQLite_1.0.0        lattice_0.20-31      ff_2.2-13            Matrix_1.2-0         DBI_0.3.1           
[15] mvtnorm_1.0-2        stringr_1.0.0        Biostrings_2.36.1    grid_3.2.0           Biobase_2.28.0       data.table_1.9.4     ellipse_0.3-8       
[22] VGAM_0.9-8           reshape2_1.4.1       magrittr_1.5         codetools_0.2-11     matrixStats_0.14.0   splines_3.2.0        stringi_0.4-1       
[29] chron_2.3-45         RcppEigen_0.3.2.4.0  illuminaio_0.10.0    affyio_1.36.0 
SNP6 crlmm vanillaice vanillaice crlmm cnv • 1.5k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 22 hours ago
United States

This has to do with functions in crlmm that are not exported. If you try to run the analysis in parallel, you get the error, because the foreach() function is calling on a function that isn't exported from crlmm. If you run on a single processor, then it will work:

library(oligoClasses)
library(VanillaICE)
library(crlmm)
library(SNPchip)
library(IRanges)
library(foreach)

data(cnSetExample, package="crlmm")

> se <- as(cnSetExample, "SnpArrayExperiment")
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Warning message:
executing %dopar% sequentially: no parallel backend registered
> se
class: SnpArrayExperiment
dim: 15000 2
exptData(0):
assays(2): cn baf
rownames(15000): CN_1252892 SNP_A-8325516 ... SNP_A-8296097
  SNP_A-2094900
rowRanges metadata column names(1): isSnp
colnames(2): NA19007 NA19003
colData names(4): SKW SNR gender celFiles

But if we parallelize:

> library(doSNOW)
Loading required package: iterators
>
> cl <- makeCluster(2, type="SOCK")
> registerDoSNOW(cl)
> se <- as(cnSetExample, "SnpArrayExperiment")
Error in { : task 1 failed - "could not find function "calculateRTheta""

So if you are just working through the vignette to see how things work, all you have to do is forgo the parallelization step.

 

ADD COMMENT
0
Entering edit mode

On closer examination, much of the code you have run is actually blocked out in the vignette you are running. If you look at the R script rather than the vignette, you will see that this is the code being run:

library(oligoClasses)
library(VanillaICE)
library(crlmm)
library(SNPchip)
library(IRanges)
library(foreach)
data(cnSetExample, package="crlmm")
registerDoSEQ()
se <- as(cnSetExample, "SnpArrayExperiment")

Which runs without complication.

ADD REPLY
0
Entering edit mode
rscharpf • 0
@rscharpf-7789
Last seen 9.5 years ago

Thanks James for investigating.

I've removed the parallelization discussion entirely from the crlmmDownstream vignette -- it's not needed and seems to be more trouble than it's worth.  I made this change to both the release and devel versions of VanillaICE.  

best-

Rob 

 

 

 

 

 

ADD COMMENT
0
Entering edit mode

Hi Rob,

If you don't need the parallelization in calculateRBafCNSet(), then you should probably remove the part where you use foreach(), because it doesn't work. Otherwise I think you will either have to export calculateRTheta(), or pull processByChromosome() out of calculateRBafCNSet() and export it (processByChromosome, that is).

The problem arises because you are asking foreach() to use unexported functions. Up to last fall, you got around that by using a direct call to calculateRTheta (e.g., crlmm:::calculateRTheta()) within the function processByChromosome(), which is defined inside of calculateRBafCNSet(). But R CMD check will complain bitterly about such things, so Matt got rid of the direct call. Unfortunately, now you are calling an unexported function which fails.

I was going to submit a patch to Benilton (who seems to have the 'main' github repo for crlmm), but since there are three options I didn't know which one you would prefer.

Best,

Jim

 

 

ADD REPLY

Login before adding your answer.

Traffic: 765 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