Commit 1dabb9be authored by cylon-x's avatar cylon-x 🤖
Browse files

Merge branch 'repo_update' of https://git-r3lab.uni.lu/covid/models into repo_update

parents c97bfcb4 e4dcc048
...@@ -78,3 +78,13 @@ get_annotation <- function(references, selected_type) { ...@@ -78,3 +78,13 @@ get_annotation <- function(references, selected_type) {
if(length(references) == 0) { return(NA) } if(length(references) == 0) { return(NA) }
with(data.frame(references), resource[type == selected_type]) with(data.frame(references), resource[type == selected_type])
} }
### A function retrieving element identifiers from a given MINERVA element set
get_component_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
return(mnv_refs)
}
\ No newline at end of file
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