Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parallel run (nCores > 1) always fails #39

Open
slowsmile opened this issue Dec 13, 2018 · 1 comment
Open

parallel run (nCores > 1) always fails #39

slowsmile opened this issue Dec 13, 2018 · 1 comment

Comments

@slowsmile
Copy link

Dear JunctionSeq author
I am running the JunctionSeq on both the test dataset that comes with the package and my own dataset, the function runs well with the default option of nCores = 1 , however when I specified nCores > 1, the function "runJunctionSeqAnalyses" always fails with the error reported as length of 'dimnames' [2] not equal to array extent

my code of running this function on test dataset is below

require("JunctionSeq")

decoder.file <- system.file("extdata/annoFiles/decoder.bySample.txt", package="JctSeqData", mustWork=TRUE);
decoder <- read.table(decoder.file, header = TRUE, stringsAsFactors = FALSE);
gff.file <- system.file("extdata/cts/withNovel.forJunctionSeq.gff.gz", package = "JctSeqData", mustWork = TRUE);

countFiles <- system.file(paste0("extdata/cts/", decoder$sample.ID, "/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz"),
                          package = "JctSeqData", mustWork = TRUE);

jscs <- runJunctionSeqAnalyses(sample.files = countFiles, sample.names = decoder$sample.ID, condition=factor(decoder$group.ID),
                               flat.gff.file = gff.file, nCores = 3, analysis.type = "junctionsAndExons");

then I got the following error

 STARTING runJunctionSeqAnalyses (v1.5.4) (Thu Dec 13 16:47:11 2018)
> rJSA: sample.files:  /home/xxu1/R/x86_64-pc-linux-gnu-library/3.5/JctSeqData/extdata/cts/SAMP2/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz, /home/xxu1/R/x86_64-pc-linux-gnu-library/3.5/JctSeqData/extdata/cts/SAMP3/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz, /home/xxu1/R/x86_64-pc-linux-gnu-library/3.5/JctSeqData/extdata/cts/SAMP4/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz, /home/xxu1/R/x86_64-pc-linux-gnu-library/3.5/JctSeqData/extdata/cts/SAMP5/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz, /home/xxu1/R/x86_64-pc-linux-gnu-library/3.5/JctSeqData/extdata/cts/SAMP6/QC.spliceJunctionAndExonCounts.withNovel.forJunctionSeq.txt.gz
> rJSA: sample.names:  SAMP1, SAMP2, SAMP3, SAMP4, SAMP5, SAMP6
> rJSA: condition:  CASE, CASE, CASE, CTRL, CTRL, CTRL
> rJSA: analysis.type:  junctionsAndExons
> rJSA: use.junctions:  TRUE
> rJSA: use.novel.junctions:  TRUE
> rJSA: use.exons:  TRUE
> rJSA: nCores:  3
> rJSA: use.covars:
> rJSA: test.formula0:  ~ sample + countbin
> rJSA: test.formula1:  ~ sample + countbin + condition:countbin
> rJSA: use.multigene.aggregates:  FALSE
> rJSA: Reading Count files... Thu Dec 13 16:47:11 2018.
-> STARTING readJunctionSeqCounts (Thu Dec 13 16:47:11 2018)
---> RJSC; (v1.5.4)
---> RJSC: samplenames: SAMP1,SAMP2,SAMP3,SAMP4,SAMP5,SAMP6
---> RJSC: flat.gff.file: /home/xxu1/R/x86_64-pc-linux-gnu-library/3.5/JctSeqData/extdata/cts/withNovel.forJunctionSeq.gff.gz
---> RJSC: use.exons:TRUE
---> RJSC: use.junctions:TRUE
---> RJSC: use.novel.junctions:TRUE
---> File read complete.
---> Extracted counts. Found 16167 features so far.
Error in dimnames(x) <- dn :
  length of 'dimnames' [2] not equal to array extent

below is my sessionInfo()

R version 3.5.0 (2018-04-23) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Scientific Linux 7.4 (Nitrogen) Matrix products: default BLAS/LAPACK: /apps/prod/easybuild/sl7.x86_64/software/OpenBLAS/0.2.20-GCC-6.4.0-2.28/lib/libopenblasp-r0.2.20.so locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] JunctionSeq_1.10.0 RcppArmadillo_0.9.200.5.0 Rcpp_1.0.0 SummarizedExperiment_1.10.1 [5] DelayedArray_0.6.0 BiocParallel_1.14.2 matrixStats_0.54.0 Biobase_2.40.0 [9] GenomicRanges_1.32.7 GenomeInfoDb_1.16.0 IRanges_2.14.12 S4Vectors_0.18.3 [13] BiocGenerics_0.26.0 loaded via a namespace (and not attached): [1] bit64_0.9-7 splines_3.5.0 Formula_1.2-3 assertthat_0.2.0 statmod_1.4.30 [6] latticeExtra_0.6-28 blob_1.1.1 GenomeInfoDbData_1.1.0 yaml_2.1.19 pillar_1.2.2 [11] RSQLite_2.1.1 backports_1.1.2 lattice_0.20-35 glue_1.3.0 digest_0.6.18 [16] RColorBrewer_1.1-2 XVector_0.20.0 checkmate_1.8.5 colorspace_1.3-2 htmltools_0.3.6 [21] Matrix_1.2-15 plyr_1.8.4 DESeq2_1.20.0 XML_3.98-1.16 pkgconfig_2.0.2 [26] genefilter_1.62.0 zlibbioc_1.26.0 purrr_0.2.5 xtable_1.8-3 scales_1.0.0 [31] htmlTable_1.11.2 tibble_1.4.2 annotate_1.58.0 ggplot2_3.1.0 nnet_7.3-12 [36] lazyeval_0.2.1 survival_2.42-3 magrittr_1.5 memoise_1.1.0 foreign_0.8-70 [41] tools_3.5.0 data.table_1.11.8 stringr_1.3.1 locfit_1.5-9.1 munsell_0.5.0 [46] cluster_2.0.7-1 plotrix_3.7-1 AnnotationDbi_1.42.1 bindrcpp_0.2.2 compiler_3.5.0 [51] rlang_0.3.0.1 grid_3.5.0 RCurl_1.95-4.11 rstudioapi_0.8 htmlwidgets_1.2 [56] bitops_1.0-6 base64enc_0.1-3 gtable_0.2.0 DBI_1.0.0 R6_2.3.0 [61] gridExtra_2.3 knitr_1.20 dplyr_0.7.7 bit_1.1-13 bindr_0.1.1 [66] Hmisc_4.1-1 stringi_1.2.2 geneplotter_1.58.0 rpart_4.1-13 acepack_1.4.1 [71] tidyselect_0.2.5

Any suggestion? Thanks

@hartleys
Copy link
Owner

Multiple ncores is currently deprecated. During JunctionSeq's development the bioconductor parallellization framework changed several times without support for backwards compatibility. So basically nCores only works on certain specific versions of R.

Just use nCores = 1. The parallelization didn't seem to help that much anyways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants