CRI-iAtlas / iatlasGraphQLClient

Other
0 stars 1 forks source link

Argument "cohort" not working in functions #32

Closed heimannch closed 1 month ago

heimannch commented 3 months ago

@andrewelamb, adding the argument cohort to a query makes it return no results. Example below:

Before:

#getting ICI data
#datasets that we have in the iAtlas database
ici_datasets <- iatlasGraphQLClient::query_datasets(types = "ici")

#immune features of all samples in the ici datasets
features_df <- iatlasGraphQLClient::query_features(cohorts = ici_datasets$name)
head(features_df)
name display class order unit method_tag
B_cells_Aggregate2 B Cells Immune Cell Proportion - Common Lymphoid and Myeloid Cell Derivative Class 3 Fraction CIBERSORT
B_cells_Aggregate3 B Cells Immune Cell Proportion - Differentiated Lymphoid and Myeloid Cell Derivative Class 4 Fraction CIBERSORT
B_cells_memory B Cells Memory Immune Cell Proportion - Original 9 Fraction CIBERSORT
B_cells_naive B Cells Naive Immune Cell Proportion - Original 8 Fraction CIBERSORT
BIOCARTA_CTLA4_V_Bindea_Th1_Cells CTLA4 vs Th1 Predictor of Response to Immune Checkpoint Treatment NA Fraction NA
Cytolytic_Score Cytolytic Score Predictor of Response to Immune Checkpoint Treatment NA Score NA

Now:

#getting ICI data
ici_datasets <- iatlasGraphQLClient::query_datasets(types = "ici")

features_df <- iatlasGraphQLClient::query_features(cohorts = ici_datasets$name)

# now, this query returns nothing:
head(features_df)
# A tibble: 0 × 6
# ℹ 6 variables: name <chr>, display <chr>, class <chr>, order <int>, unit <chr>, method_tag <chr>

This was observed for the following queries:

iatlasGraphQLClient::query_features()
iatlasGraphQLClient::query_tags()
iatlasGraphQLClient::query_genes()

I am using iatlasGraphQLClient_0.2.4 and the live database.

This is only affecting a few notebooks, the web app is working fine - so this is not an urgent issue.

heimannch commented 3 months ago

Update: I decided to be more explicit in setting the database version used, and with that I noticed that this issue only happens in the current staging database.

.GlobalEnv$API_URL <- "https://api.cri-iatlas.org/api"
# queries work fine!

.GlobalEnv$API_URL <- "https://api-staging.cri-iatlas.org/api"
# issue happens