Package: kgraph 1.0.0
kgraph: Knowledge Graphs Constructions and Visualizations
Knowledge graphs enable to efficiently visualize and gain insights into large-scale data analysis results, as p-values from multiple studies or embedding data matrices. The usual workflow is a user providing a data frame of association studies results and specifying target nodes, e.g. phenotypes, to visualize. The knowledge graph then shows all the features which are significantly associated with the phenotype, with the edges being proportional to the association scores. As the user adds several target nodes and grouping information about the nodes such as biological pathways, the construction of such graphs soon becomes complex. The 'kgraph' package aims to enable users to easily build such knowledge graphs, and provides two main features: first, to enable building a knowledge graph based on a data frame of concepts relationships, be it p-values or cosine similarities; second, to enable determining an appropriate cut-off on cosine similarities from a complete embedding matrix, to enable the building of a knowledge graph directly from an embedding matrix. The 'kgraph' package provides several display, layout and cut-off options, and has already proven useful to researchers to enable them to visualize large sets of p-value associations with various phenotypes, and to quickly be able to visualize embedding results. Two example datasets are provided to demonstrate these behaviors, and several live 'shiny' applications are hosted by the CELEHS laboratory and Parse Health, as the KESER Mental Health application <https://keser-mental-health.parse-health.org/> based on Hong C. (2021) <doi:10.1038/s41746-021-00519-z>.
Authors:
kgraph_1.0.0.tar.gz
kgraph_1.0.0.zip(r-4.5)kgraph_1.0.0.zip(r-4.4)kgraph_1.0.0.zip(r-4.3)
kgraph_1.0.0.tgz(r-4.4-any)kgraph_1.0.0.tgz(r-4.3-any)
kgraph_1.0.0.tar.gz(r-4.5-noble)kgraph_1.0.0.tar.gz(r-4.4-noble)
kgraph_1.0.0.tgz(r-4.4-emscripten)kgraph_1.0.0.tgz(r-4.3-emscripten)
kgraph.pdf |kgraph.html✨
kgraph/json (API)
# Install 'kgraph' in R: |
install.packages('kgraph', repos = c('https://thomaschln.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://gitlab.com/thomaschln/kgraph
- df_cuis_pairs - A dataset containing CUIs pairs
- df_embeds_dict - A dictionary for the m_embeds object
- df_pval - A dataset containing GWAS p-values
- df_pval_dict - A dictionary for the df_pval object
- m_embeds - A dataset containing medical word embeddings
Last updated 5 days agofrom:979c8d1ccc. Checks:OK: 7. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Oct 24 2024 |
R-4.5-win | OK | Oct 24 2024 |
R-4.5-linux | OK | Oct 24 2024 |
R-4.4-win | OK | Oct 24 2024 |
R-4.4-mac | OK | Oct 24 2024 |
R-4.3-win | OK | Oct 24 2024 |
R-4.3-mac | OK | Oct 24 2024 |
Exports:%<>%%>%%$%build_kgraphbuild_kgraph_from_fitcov_simidist_matrixfit_embeds_kgfit_embeds_to_pairsgen_df_notpairsget_cutoff_thresholdget_sgraphnorm_inprodproject_pairssparse_encodestddev_mean
Dependencies:amapbase64encbslibcachemclicolorspacecommonmarkcowplotcpp11crayoncrosstalkdata.tabledigestdplyrDTevaluatefansifarverfastmapfloatfontawesomefsgenericsggplot2gluegtablehighrhtmltoolshtmlwidgetshttpuvigraphisobandjquerylibjsonliteknitrlabelinglaterlatticelazyevallgrlifecyclemagrittrMASSMatrixMatrixExtramemoisemgcvmimemlapimunsellnlmepillarpkgconfigplyrpROCpromisesR6rappdirsRColorBrewerRcppRcppArmadilloreshape2RhpcBLASctlrlangrmarkdownrsparsersvdsassscalessgraphshinysourcetoolsstringistringrtext2vectibbletidyselecttinytexutf8vctrsviridisLitewithrxfunxtableyaml
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Assignment pipe | %<>% |
Pipe | %>% |
Exposition pipe | %$% |
Build a knowledge graph | build_kgraph |
Build a knowledge graph from a fit object | build_kgraph_from_fit |
Covariance similarity | cov_simi |
A dataset containing CUIs pairs | df_cuis_pairs |
A dictionary for the m_embeds object | df_embeds_dict |
A dataset containing GWAS p-values | df_pval |
A dictionary for the df_pval object | df_pval_dict |
dist_matrix | dist_matrix |
Fit embeddings to a kgraph object | fit_embeds_kg |
Fit embeds to pairs | fit_embeds_to_pairs |
Generate null pairs | gen_df_notpairs |
Get cut-off threshold | get_cutoff_threshold |
Wrapper to build a sgraph object fromk a kgraph object | get_sgraph |
A dataset containing medical word embeddings | m_embeds |
norm_inprod | norm_inprod |
Predict known pairs | project_pairs |
Reshape multiple traits in example data | reshape_multiple_traits |
Reshape multiple traits in example data dictionary | reshape_multiple_traits_dict |
sparse_encode | sparse_encode |
stddev_mean | stddev_mean |