Commit 4bf07ff8 authored by Marek Ostaszewski's avatar Marek Ostaszewski
Browse files

corrections to the function

parent e4dcc048
Pipeline #39943 passed with stages
in 39 seconds
......@@ -80,11 +80,11 @@ get_annotation <- function(references, selected_type) {
}
### A function retrieving element identifiers from a given MINERVA element set
get_component_annotations <- function(components, annotation_type) {
get_components_annotations <- function(components, annotation_type) {
### Get MINERVA references as a named list
message(paste0("Retrieving ", annotation_type, "identifiers for this MINERVA collection"))
### Apply get_annotation function
mnv_refs <- sapply(fcomponents$map_elements, function(x) sapply(x$references, get_annotation, annotation_type) )
names(mnv_refs) <- fcomponents$models$name
mnv_refs <- sapply(components$map_elements, function(x) sapply(x$references, get_annotation, annotation_type) )
names(mnv_refs) <- components$models$name
return(mnv_refs)
}
\ No newline at end of file
......@@ -36,15 +36,6 @@ get_reactome_pathway_contents <- function(reactome_path_id) {
return(unlist(unique(symbols)))
}
### A function retrieving element identifiers from MINERVA
get_mnv_refs <- function(fcomponents) {
### Get MINERVA HGNCs as a named list
message("Retrieving MINERVA HGNCs collection")
mnv_refs <- sapply(fcomponents$map_elements, function(x) sapply(x$references, get_annotation, "HGNC_SYMBOL") )
names(mnv_refs) <- fcomponents$models$name
return(mnv_refs)
}
### A function retrieving element identifiers from WikiPathway diagrams
get_wp_refs <- function() {
message("Retrieving WP collection")
......@@ -174,7 +165,7 @@ map_components <- get_map_components(map)
map_groups <- fromJSON("map_groups.json")
### Detailed lists
mnv_refs <- get_mnv_refs(map_components)
mnv_refs <- get_component_annotations(map_components, "HGNC_SYMBOL")
wp_refs <- get_wp_refs()
rct_refs <- get_rct_refs()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment