Skip to contents

Query GDC for available endpoint fields

Usage

mapping(endpoint)

Arguments

endpoint

character(1) corresponding to endpoints for which users may specify additional or alternative fields. Endpoints include “projects”, “cases”, “files”, and “annotations”.

Value

A data frame describing the field (field name), full (full data model name), type (data type), and four additional columns describing the "set" to which the fields belong--“default”,

“expand”, “multi”, and “nested”.

Examples

map <- mapping("projects")
head(map)
#>                            field
#> 1         dbgap_accession_number
#> 2                   disease_type
#> 3          intended_release_date
#> 4                           name
#> 5                   primary_site
#> 6 program.dbgap_accession_number
#>                                            description doc_type
#> 1                                                      projects
#> 2                                                      projects
#> 3                                                      projects
#> 4                                                      projects
#> 5                                                      projects
#> 6 The dbgap accession number provided for the program. projects
#>                                      full    type defaults
#> 1         projects.dbgap_accession_number keyword     TRUE
#> 2                   projects.disease_type keyword     TRUE
#> 3          projects.intended_release_date keyword     TRUE
#> 4                           projects.name keyword     TRUE
#> 5                   projects.primary_site keyword     TRUE
#> 6 projects.program.dbgap_accession_number keyword    FALSE
# get only the "default" fields
subset(map,defaults)
#>                     field description doc_type                            full
#> 1  dbgap_accession_number             projects projects.dbgap_accession_number
#> 2            disease_type             projects           projects.disease_type
#> 3   intended_release_date             projects  projects.intended_release_date
#> 4                    name             projects                   projects.name
#> 5            primary_site             projects           projects.primary_site
#> 9    project_autocomplete             projects   projects.project_autocomplete
#> 10             project_id             projects             projects.project_id
#> 11             releasable             projects             projects.releasable
#> 12               released             projects               projects.released
#> 13                  state             projects                  projects.state
#>       type defaults
#> 1  keyword     TRUE
#> 2  keyword     TRUE
#> 3  keyword     TRUE
#> 4  keyword     TRUE
#> 5  keyword     TRUE
#> 9       id     TRUE
#> 10 keyword     TRUE
#> 11 keyword     TRUE
#> 12 keyword     TRUE
#> 13 keyword     TRUE
# And get just the text names of the "default" fields
subset(map,defaults)$field
#>  [1] "dbgap_accession_number" "disease_type"           "intended_release_date" 
#>  [4] "name"                   "primary_site"           "project_autocomplete"  
#>  [7] "project_id"             "releasable"             "released"              
#> [10] "state"