Feature Development

51 views
Skip to first unread message

Ishan Dusane

unread,
Dec 4, 2021, 8:43:17 AM12/4/21
to cBioPortal for Cancer Genomics Discussion Group
I was trying to make some changes in front-end. Starting with changing some colours of graphs in the comparison tab(as shown in attached photo). 
What is the procedure to do so? 
Screen Shot 2021-12-04 at 7.09.33 PM.png

lisman...@gmail.com

unread,
Dec 6, 2021, 10:40:39 AM12/6/21
to cBioPortal for Cancer Genomics Discussion Group
Hi Ishan, 

What is your goal?   

If this is just for your personal use, you could achieve this without any code changes by logging in, creating the groups as custom groups (in the study view) at which point you can assign a color to them.  

Let us know what your end goal is and we can better point you toward the right solution.

--Aaron  

Ishan Dusane

unread,
Dec 30, 2021, 8:28:12 AM12/30/21
to cBioPortal for Cancer Genomics Discussion Group
Hi Aaron,

Sorry for late reply. The end goal of my task is to achieve a drug dosage recommendation for mutated genes.

I would like to add :- 1. (Frontend)- a page beside download dataset page which would render the drug recommendation part. 2. (Backend)- I have a data set in CSV format which I would like to upload it to cbioportal database and fetch that data to the front-end as mentioned in the first point.

How can I achieve that?

Thank you
Ishan

Sjoerd van Hagen

unread,
Jan 3, 2022, 4:51:28 PM1/3/22
to Ishan Dusane, cBioPortal for Cancer Genomics Discussion Group
Hi Ishan,

It would probably be easiest to use a custom tab instead of changing the cBioPortal code base. In that case you can have a separate back end for your own data.

Best,

Sjoerd.

---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    


Disclaimer
The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to share any part of this message with any third party, without a written consent of the sender. If you received this message by mistake, please reply to this message and follow with its deletion, so that we can ensure such a mistake does not occur in the future. Opinions, conclusions and other information in this message that do not relate to the official business of the sender's company shall be understood as neither given nor endorsed by it. 

Finally, please do not print this email unless it is necessary. Every unprinted email helps the environment.

--
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/8b4f78c6-8471-4881-93ea-3d17267694cdn%40googlegroups.com.

Aaron Lisman

unread,
Jan 3, 2022, 5:07:57 PM1/3/22
to Sjoerd van Hagen, Ishan Dusane, cBioPortal for Cancer Genomics Discussion Group
I agree with Sjoerd that this sounds like a good use case for custom tabs.  Unfortunately, I don't believe we've documented custom tabs yet.  I did the rough implementation of this and I think Diana has used it so I'll chat with her.

--Aaron

You received this message because you are subscribed to a topic in the Google Groups "cBioPortal for Cancer Genomics Discussion Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cbioportal/17hW-JA43PU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cbioportal+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cbioportal/CABEWdpWHN6x_O_%2B5EtNGJ50Db6Z1t1saj4iY3Top%3DTnou1%2BLwg%40mail.gmail.com.

Ishan Dusane

unread,
Jan 9, 2022, 1:15:18 AM1/9/22
to cBioPortal for Cancer Genomics Discussion Group
Thank you Sjoerd and Aaron for the input. As suggested I'll go with the custom tabs. 
What I want to do is whenever we search the gene by putting it in a query text box, it show the genetic alteration(or mutations) in the "OncoPrint" tab. Whenever we search some gene I would like to get the list(or the data from backend) of all the genetic alteration(or mutations) which will act as a input to my database.

For example please refer the image attached.
In that we have got all the genetic alteration(or mutations) for TP53. 

OncoPrint tab is getting the list of genetic alteration(or mutations) from the backend, I want that list of genetic alteration(or mutations).

So how can I get that list? Or if you can point me to the backend code from where this list is been fetched it would be very helpful.
Screen Shot 2022-01-09 at 11.35.15 AM.png

Sjoerd van Hagen

unread,
Jan 17, 2022, 3:21:35 PM1/17/22
to Ishan Dusane, cBioPortal for Cancer Genomics Discussion Group
Hi Ishan,

I would say that if you want to have that list for your own database, it will be easiest to just pull it using the REST API instead. See https://www.cbioportal.org/api/swagger-ui.html for the documentation.

Best,

Sjoerd.

---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    

Ishan Dusane

unread,
Jan 22, 2022, 8:07:52 AM1/22/22
to cBioPortal for Cancer Genomics Discussion Group
Hi Sjoerd,
I have few doubts.
First:
I have cbioportal(frontend) running on my localhost. I followed this steps.
1.rm -rf node_modules
2.yarn install --frozen-lockfile
3.yarn run buildDLL:dev
4.yarn run start
After this steps whenever I make changes in code and save it, it won't automatically restart the server and I'm getting this error show in screenshot named "frontend_issue". This issue occurs each time I make changes in code and I have to run again from step one.

Second:
I want the list(names) of all the underline mutation occurred in TP53  as shown in the screenshot named "mutation_list". I looked in swagger but I'm not very sure which api should I consume to get those list and can you also give me the flow of api to be called to get the mutation list.
And do I need to have a authorisation token(that is call authorisation token api) before calling the required(mutation_list) api. Or if there is any documents which indicates the flow of the apis

Third:
I'm trying to run apis mentioned in swagger. I'm not getting expected output in postman as shown in swagger(responses). I'm getting some HTML response despite of "200 Ok" status code. Attaching the screenshot named "postman_response". How can we get the json response

I would really like to join the meetings(if we have this facilities) for feature developments so that I could clear my doubts. What's the team meeting links or from where to join the team meetings.

Thank you
Ishan Dusane
mutation_list.png
frontend_issue.png
postman_response.png

Sjoerd van Hagen

unread,
Jan 24, 2022, 1:18:22 AM1/24/22
to Ishan Dusane, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Ishan,

For the technical details I am referring  you to Aaron.

I do see that the URL in your postman example is not correct, it needs to go via the api endpoint like so: https://www.cbioportal.org/api/molecular-profiles/{molecularProfileId}/mutations/fetch

I hope this helps.

Best,

Sjoerd.

---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    

Ishan Dusane

unread,
Jan 24, 2022, 1:23:42 AM1/24/22
to Sjoerd van Hagen, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Sjoerd,

Thank you for the input. I corrected that.
Can you just tell me about the frontend issue which I have mentioned?.
And how can I contact Aaron for technical details because I'm still not able to get the flow of the api to get the mutation list

Thank you
Ishan Dusane

Sjoerd van Hagen

unread,
Jan 24, 2022, 1:30:24 AM1/24/22
to Ishan Dusane, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Ishan,

The front end issue I cannot help you with.

For the API, I think you need to go to /molecular-profiles to find the relevant molecular profile and then use /mutations/fetch

There you would put something like this:
{
  "entrezGeneIds": [
    7157
  ],
  "molecularProfileIds": [
    "skcm_tcga_pan_can_atlas_2018_mutations"
  ] 
}
as the mutationMultipleStudyFilter and it will give you something like this:
[
  {
    "uniqueSampleKey": "VENHQS1EOS1BNkVDLTA2OnNrY21fdGNnYV9wYW5fY2FuX2F0bGFzXzIwMTg",
    "uniquePatientKey": "VENHQS1EOS1BNkVDOnNrY21fdGNnYV9wYW5fY2FuX2F0bGFzXzIwMTg",
    "molecularProfileId": "skcm_tcga_pan_can_atlas_2018_mutations",
    "sampleId": "TCGA-D9-A6EC-06",
    "patientId": "TCGA-D9-A6EC",
    "entrezGeneId": 7157,
    "studyId": "skcm_tcga_pan_can_atlas_2018",
    "center": ".",
    "mutationStatus": ".",
    "validationStatus": ".",
    "tumorAltCount": 56,
    "tumorRefCount": 1,
    "normalAltCount": 0,
    "normalRefCount": 67,
    "startPosition": 7578212,
    "endPosition": 7578212,
    "referenceAllele": "G",
    "proteinChange": "R213*",
    "mutationType": "Nonsense_Mutation",
    "functionalImpactScore": "",
    "fisValue": 1.4013e-45,
    "linkXvar": "",
    "linkPdb": "",
    "linkMsa": "",
    "ncbiBuild": "GRCh37",
    "variantType": "SNP",
    "keyword": "TP53 truncating",
    "chr": "17",
    "variantAllele": "A",
    "refseqMrnaId": "NM_001126112.2",
    "proteinPosStart": 213,
    "proteinPosEnd": 213
  },
  {
    "uniqueSampleKey": "VENHQS1FQi1BNUZQLTAxOnNrY21fdGNnYV9wYW5fY2FuX2F0bGFzXzIwMTg",
    "uniquePatientKey": "VENHQS1FQi1BNUZQOnNrY21fdGNnYV9wYW5fY2FuX2F0bGFzXzIwMTg",
    "molecularProfileId": "skcm_tcga_pan_can_atlas_2018_mutations",
    "sampleId": "TCGA-EB-A5FP-01",
    "patientId": "TCGA-EB-A5FP",
    "entrezGeneId": 7157,
    "studyId": "skcm_tcga_pan_can_atlas_2018",
    "center": ".",
    "mutationStatus": ".",
    "validationStatus": ".",
    "tumorAltCount": 34,
    "tumorRefCount": 6,
    "normalAltCount": 0,
    "normalRefCount": 69,
    "startPosition": 7578212,
    "endPosition": 7578212,
    "referenceAllele": "G",
    "proteinChange": "R213*",
    "mutationType": "Nonsense_Mutation",
    "functionalImpactScore": "",
    "fisValue": 1.4013e-45,
    "linkXvar": "",
    "linkPdb": "",
    "linkMsa": "",
    "ncbiBuild": "GRCh37",
    "variantType": "SNP",
    "keyword": "TP53 truncating",
    "chr": "17",
    "variantAllele": "A",
    "refseqMrnaId": "NM_001126112.2",
    "proteinPosStart": 213,
    "proteinPosEnd": 213
  }, ....

I think that is what  you need, correct?

Best,

Sjoerd.


---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    

Ishan Dusane

unread,
Jan 25, 2022, 5:45:10 AM1/25/22
to Sjoerd van Hagen, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Sjoerd,

Thank you for your input. I'm running this api and I'm getting this 400 bad request error as shown in the screenshot. What am I doing wrong?
api_ss.png

Sjoerd van Hagen

unread,
Jan 25, 2022, 7:04:20 AM1/25/22
to Ishan Dusane, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Ishan,

If I recall correctly, you should have either molecularProfileIds or sampleMolecularIdentifiers, not both. Can you try that?

Best,

Sjoerd.

---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    

Ishan Dusane

unread,
Jan 25, 2022, 8:59:29 AM1/25/22
to Sjoerd van Hagen, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Sjoerd,

I tried what you suggested(attached a screenshot). Still not working?
api_ss2.png

Sjoerd van Hagen

unread,
Jan 25, 2022, 9:03:58 AM1/25/22
to Ishan Dusane, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
You would need to remove the whole molecularProfileIds or sampleMolecularIdentifiers block

---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    

Ishan Dusane

unread,
Jan 25, 2022, 9:06:20 AM1/25/22
to Sjoerd van Hagen, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Then it gives 500 internal server error.
api_ss3.png

Sjoerd van Hagen

unread,
Jan 25, 2022, 9:31:34 AM1/25/22
to Ishan Dusane, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
You have used the study id instead of the molecular profile id, which is "es_iocurie_2014_mutations"

---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    

Ishan Dusane

unread,
Jan 26, 2022, 12:42:25 AM1/26/22
to Sjoerd van Hagen, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Sjoerd,
I tried what you suggested but still giving me 500 internal server error. I'm not sure if I'm passing right Json request, please correct me if I'm wrong. Attaching the screenshot
api_ss4.png

Sjoerd van Hagen

unread,
Jan 26, 2022, 3:29:23 AM1/26/22
to Ishan Dusane, de Bruijn, Ino/Sloan Kettering Institute, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Ishan,

You are not using the end point I mentioned for retrieving mutations: mutations/fetch

You need to POST:
{
  "entrezGeneIds": [
    7157,
10735
  ],
  "molecularProfileIds": [
    "es_iocurie_2014_mutations"
  ]
}


You can see it works if you run this curl command: curl -X POST "https://www.cbioportal.org/api/mutations/fetch?direction=ASC&pageNumber=0&pageSize=10000000&projection=SUMMARY" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"entrezGeneIds\": [    7157,10735  ],  \"molecularProfileIds\": [    \"es_iocurie_2014_mutations\"  ]}"

@de Bruijn, Ino/Sloan Kettering Institute can you check why the request Ishan made is producing a 500? It should produce a more helpful error message.

Best,

Sjoerd.


---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    

Ishan Dusane

unread,
Jan 26, 2022, 5:26:53 AM1/26/22
to Sjoerd van Hagen, de Bruijn, Ino/Sloan Kettering Institute, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Sjoerd,

Thank you so much it worked.
Now is it possible to get all the mutation("mutationType") by Hugo Gene Symbol
Explanation: I just want to take Hugo Gene Symbol as an input as we are taking in Onco Query Language in cbioportal and get the mutations(Genetic Alterations) as we are getting there in the "OncoPrint" tab. If yes can you help me with the apis to be consumed for achieving the task.
Or this task is already performed by cbioportal, is there any way to pass the mutation list which we are getting to my custom tab.

Thank you
Ishan Dusane

Sjoerd van Hagen

unread,
Jan 26, 2022, 9:31:27 AM1/26/22
to Ishan Dusane, de Bruijn, Ino/Sloan Kettering Institute, cBioPortal for Cancer Genomics Discussion Group, Aaron Lisman
Hi Ishan,

Just check the API documentation to find the right call: https://www.cbioportal.org/api/swagger-ui.html#/Genes/getAllGenesUsingGET

Best,

Sjoerd.

---

Sjoerd van Hagen

Team Lead cBioPortal & Open Targets


E sjo...@thehyve.nl

T +31 30 700 9713



    

Reply all
Reply to author
Forward
0 new messages