Skip to contents

Simplify vector of acronyms by keywords.

Usage

simplify_vec_by_keywords(
  vec,
  keywords = c("layer", "part", "stratum", "division", "leaflet", "Subgeniculate",
    "island", "Islands", "Fields of Forel", "Cajal", "Darkschewitsch", "Precommissural"),
  ontology = "allen",
  dont_fold = c("Dorsal part of the lateral geniculate complex",
    "Ventral posterolateral nucleus of the thalamus, parvicellular part",
    "Ventral posteromedial nucleus of the thalamus, parvicellular part",
    "Ventral posterolateral nucleus of the thalamus, parvicellular part",
    "Ventral posteromedial nucleus of the thalamus, parvicellular part",
    "Substantia nigra")
)

Arguments

vec

(vector) Must contain acronyms

keywords

(vec, default = c("layer","part","stratum","division")) a list of keywords to simplify based on region name.

ontology

(str, default = "allen") Region ontology to use. options = "allen" or "unified"

dont_fold

(vec, default = c("Dorsal part of the lateral geniculate complex", "Ventral posterolateral nucleus of the thalamus, parvicellular part", " Ventral posteromedial nucleus of the thalamus, parvicellular part","Ventral posterolateral nucleus of the thalamus, parvicellular part", "Ventral posteromedial nucleus of the thalamus, parvicellular part","Substantia nigra")) Regions that are exceptions to being folded into their parent regions.

Value

df, dataframe as a tibble with included long name and acronyms that are simplified to parents

Examples

acronyms <- c("LGd", "GU4", "dCA1so" )
simplify_vec_by_keywords(acronyms)
#> # A tibble: 3 x 2
#>   name                                          acronym
#>   <chr>                                         <chr>  
#> 1 Dorsal part of the lateral geniculate complex LGd    
#> 2 Gustatory areas                               GU     
#> 3 Field CA1 (dorsal)                            dCA1   

acronyms <- c("LPBD", "MPBE", "CPre")
simplify_vec_by_keywords(acronyms,
keywords = c("dorsal part", "external part", "Caudoputamen-"), ontology = "unified")
#> # A tibble: 3 x 2
#>   name                         acronym
#>   <chr>                        <chr>  
#> 1 Lateral parabrachial nucleus LPB    
#> 2 Medial parabrachial nucleus  MPB    
#> 3 Caudate Putamen              CP