Skip to content

Commit

Permalink
feat: retrieving initial information for the dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliversinn committed Nov 20, 2023
1 parent 045761a commit 3c96a57
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions setup.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
library(GenomicDataCommons)


projects <- GenomicDataCommons::projects() %>%
GenomicDataCommons::filter(program.name == "TCGA") %>%
GenomicDataCommons::facet(c("name", "project_id")) %>%
results(size = 100)

tcga_project_ids <- projects$project_id

projects_info <- projects() %>%
GenomicDataCommons::filter(project_id %in% tcga_project_ids) %>%
results_all()

diseases_types <- unique(rapply(projects$disease_type, function(x) head(x, 30)))

primary_sites <- unique(rapply(projects$primary_site, function(x) head(x, 30)))

cases_pre_info <- cases() %>%
GenomicDataCommons::filter(project.project_id %in% tcga_project_ids) %>%
results_all()

cases_info <- GenomicDataCommons::cases() %>%
GenomicDataCommons::filter(project.project_id %in% tcga_project_ids) %>%
GenomicDataCommons::facet(c(
"project.project_id",
"demographic.race",
"demographic.gender",
"demographic.ethnicity",
"demographic.vital_status",
"diagnoses.primary_diagnosis",
"diagnoses.site_of_resection_or_biopsy",
"primary_site"
)) %>%
aggregations()


files_info <- GenomicDataCommons::files() %>%
GenomicDataCommons::filter(access == "open") %>%
GenomicDataCommons::facet(c("type", "data_type")) %>%
aggregations()

0 comments on commit 3c96a57

Please sign in to comment.