Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull virtual study details by session info #38

Open
karissawhiting opened this issue Jun 13, 2022 · 0 comments
Open

Pull virtual study details by session info #38

karissawhiting opened this issue Jun 13, 2022 · 0 comments

Comments

@karissawhiting
Copy link
Owner

Currently there isn't a designated API endpoint for pulling data by virtual study ID. One way you could do this is by pulling the session info. For example:

resp <- httr::GET("https://www.cbioportal.org/api/session/virtual_study/6269715f04dc353874696f2a")
resp <- jsonlite::fromJSON(httr::content(resp, "text", encoding = "UTF-8"), simplifyVector = FALSE)
df <- resp$data

df$studies %>% unlist()

                            id                       samples1                       samples2 
"luad_tcga_pan_can_atlas_2018"              "TCGA-69-8253-01"              "TCGA-97-8174-01" 
                      samples3                       samples4                       samples5 
             "TCGA-55-6983-01"              "TCGA-67-4679-01"              "TCGA-44-6776-01" 
                      samples6                       samples7                       samples8 
             "TCGA-L4-A4E6-01"              "TCGA-78-7148-01"              "TCGA-05-4426-01" 
                      samples9                      samples10                      samples11 
             "TCGA-MP-A4TE-01"              "TCGA-80-5608-01"              "TCGA-99-8025-01" 
                     samples12                      samples13                      samples14 
             "TCGA-55-A492-01"              "TCGA-75-6206-01"              "TCGA-78-7161-01" 
                     samples15                      samples16                      samples17 
             "TCGA-62-A46P-01"              "TCGA-50-8460-01"              "TCGA-55-6971-01" 

If we were able to pull sample IDs and their corresponding study IDs in the virtual study, we could then pull data by those pieces of information.

@karissawhiting karissawhiting added this to the v1.1.0 milestone Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant