Pretty much as the title says; it would be nice to see an option in pkgDepTools to capture
relationships in the LinkingTo
field. For example:
library(pkgDepTools)
library(BiocInstaller)
biocUrl <- biocinstallRepos()["BioCsoft"]
biocDeps <- makeDepGraph(biocUrl, type="source", dosize=FALSE)
stuff <- dijkstra.sp(biocDeps, start="scran")$distance
"Rhdf5lib" %in% stuff[is.finite(stuff)] # FALSE
... because Rhdf5lib only resides in the LinkingTo:
field of scran (see
https://bioconductor.org/packages/scran for details). The current result is correct
in a sense, as the function only aims to pull down Depends
/Imports
; but one might want
to capture the LinkingTo
relationships as well, especially as the linked packages
represent a "hard" dependency.
It seems like a simple modification to makeDepGraph
would be sufficient:
deps <- cleanPkgField(pMat[p, "Depends"])
deps <- c(deps, cleanPkgField(pMat[p, "Imports"]))
deps <- c(deps, cleanPkgField(pMat[p, "LinkingTo"])) # new line
Session information:
R version 3.4.2 Patched (2017-10-30 r73642)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS
Matrix products: default
BLAS: /home/cri.camres.org/lun01/Software/R/R-3-4-branch_release/lib/libRblas.so
LAPACK: /home/cri.camres.org/lun01/Software/R/R-3-4-branch_release/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] BiocInstaller_1.28.0 pkgDepTools_1.44.0 RCurl_1.95-4.10
[4] bitops_1.0-6 RBGL_1.54.0 graph_1.56.0
[7] BiocGenerics_0.24.0
loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2 stats4_3.4.2