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

How to get mRNA expression profiles #71

Open
ypradat opened this issue Jan 17, 2024 · 2 comments
Open

How to get mRNA expression profiles #71

ypradat opened this issue Jan 17, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@ypradat
Copy link

ypradat commented Jan 17, 2024

Dear @karissawhiting ,

I am opening another issue as I have been unable to load mRNA expression profiles from cbioportal. I tried the following.

set_cbioportal_db("public")

mycancerstudy <- "blca_tcga_pan_can_atlas_2018"

# get patient and sample lists for the study
mypatientlist <- available_patients(mycancerstudy)$patientId
mysamplelist <- available_samples(mycancerstudy)$sampleId

# check available molecular profiles and select the molecular profile for mRNA withouth Zscore transfo
geneticprofiles <- available_profiles(study_id=mycancerstudy) %>% pull(molecularProfileId)
geneticprofiles <- geneticprofiles[grepl("mrna", geneticprofiles)]
geneticprofiles <- geneticprofiles[!grepl("Zscores", geneticprofiles)]

# select the one i want
geneticprofile <- "tblca_tcga_pan_can_atlas_2018_rna_seq_v2_mrna"

# TRY 1: does not work
sample_study_pairs <- data.frame(sample_id=mysamplelist)
sample_study_pairs$study_id <- mycancerstudy
sample_study_pairs$molecular_profile_id <- geneticprofile
df_data <- get_genetics_by_sample(sample_study_pairs=sample_study_pairs, add_hugo=T)

# TRY 2: does not work either
body_api <- list(entrezGeneIds = EntrezGenes,
                             sampleIds = mysamplelist) %>%
                        purrr::discard(is.null)

body_url <- paste0("molecular-profiles/", geneticprofile, "/mrna-percentile/fetch?")
res <- cbp_api(url_path=body_url,
               method="post",
               body=body_api,
               base_url="www.cbioportal.org")
result <- purrr::map_dfr(res$content, ~purrr::list_flatten(.x))

I check on the API documentation here https://www.cbioportal.org/api/swagger-ui/index.html#/mRNA%20Percentile and was very surprised to see that the example request for mrna, i.e https://www.cbioportal.org/api/molecular-profiles/acc_tcga_rna_seq_v2_mrna/mrna-percentile/fetch?sampleId=TCGA-OR-A5J2-01, returns nothing in the body.

Can you advise on the procedure to retrieve mRNA expression profiles?

My settings are as in #70 .

Best regards,
Yoann Pradat

@karissawhiting
Copy link
Owner

Hi @ypradat ! We don't support that endpoint yet (I believe it is a recent addition to endpoints in the cbioportal API). Currently we only support maf mutation files, copy number alterations and fusions.

I will keep this issue open and add this as a requested feature.

When I run the example on the docs you sent, I also get blank response, so may be worth reaching out to the cbioportal team regarding this specific data.

Thanks for your comments and suggestions!

@karissawhiting karissawhiting added the enhancement New feature or request label Jan 17, 2024
@ypradat
Copy link
Author

ypradat commented Jan 17, 2024

Ok I see, that would be great thanks!

The thing is I am very puzzled by the fact that a previous R api client named cgdsr (https://github.com/cBioPortal/cgdsr) was working just fine before they decided to change the API and deprecate this client.

Now I am trying to have a simple R function to get mRNA expression data dynamically via the API and am unable to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants