Querying all samples within cBio portal with a specific mutation

315 views
Skip to first unread message

Jeremy Ng

unread,
Sep 13, 2021, 9:55:34 AM9/13/21
to cbiop...@googlegroups.com
Hi everyone,

I spent quite some time reading through the cBioPortal API documentations but am still feeling a little lost, so am hoping to for some advice on what is a suitable end point (if at all) for my use case.

What I would like to do is to search for all samples across all projects which contain a specific mutation. From this search, I would like to be able to calculate how many samples with the mutation are of a specific cancer type (e.g. breast cancer).

Could anyone point me in the right direction on how do I go about accomplishing this?

Thanks in advance!

Jeremy

pr...@ds.dfci.harvard.edu

unread,
Sep 13, 2021, 2:32:56 PM9/13/21
to Jeremy Ng, cbiop...@googlegroups.com
Hi Jeremy,

You should be able to run this query from cBioPortal webpage by selecting “Curated list of non-redundant studies” and “Query by gene” option. You can use OQL to query for specific mutation (Example BRAF: MUT=V600E). 
Is there any specific reason you want to use the API?

Thanks,
Priti 
--
You received this message because you are subscribed to the Google Groups "cBioPortal for Cancer Genomics Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cbioportal+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cbioportal/CAL93JYuXgW%3DOfVn0jqnjS20GgxsGJP8NTipsnHOm-_JR0AiPhg%40mail.gmail.com.

Ino de Bruijn

unread,
Sep 15, 2021, 2:18:57 PM9/15/21
to pr...@ds.dfci.harvard.edu, Jeremy Ng, cBioPortal for Cancer Genomics Discussion Group
Hi Jeremy,

Thanks for reaching out!

How it currently works on the website if you e.g. search for BRAF V600E across the list of non-redundant curated studies. You would pull all BRAF mutations for all samples across the list of non-redundant curated studies. Then filter by V600E programmatically. For each of the remaining samples you can get the CANCER_TYPE or CANCER_TYPE_DETAILED clinical attribute.

It's currently not possible to pull the list of non-redundant studies from the API, but you can find the study ids here:


Does that help?

Note that the calculation can become quite complex if you want to take into account which samples were profiled for that gene. In that case you would also want to pull the gene panel info for each sample.

Best wishes,
Ino



Jeremy Ng

unread,
Sep 15, 2021, 6:48:24 PM9/15/21
to Ino de Bruijn, pr...@ds.dfci.harvard.edu, cBioPortal for Cancer Genomics Discussion Group
Hi Ino,

Great thanks, that was very helpful! I'd implement it using your suggestion then!

Jeremy 

On 16 Sep 2021, at 2:18 AM, Ino de Bruijn <i...@ino.pm> wrote:



Ryan Abo

unread,
May 28, 2022, 4:00:47 AM5/28/22
to cBioPortal for Cancer Genomics Discussion Group
Hi Ino,

I am interested in the gene panel info for each sample to have a better resolution of mutation frequencies. How do I obtain this information using the API?

Thank you,

Ryan

Sjoerd van Hagen

unread,
May 30, 2022, 9:17:42 AM5/30/22
to Ryan Abo, cBioPortal for Cancer Genomics Discussion Group, de Bruijn, Ino/Sloan Kettering Institute
Hi Ryan,

Adding Ino on CC so he will get your message.

Best,

Sjoerd.

---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    


debr...@mskcc.org

unread,
Jun 9, 2022, 6:45:26 PM6/9/22
to ryan...@gmail.com, cbiop...@googlegroups.com, sjo...@thehyve.nl

Hi Ryan,

 

Thanks for reaching out! Apologies for the delay

 

There is the /api/gene-panel-data endpoint. E.g. for the mskimpact 2017 study:

 

curl 'https://www.cbioportal.org/api/gene-panel-data/fetch'    -H 'accept: application/json'      -H 'content-type: application/json'               --data-raw '{"molecularProfileIds":["msk_impact_2017_cna","msk_impact_2017_mutations","msk_impact_2017_fusion"]}'   --compressed

 

This will return what sample is profiled for what panel. And then you can use /api/gene-panels to see what genes are profiled in that panel.

 

For an example you can open the network tab for this query and look for gene-panel* endpoints (see screenshot):

 

https://bit.ly/3HUfpeY

 

Hope that helps!

 

Best wishes,

Ino

 

From: Sjoerd van Hagen <sjo...@thehyve.nl>
Date: Monday, May 30, 2022 at 9:17 AM
To: Ryan Abo <ryan...@gmail.com>
Cc: cBioPortal for Cancer Genomics Discussion Group <cbiop...@googlegroups.com>, "de Bruijn, Ino/Sloan Kettering Institute" <debr...@mskcc.org>
Subject: [EXTERNAL] Re: [cbioportal] Querying all samples within cBio portal with a specific mutation

 

Hi Ryan,

 

Adding Ino on CC so he will get your message.

 

Best,

 

Sjoerd.

 

---

 

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets

 

E sjo...@thehyve.nl

T +31 30 700 9713

 

Image removed by sender.


Image removed by sender.  Image removed by sender.  Image removed by sender.

 



*** Only open attachments or links from trusted senders. Report phishing to inf...@mskcc.org ***

 

=====================================================================

Please note that this e-mail and any files transmitted from
Memorial Sloan Kettering Cancer Center may be privileged, confidential,
and protected from disclosure under applicable law. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any reading, dissemination, distribution,
copying, or other use of this communication or any of its attachments
is strictly prohibited. If you have received this communication in
error, please notify the sender immediately by replying to this message
and deleting this message, any attachments, and all copies and backups
from your computer.

Screen Shot 2022-06-09 at 6.44.11 PM.png
Reply all
Reply to author
Forward
0 new messages