get_colors_based_on_strains: get new colors based on the strains

Description Usage Arguments Value Examples

View source: R/get_layers_values.R

Description

function to predict the colors based on the strains occurrence of genes i.e.,show nodes/genes associated with the selected strains (i.e., that gene is present in that strains)

Usage

1
2
3
4
5
6
get_colors_based_on_strains(
  input_binary_df,
  data,
  strains_names,
  col_nodes = "black"
)

Arguments

input_binary_df

Object of class "dataframe", containing presence/absence of genes. Mandatory argument.

data

visnetwork dataframe generated by the geNet algorithm. Mandatory argument.

strains_names

the vector containing the names of the strains to visualize. Mandatory argument.

col_nodes

Color of the nodes matched with the strains. Default to "black".

Value

Object of class "dataframe", which reports the new colors for each node of the network

Examples

1
## Not run: get_colors_based_on_strains(input_binary_df,data,strains_names=c("strain_x"),col_nodes="black")

haneylab/geNet documentation built on Oct. 4, 2020, 8:40 a.m.