[Bioc-devel] how to trace 'Matrix' as package dependency for 'GenomicScores'
mtmorg@n@b|oc @end|ng |rom gm@||@com
Thu Feb 6 17:41:28 CET 2020
Excellent! I think there are other, independent, paths between your immediate dependents...
RBGL::sp.between(g, start="DT", finish="Matrix", detail=TRUE)[]$path_detail
 "DT" "crosstalk" "ggplot2" "mgcv" "Matrix"
On 2/6/20, 10:47 AM, "Robert Castelo" <robert.castelo using upf.edu> wrote:
thanks for hint!! i wasn't aware of 'tools::package_dependencies()',
adding a bit of graph sorcery i get the result i was looking for:
repos <- BiocManager::repositories()[c(1,5)]
db <- available.packages(repos=repos)
deps <- tools::package_dependencies("GenomicScores", db,
deps <- tools::package_dependencies(c("GenomicScores", deps), db)
g <- graph::graphNEL(nodes=names(deps), edgeL=deps, edgemode="directed")
RBGL::sp.between(g, start="GenomicScores", finish="Matrix",
 "GenomicScores" "rtracklayer" "GenomicAlignments"
 "SummarizedExperiment" "Matrix"
so, it was the rtracklayer dependency that leads to Matrix through
GenomeAlignments and SummarizedExperiment.
maybe the BioC package 'pkgDepTools' should be deprecated if its
functionality is part of 'tools' and it does not even work as fast and
correct as 'tools'.
On 2/6/20 2:51 PM, Martin Morgan wrote:
> The first thing is to get the correct repositories
> repos = BiocManager::repositories()
> (maybe trim the experiment and annotation repos from this). I also tried pkgDepTools::makeDepGraph() but it took so long that I moved on... it has an option 'keep.builtin' which might include Matrix.
> There is also BiocPkgTools::buildPkgDependencyDataFrame() & friends, but this seems to build dependencies within a single repository...
> The building block for a solution is `tools::package_dependencies()`, and I can confirm that "Matrix" _is_ a dependency
> db = available.packages(repos = BiocManager::repositories())
> revdeps <- tools::package_dependencies("GenomicScores", db, recursive = TRUE)
> "Matrix" %in% revdeps[]
> ##  TRUE
> so I'll leave the clever recursive or graph-based algorithm up to you, to report back to the mailing list?
> For what it's worth I think the last time this came up Martin Maechler pointed to a function in base R (probably the tools package) that implements this, too...?
> Martin Morgan
> On 2/6/20, 6:40 AM, "Bioc-devel on behalf of Robert Castelo" <bioc-devel-bounces using r-project.org on behalf of robert.castelo using upf.edu> wrote:
> when i load the package 'GenomicScores' in a clean session i see thorugh
> the 'sessionInfo()' that the package 'Matrix' is listed under "loaded
> via a namespace (and not attached)".
> i'd like to know what is the dependency that 'GenomicsScores' has that
> ends up requiring the package 'Matrix'.
> i've tried using the package 'pkgDepTools' without success, because the
> dependency graph does not list any path from 'GenomicScores' to 'Matrix'.
> i've been manually browsing the Bioc website and, unless i've overlooked
> something, the only association with 'Matrix' i could find is that
> 'S4Vectors' and 'GenomicRanges', which are required by 'GenomicScores',
> list 'Matrix' in the 'Suggests' field, but my understanding is that
> those packages are not required and should not be loaded.
> so, is there any way in which i can figure out what of the
> 'GenomicScores' dependencies leads to loading the package 'Matrix'?
> here are the depends, import and suggests fields from 'GenomicScores':
> Depends: R (>= 3.5), S4Vectors (>= 0.7.21), GenomicRanges, methods,
> BiocGenerics (>= 0.13.8)
> Imports: utils, XML, Biobase, IRanges (>= 2.3.23), Biostrings,
> BSgenome, GenomeInfoDb, AnnotationHub, shiny, shinyjs,
> DT, shinycustomloader, rtracklayer, data.table, shinythemes
> Suggests: BiocStyle, knitr, rmarkdown, BSgenome.Hsapiens.UCSC.hg19,
> phastCons100way.UCSC.hg19, MafDb.1Kgenomes.phase1.hs37d5,
> SNPlocs.Hsapiens.dbSNP144.GRCh37, VariantAnnotation,
> TxDb.Hsapiens.UCSC.hg19.knownGene, gwascat, RColorBrewer
> and here a session information in a fresh R-devel session after loading
> the package 'GenomicScores':
> R Under development (unstable) (2020-01-29 r77745)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: CentOS Linux 7 (Core)
> Matrix products: default
> BLAS: /opt/R/R-devel/lib64/R/lib/libRblas.so
> LAPACK: /opt/R/R-devel/lib64/R/lib/libRlapack.so
>  LC_CTYPE=en_US.UTF8 LC_NUMERIC=C
>  LC_TIME=en_US.UTF8 LC_COLLATE=en_US.UTF8
>  LC_MONETARY=en_US.UTF8 LC_MESSAGES=en_US.UTF8
>  LC_PAPER=en_US.UTF8 LC_NAME=C
>  LC_ADDRESS=C LC_TELEPHONE=C
>  LC_MEASUREMENT=en_US.UTF8 LC_IDENTIFICATION=C
> attached base packages:
>  parallel stats4 stats graphics grDevices utils datasets
>  methods base
> other attached packages:
>  GenomicScores_1.11.4 GenomicRanges_1.39.2 GenomeInfoDb_1.23.10
>  IRanges_2.21.3 S4Vectors_0.25.12 BiocGenerics_0.33.0
>  colorout_1.2-2
> loaded via a namespace (and not attached):
>  Rcpp_1.0.3 lattice_0.20-38
>  shinycustomloader_0.9.0 Rsamtools_2.3.3
>  Biostrings_2.55.4 assertthat_0.2.1
>  digest_0.6.23 mime_0.9
>  BiocFileCache_1.11.4 R6_2.4.1
>  RSQLite_2.2.0 httr_1.4.1
>  pillar_1.4.3 zlibbioc_1.33.1
>  rlang_0.4.4 curl_4.3
>  data.table_1.12.8 blob_1.2.1
>  DT_0.12 Matrix_1.2-18
>  shinythemes_1.1.2 shinyjs_1.1
>  BiocParallel_1.21.2 AnnotationHub_2.19.7
>  htmlwidgets_1.5.1 RCurl_1.98-1.1
>  bit_1.1-15.1 shiny_1.4.0
>  DelayedArray_0.13.3 compiler_4.0.0
>  httpuv_1.5.2 rtracklayer_1.47.0
>  pkgconfig_2.0.3 htmltools_0.4.0
>  tidyselect_1.0.0 SummarizedExperiment_1.17.1
>  tibble_2.1.3 GenomeInfoDbData_1.2.2
>  interactiveDisplayBase_1.25.0 matrixStats_0.55.0
>  XML_3.99-0.3 crayon_1.3.4
>  dplyr_0.8.4 dbplyr_1.4.2
>  later_1.0.0 GenomicAlignments_1.23.1
>  bitops_1.0-6 rappdirs_0.3.1
>  grid_4.0.0 xtable_1.8-4
>  DBI_1.1.0 magrittr_1.5
>  XVector_0.27.0 promises_1.1.0
>  vctrs_0.2.2 tools_4.0.0
>  bit64_0.9-7 BSgenome_1.55.3
>  Biobase_2.47.2 glue_1.3.1
>  purrr_0.3.3 BiocVersion_3.11.1
>  fastmap_1.0.1 yaml_2.2.1
>  AnnotationDbi_1.49.1 BiocManager_1.30.10
>  memoise_1.1.0
> Bioc-devel using r-project.org mailing list
Robert Castelo, PhD
Dept. of Experimental and Health Sciences
Universitat Pompeu Fabra (UPF)
Barcelona Biomedical Research Park (PRBB)
Dr Aiguader 88
E-08003 Barcelona, Spain
More information about the Bioc-devel