Remove Duplicate Gene Entries The purpose. of this function is to pull info from a synapse table into a dataframe. Removal can be of all entries with a lower score in a given column or entries which lack the desired ensg

vertex_annotate(df, ig_net, v_col, default_value = 0)

Arguments

df

the data frame contain the vertex ids as renames

ig_net

the network to annotate

v_col

the column name of the feature become vertex attribute

default_value

default vertex values if not present in df default = 0

Value

an annotated igraph network object

Examples

if (FALSE) { data(slim_net, package = "igraphNetworkExpansion") syn <- log_into_synapse() omics_scores <- dplyr::left_join( table_pull( syn_id ='syn25575156', feature_name = 'GeneName', features = names(igraph::V(net)), column_names = c('ENSG', 'OmicsScore', 'GeneticsScore', 'Logsdon'), synap_import = syn$synapse ), table_pull( syn_id ='syn22758536', feature_name = 'GName', features = names(igraph::V(net)), column_names = c('ENSG', 'GName', 'RNA_TE', 'Pro_TE'), synap_import = syn$synapse ), by = 'ENSG' ) colnames(omics_scores)[ colnames(omics_scores) == 'Logsdon' ] <- 'Overall' omics_scores <- rm_dups( df = omics_scores, feature_col = 'GName', feature = 'POLR2J3', type = 'value', type_spec = 'Overall' , ensg_keep = NULL ) omics_scores <- rm_dups( df = omics_scores, feature_col = 'GName', feature = "FCGBP", type = 'ensg', type_spec = 'ENSG' , ensg_keep = 'ENSG00000281123' ) omics_scores <- omics_scores[ !(is.na(omics_scores$GName)), ] row.names(omics_scores) <- omics_scores$GName net <- vertex_annotate( omics_scores, slim_net, "Overall", default_value = 0 ) }