GithubHelp home page GithubHelp logo

elpigraph.r's Introduction

Description

This package provides an R implementation of the ElPiGraph algorithm. A self-contained description of the algorithm is available here

A native MATLAB implementation of the algorithm (coded by Andrei Zinovyev and Evgeny Mirkes) is also available

Installation

To improve the performance of the algorithm, a number of functions have been implemented as C++ functions. To simplify the maintenance and updating of the package, these functions have been implemented in the package distutils, which needs to be installed separately. The following command will check the presence of the devtools, and install it if necessary, after that it will install the distutils package. A working internet connection is required.

if(!require("devtools")){
  install.packages("devtools")
}
devtools::install_github("Albluca/distutils")  

Once distutils has been installed, ElPiGraph.R can be installed by typing

devtools::install_github("Albluca/ElPiGraph.R")

It is also possible to get the most recent developmental version (which will contains more feature, but is potentially more unstable) via:

devtools::install_github("Albluca/ElPiGraph.R", ref = "Development")

The package can then be loaded via the command

library("ElPiGraph.R")

Usage

Several guides are available to exemplify the behavior of ElPiGraph.R:

elpigraph.r's People

Contributors

albluca avatar auranic avatar charles-bernard avatar galicae avatar zouter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

elpigraph.r's Issues

Error in 1:ncol(AllComb) : argument of length 0 when PlotPG()

I am running the basic codes for Elastic principal graph construction as showed in: https://rdrr.io/github/Albluca/ElPiGraph.R/f/guides/trim.Rmd

TreeEPG <- computeElasticPrincipalTree(X = TD_LowNoise, NumNodes = 40, drawAccuracyComplexity = FALSE, drawEnergy = FALSE, drawPCAView = FALSE, n.cores = 1)

But I keep getting error the run PlotPG function, as follow:

PlotPG(X = TD_LowNoise, TargetPG = TreeEPG[[1]], GroupsLab = TD_LowNoise_Cat, Do_PCA = FALSE, DimToPlot = 1:2)

Error in 1:ncol(AllComb) : argument of length 0

The TreeEPG file is generated. Any solutions for this issue?

This is my sessionInfo

sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0
locale:
[1] en_US.UTF-8
attached base packages:
[1] grid stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] igraph_1.2.11 velocyto.R_0.6 gtsummary_1.5.2
[4] combinat_0.0-8 pander_0.6.4 ggpubr_0.4.0
[7] car_3.0-12 carData_3.0-5 venn_1.10
[10] RColorBrewer_1.1-2 readxl_1.3.1 EnsDb.Hsapiens.v86_2.99.0
[13] ensembldb_2.18.3 AnnotationFilter_1.18.0 GenomicFeatures_1.46.3
[16] org.Hs.eg.db_3.14.0 scDblFinder_1.9.4 seriation_1.3.1
[19] tradeSeq_1.8.0 monocle3_1.0.0 TSCAN_1.32.0
[22] slingshot_2.2.0 TrajectoryUtils_1.2.0 princurve_2.1.6
[25] ElPiGraph.R_1.0.0 phateR_1.0.7 glmnet_4.1-3
[28] edgeR_3.36.0 GEOquery_2.62.2 rWikiPathways_1.14.0
[31] clusterProfiler_4.2.2 dplyr_1.0.8 org.Mm.eg.db_3.14.0
[34] AnnotationDbi_1.56.2 lisi_1.0 kBET_0.99.6
[37] biomaRt_2.50.2 RANN_2.6.1 limma_3.50.0
[40] MAST_1.20.0 circlize_0.4.13 ComplexHeatmap_2.10.0
[43] harmony_0.1.0 Rcpp_1.0.8 batchelor_1.10.0
[46] DropletUtils_1.14.2 scater_1.22.0 ggplot2_3.3.5
[49] scran_1.22.1 scuttle_1.4.0 Matrix_1.4-0
[52] SeuratObject_4.0.4 Seurat_4.1.0 umap_0.2.7.0
[55] BiocSingular_1.10.0 simpleSingleCell_1.18.0 SingleCellExperiment_1.16.0
[58] SummarizedExperiment_1.24.0 Biobase_2.54.0 GenomicRanges_1.46.1
[61] GenomeInfoDb_1.30.0 IRanges_2.28.0 S4Vectors_0.32.3
[64] BiocGenerics_0.40.0 MatrixGenerics_1.6.0 matrixStats_0.61.0
loaded via a namespace (and not attached):
[1] graphlayouts_0.8.0 pbapply_1.5-0 lattice_0.20-45
[4] vctrs_0.3.8 fastICA_1.2-3 mgcv_1.8-38
[7] blob_1.2.2 survival_3.2-13 spatstat.data_2.1-2
[10] later_1.3.0 DBI_1.1.2 R.utils_2.11.0
[13] rappdirs_0.3.3 uwot_0.1.11 dqrng_0.3.0
[16] zlibbioc_1.40.0 pcaMethods_1.86.0 htmlwidgets_1.5.4
[19] GlobalOptions_0.1.2 future_1.23.0 leiden_0.3.9
[22] parallel_4.1.2 irlba_2.3.5 tidygraph_1.2.0
[25] readr_2.1.1 KernSmooth_2.23-20 promises_1.2.0.1
[28] DelayedArray_0.20.0 graph_1.72.0 RSpectra_0.16-0
[31] fastmatch_1.1-3 digest_0.6.29 png_0.1-7
[34] distutils_1.0 bluster_1.4.0 sctransform_0.3.3
[37] scatterpie_0.1.7 cowplot_1.1.1 DOSE_3.20.1
[40] here_1.0.1 ggraph_2.0.5 pkgconfig_2.0.3
[43] GO.db_3.14.0 DelayedMatrixStats_1.16.0 ggbeeswarm_0.6.0
[46] gt_0.3.1 iterators_1.0.13 reticulate_1.24
[49] beeswarm_0.4.0 GetoptLong_1.0.5 xfun_0.29
[52] zoo_1.8-9 tidyselect_1.1.1 reshape2_1.4.4
[55] purrr_0.3.4 ica_1.0-2 viridisLite_0.4.0
[58] rtracklayer_1.54.0 rlang_1.0.1 glue_1.6.1
[61] registry_0.5-1 stringr_1.4.0 tictoc_1.0.1
[64] ggsignif_0.6.3 httpuv_1.6.5 BiocNeighbors_1.12.0
[67] DO.db_2.9 jsonlite_1.7.3 XVector_0.34.0
[70] bit_4.0.4 mime_0.12 gridExtra_2.3
[73] gplots_3.1.1 Rsamtools_2.10.0 stringi_1.7.6
[76] processx_3.5.2 spatstat.sparse_2.1-0 scattermore_0.7
[79] yulab.utils_0.0.4 bitops_1.0-7 cli_3.1.1
[82] rhdf5filters_1.6.0 RSQLite_2.2.9 tidyr_1.2.0
[85] pheatmap_1.0.12 data.table_1.14.2 rstudioapi_0.13
[88] TSP_1.1-11 GenomicAlignments_1.30.0 nlme_3.1-155
[91] qvalue_2.26.0 locfit_1.5-9.4 listenv_0.8.0
[94] miniUI_0.1.1.1 gridGraphics_0.5-1 R.oo_1.24.0
[97] dbplyr_2.1.1 lifecycle_1.0.1 munsell_0.5.0
[100] cellranger_1.1.0 R.methodsS3_1.8.1 caTools_1.18.2
[103] codetools_0.2-18 vipor_0.4.5 lmtest_0.9-39
[106] admisc_0.23 xtable_1.8-4 ROCR_1.0-11
[109] abind_1.4-5 farver_2.1.0 FNN_1.1.3
[112] parallelly_1.30.0 ResidualMatrix_1.4.0 aplot_0.1.2
[115] askpass_1.1 ggtree_3.2.1 BiocIO_1.4.0
[118] RcppAnnoy_0.0.19 goftest_1.2-3 patchwork_1.1.1
[121] tibble_3.1.6 cluster_2.1.2 future.apply_1.8.1
[124] tidytree_0.3.7 ellipsis_0.3.2 prettyunits_1.1.1
[127] ggridges_0.5.3 mclust_5.4.9 fgsea_1.20.0
[130] spatstat.utils_2.3-0 htmltools_0.5.2 BiocFileCache_2.2.0
[133] yaml_2.2.2 utf8_1.2.2 plotly_4.10.0
[136] XML_3.99-0.8 withr_2.4.3 fitdistrplus_1.1-6
[139] CodeDepends_0.6.5 BiocParallel_1.28.3 bit64_4.0.5
[142] xgboost_1.5.0.2 foreach_1.5.1 ProtGenerics_1.26.0
[145] Biostrings_2.62.0 spatstat.core_2.3-2 GOSemSim_2.20.0
[148] rsvd_1.0.5 ScaledMatrix_1.2.0 memoise_2.0.1
[151] evaluate_0.14 tzdb_0.2.0 callr_3.7.0
[154] ps_1.6.0 curl_4.3.2 fansi_1.0.2
[157] tensor_1.5 cachem_1.0.6 deldir_1.0-6
[160] metapod_1.2.0 rjson_0.2.21 rstatix_0.7.0
[163] ggrepel_0.9.1 clue_0.3-60 rprojroot_2.0.2
[166] tools_4.1.2 magrittr_2.0.2 RCurl_1.98-1.5
[169] ape_5.6-1 broom.helpers_1.6.0 ggplotify_0.1.0
[172] xml2_1.3.3 httr_1.4.2 assertthat_0.2.1
[175] rmarkdown_2.11 globals_0.14.0 R6_2.5.1
[178] Rhdf5lib_1.16.0 progress_1.2.2 KEGGREST_1.34.0
[181] treeio_1.18.1 gtools_3.9.2 shape_1.4.6
[184] statmod_1.4.36 beachmat_2.10.0 HDF5Array_1.22.1
[187] rhdf5_2.38.0 splines_4.1.2 ggfun_0.0.4
[190] colorspace_2.0-2 generics_0.1.2 pillar_1.7.0
[193] tweenr_1.0.2 GenomeInfoDbData_1.2.7 plyr_1.8.6
[196] gtable_0.3.0 restfulr_0.0.13 knitr_1.37
[199] shadowtext_0.1.1 fastmap_1.1.0 doParallel_1.0.16
[202] broom_0.7.12 openssl_1.4.6 scales_1.1.1
[205] filelock_1.0.2 backports_1.4.1 enrichplot_1.14.1
[208] hms_1.1.1 ggforce_0.3.3 Rtsne_0.15
[211] shiny_1.7.1 polyclip_1.10-0 lazyeval_0.2.2
[214] crayon_1.4.2 MASS_7.3-55 downloader_0.4
[217] sparseMatrixStats_1.6.0 viridis_0.6.2 rpart_4.1.16
[220] compiler_4.1.2 spatstat.geom_2.3-1

