Description Usage Arguments Value Examples
View source: R/helpers_for_main_dashboard.R
Helper functions related to the networks module Takes a subset of the
individual data along with phewas results and returns a set of network data
in the form of edges and vertices as required by network_plot
.
1 2 3 4 5 6 7 8 9 10 | setup_network_data(
data,
phecode_info,
inverted_codes = c(),
case_size = 0.1,
code_size = 0.3,
no_copies = "#bdbdbd",
one_copy = "orangered",
two_copies = "red"
)
|
data |
A phenome dataframe with phecodes as columns and also with an
|
phecode_info |
Information about each codes results in phewas study in
form of columns: |
inverted_codes |
An array of codes that are inverted. Note that if a
code is inverted that should also be reflected in |
case_size |
Size of nodes drawn for cases (default of 0.1) |
code_size |
Size of nodes drawn for phecodes (default of 0.3) |
no_copies |
Color of cases nodes with no minor allele copy (default grey) |
one_copy |
Color of cases nodes with one minor allele copy (default orangered) |
two_copies |
Color of cases nodes with two minor allele copies (default redish) |
A list containing two dataframes: vertices
a dataframe
containing each unique node in network (all unique IIDs and Phecodes) along
with columns snp_status
, name
, color
, size
,
selectable
, id
, tooltip
which are all attributes used
by the various network plotting functions included in library edges
:
a dataframe with columns source
and target
corresponding to
the edges between each vertices according to the assigned interger
id
.
1 | setup_network_data(data, phewas_results)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.