Skip to content

Commit 64933db

Browse files
author
LiNk-NY
committed
add follow_ups clinical attributes
1 parent a40f466 commit 64933db

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

R/clinical.R

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ gdc_clinical = function(case_ids, include_list_cols = FALSE) {
6464
filter( ~ case_id %in% case_ids) |>
6565
expand(c("diagnoses",
6666
"demographic",
67-
"exposures")) |>
67+
"exposures",
68+
"follow_ups.other_clinical_attributes")) |>
6869
response_all(response_handler = function(x) jsonlite::fromJSON(x, simplifyDataFrame = TRUE))
6970
demographic = resp$results$demographic
7071
demographic$case_id = rownames(demographic)
@@ -81,9 +82,10 @@ gdc_clinical = function(case_ids, include_list_cols = FALSE) {
8182
})
8283

8384
exposures = bind_rows(resp$results$exposures, .id = "case_id")
85+
follow_ups = bind_rows(resp$results$follow_ups, .id = "case_id")
8486

8587
# set up main table by removing data.frame columns
86-
cnames = setdiff(colnames(resp$results), c('exposures', 'diagnoses', 'demographic'))
88+
cnames = setdiff(colnames(resp$results), c('exposures', 'follow_ups', 'diagnoses', 'demographic'))
8789
main = resp$results[, cnames]
8890

8991
if(!include_list_cols) {
@@ -94,6 +96,7 @@ gdc_clinical = function(case_ids, include_list_cols = FALSE) {
9496
y = list(demographic = as_tibble(demographic),
9597
diagnoses = as_tibble(diagnoses),
9698
exposures = as_tibble(exposures),
99+
follow_ups = as_tibble(follow_ups),
97100
main = as_tibble(main))
98101
class(y) = c('GDCClinicalList', class(y))
99102
return(y)

0 commit comments

Comments
 (0)