... > 0 is not TRUE

`actual`:   FALSE
`expected`: TRUE

# Consortium: Pull Consortium Data With PAT -------------------------------
# return to avoid having to re-run pull_data_synapse for
# data frame of each release to use for pmap
# define expected number of dataframes based on whether TM and RT data were released
cohort == "NSCLC" & version %in% c("v1.1-consortium", "v2.0-public") ~ 11,
# sv file added to NSCLC at 2.2-consortium
cohort %in% c("CRC") & version == "v2.0-public" ~ 12,
cohort == "BLADDER" & version == "v1.1-consortium" ~ 12,
cohort == "BLADDER" & version == "v1.2-consortium" ~ 13,
# for each data release, pull data into the R environment
# get actual length of each data release returned from pull_data_synapse
actual_length <- map_depth(test_list, .depth = 2, length) %>%
test_that("Test class and length of list for public data", {
# expect each data release returned to be a list, need to rep "list" the
# number of times for the data releases we have
test_that("test `cohort` argument specification", {
# try to misspecify cohort (lower cases instead of capital)
test_that("test `version` argument specification", {
"You have selected a version that is not available for this cohort*"
# exit if user doesn't have a synapse log in or access to data.
# not all data releases had a release_version variable
# for each data frame returned with a cohort, get the release_version variable
# remove genomic data frames since we don't expect them to have a release_version variable
# for each dataframe returned for a data release, get the cohort variable
release_returned <- map_depth(test_list_release_version_avail_no_genomic, .depth = 3, select,
map_depth(., .depth = 2, unnest, cols = value) %>%
# sometimes release_version is char and sometimes numeric, make char
map(., mutate, release_version_character = str_replace(pattern = "pharma",
mutate(release_matches = str_detect(pattern = str_trim(release_version_character),
test_that("Number of columns and rows for each data release", {
# get number of columns for each dataframe returned
col_lengths <- map_depth(test_list, .depth = 3, length) %>%
map(., pivot_longer, cols = everything(), names_to = "df", values_to = "ncol") # %>%
# map_df(., bind_rows, .id = "data_release")
row_lengths <- map_depth(test_list, .depth = 3, nrow) %>%
map(., pivot_longer, cols = everything(), names_to = "df", values_to = "nrow")
# hard coded table of expected number of rows and columns
# separate(data_release, into = c("cohort", "data_release"), sep = "_") %>%
# making sure there are no character "" instead of NAs
# count number of character "" across all columns
# first count number of times each column has a ""
any_blank_cols <- map_depth(test_list, .depth = 3,
# # Consortium: Pull Consortium Data With Username/Password -------------------------------
test_list <- expect_no_error(pmap(select(data_releases_username, cohort, version),
# # Consortium: Try Consortium Data With PUBLIC Username/Password -------------------------------
test_that("Test that trying to pull consortium with public data fails", {
if (.is_connected_to_genie(pat = Sys.getenv("SYNAPSE_PAT_PUBLIC"))) {
# Public: Pull Public Data With Username/Password -----------------------------
test_that("Test no error with Public access PAT, not consortium specific check", {
# No Terms: Pull Public Data With Username/Password -----------------------------
test_that("Test error when access terms not checked", {
# Can terms error message be improved? It's layered and confusing rn but can't think