'ggforce' dependency require installation from command line of the libudunits2-dev package

Hi Luca,

I just wanted to warn you that when I tried to install your last push from GitHub, I had an error message concerning the installation of the R package "ggforce", which itselfs depends on the "units" R package:

  libudunits2.so not found!

  If the udunits2 library is installed in a non-standard location, use:

    --configure-args='--with-udunits2-lib=/usr/local/lib'

  for example, if the library was not found, and/or

    --configure-args='--with-udunits2-include=/usr/include/udunits2'

  if the header was not found, replacing paths with appropriate values for your
  installation. You can alternatively use the UDUNITS2_INCLUDE and UDUNITS2_LIBS
  environment variables.

  If udunits2 is not installed, please install it.
  It is required for this package.
--------------------------------------------------------------------------------

See `config.log' for more details
ERROR: configuration failed for package ‘units’
* removing ‘/home/charles/R/x86_64-pc-linux-gnu-library/3.4/units’
Installation failed: Command failed (1)
'/usr/lib/R/bin/R' --no-site-file --no-environ --no-save --no-restore --quiet  \
  CMD INSTALL '/tmp/Rtmp6YDibV/devtools53ad1344232/ggforce'  \
  --library='/home/charles/R/x86_64-pc-linux-gnu-library/3.4' --install-tests 

ERROR: dependency ‘units’ is not available for package ‘ggforce’
* removing ‘/home/charles/R/x86_64-pc-linux-gnu-library/3.4/ggforce’
Installation failed: Command failed (1)
essai de l'URL 'https://cran.rstudio.com/src/contrib/infotheo_1.2.0.tar.gz'
Content type 'application/x-gzip' length 8290 bytes

Fixed it by installing the libudunits2-dev package from command line. In case you would like to mention this potential error in your Readme, and indicates as well the fix, then you can check out this link for the command of installation on Linux and MacOS: https://stackoverflow.com/questions/42287164/install-udunits2-package-for-r3-3

Have a nice day !

I will close the issue as soon as you answered to me!

Cheers,

Charles

CompareOnBranches function

Dear ElPiGraph team,

I've gone through the tutorial in R and the last function, CompareOnBranches gives me the following:
[1] "Feature selection by variance"
NULL
Warning messages:
1: In type.convert.default(X[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
2: In type.convert.default(X[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
3: In type.convert.default(X[[i]], ...) :
'as.is' should be specified by the caller; using TRUE
4: In type.convert.default(X[[i]], ...) :
'as.is' should be specified by the caller; using TRUE

Please could you let me know how to fix this or get to the plots with features in pseudotimes? Are features the PCs in this case? Is there a way to plot individual genes at the pseudotimes with a function?

Thanks,
Maria

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.