MuPIT Interactive - Programmatic Link to MuPIT Exercise: Find a protein structure and its amino...
Transcript of MuPIT Interactive - Programmatic Link to MuPIT Exercise: Find a protein structure and its amino...
MuPIT Interactive - Programmatic Link to MuPIT
Exercise: Find a protein structure and its amino residue where the genomic location chr17:7577115 maps to, without using MuPIT’s “Query Your Mutation” panel.
On a web browser, go to
http://mupit.icm.jhu.edu?gm=chr17:7577115
MuPIT Interactive - Programmatic Link to MuPIT
Exercise: Find a protein structure and its amino residue where the genomic location chr17:7577115 maps to, without using MuPIT’s “Query Your Mutation” panel.
MuPIT Interactive - Programmatic Link to MuPIT
Exercise: Find a protein structure and its amino residue where the genomic location chr17:7577115 maps to, without using MuPIT’s “Query Your Mutation” panel.
The format of query URL is
http://mupit.icm.jhu.edu?gm=chromosome:position
MuPIT Interactive - Programmatic Link to MuPIT
Exercise: Find a protein structure and its amino residue where the genomic location chr17:7577115 maps to, without using MuPIT’s “Query Your Mutation” panel.
Not all genomic locations will have a protein location mapping.
The format of query URL is
http://mupit.icm.jhu.edu?gene=gene-name
MuPIT Interactive - Programmatic Link to MuPIT
Exercise: Open MuPIT with a gene name.
MuPIT Interactive - Programmatic Link to MuPIT
Exercise: Make an HTML page with an embedded link to MuPIT.
• Write an HTML page which has a link to MuPIT. Clicking the link should open a new browser window or tab with MuPIT, showing the genomic to protein location mapping for chr10:123279680.
MuPIT Interactive- Programmatic Link to MuPIT
Exercise: Make an HTML page with an embedded link to MuPIT.
<html>
<head></head>
<body>Click <a href=http://mupit.icm.jhu.edu?gm=chr10:123279680 target=“_blank”>here</a> to open a MuPIT Interactive page for chr10:123279680!</body>
</html>
• Write an HTML page which has a link to MuPIT. Clicking the link should open a new browser window or tab with MuPIT, showing the genomic to protein location mapping for chr10:123279680.
MuPIT Interactive- Programmatic Link to MuPIT
Exercise: Make an HTML page with an embedded link to MuPIT.
MuPIT Interactive- Programmatic Link to MuPIT
Exercise: Make an HTML page with an embedded link to MuPIT.
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
(http://training.cravat.us/rest/service/query?mutation=chr22_30421786_+_A_T)
CRAVAT
Browser
Query as URL
Result as JSON{"Chromosome":"chr22","Position":"30421786","Strand":"+","Reference base":"A","Alternate base":"T","HUGO symbol":"MTMR3","Reference transcript (priority to coding change)":"NM_021090.3","Reference transcript strand":"+","Reference transcript codon change":"aAc>aTc","Reference transcript amino acid position":"1198","Reference transcript sequence Ontology":"MS","Reference transcript reference amino acid(s)":"N","Reference transcript protein sequence change":"I","Other transcripts":"NM_153051.2:aAc>aTc:N1161I|1161, NM_153050.2:aAc>aTc:N1170I|1170, ENST00000323630:aAc>aTc:N1062I|1062, ENST00000351488:aAc>aTc:N1161I|1161, ENST00000333027:aAc>aTc:N1170I|1170, ENST00000406629:aAc>aTc:N1170I|1170, ENST00000401950:aAc>aTc:N1198I|1198","ExAC total allele frequency":"0.0021585500799119472503662109375","ExAC allele frequency (African/African American)":"0.0238370001316070556640625","ExAC allele frequency (Latino)":"0.001123600057326257228851318359375","ExAC allele frequency (East Asian)":"0","ExAC allele frequency (Finnish)":"0","ExAC allele frequency (Non-Finnish European)":"0","ExAC allele frequency (Other)":"0.0011037499643862247467041015625","ExAC allele frequency (South Asian)":"0","1000 Genomes allele frequency":"0.0077875400893390178680419921875","ESP6500 allele frequency (European American)":"0","ESP6500 allele frequency (African American)":"0.02269629947841167449951171875","Transcript in COSMIC":"","Protein sequence change in COSMIC":"","Occurrences in COSMIC [exact nucleotide change]":"","Occurrences in COSMIC by primary sites [exact nucleotide change]":""}
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
Exercise: Single-Mutation Query with CRAVAT WebAPI
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
Exercise: Single-Mutation Query with CRAVAT WebAPI
URL: http://training.cravat.us/rest/service/query?mutation= chromosome_position_strand_reference-bases_alternate-bases
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
Exercise: Single-Mutation Query with CRAVAT WebAPI
URL: http://training.cravat.us/rest/service/query?mutation= chromosome_position_strand_reference-bases_alternate-bases
• Get CRAVAT annotation output in JSON format for the mutation A to T on the plus strand of chromosome 22 at position 30421786.
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
Exercise: Single-Mutation Query with CRAVAT WebAPI
URL: http://training.cravat.us/rest/service/query?mutation= chromosome_position_strand_reference-bases_alternate-bases
• Get CRAVAT annotation output in JSON format for the mutation A to T on the plus strand of chromosome 22 at position 30421786.
Use the following URL on a web browser.
http://training.cravat.us/rest/service/query?mutation=chr22_30421786_+_A_T
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
Exercise: Single-Mutation Query with CRAVAT WebAPI
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
"Chromosome":"chr22“"Position":"30421786“"Strand":"+“"Reference base":"A“"Alternate base":"T“"HUGO symbol":"MTMR3“"Reference transcript (priority to coding change)":"NM_021090.3“"Reference transcript strand":"+“"Reference transcript codon change":"aAc>aTc“"Reference transcript amino acid position":"1198“"Reference transcript sequence Ontology":"MS“"Reference transcript reference amino acid(s)":"N“"Reference transcript protein sequence change":"I“"Other transcripts":"NM_153051.2:aAc>aTc:N1161I|1161, NM_153050.2:aAc>aTc:N1170I|1170, ENST00000323630:aAc>aTc:N1062I|1062, ENST00000351488:aAc>aTc:N1161I|1161, ENST00000333027:aAc>aTc:N1170I|1170, ENST00000406629:aAc>aTc:N1170I|1170, ENST00000401950:aAc>aTc:N1198I|1198“"ExAC total allele frequency":"0.0021585500799119472503662109375“"ExAC allele frequency (African/African American)":"0.0238370001316070556640625“"ExAC allele frequency (Latino)":"0.001123600057326257228851318359375“"ExAC allele frequency (East Asian)":"0","ExAC allele frequency (Finnish)":"0“"ExAC allele frequency (Non-Finnish European)":"0“"ExAC allele frequency (Other)":"0.0011037499643862247467041015625“"ExAC allele frequency (South Asian)":"0“"1000 Genomes allele frequency":"0.0077875400893390178680419921875“"ESP6500 allele frequency (European American)":"0“"ESP6500 allele frequency (African American)":"0.02269629947841167449951171875“"Transcript in COSMIC":"","Protein sequence change in COSMIC":"“"Occurrences in COSMIC [exact nucleotide change]":"“"Occurrences in COSMIC by primary sites [exact nucleotide change]":""
Exercise: Single-Mutation Query with CRAVAT WebAPI
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
Extra Credit: Use CRAVAT WebAPI with a Program
• Write a program (of the language of your choice) that queries CRAVAT WebAPI for the 1000 Genomes allele frequency of the mutation A to T on the plus strand of chromosome 22 at position 30421786.
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
Extra Credit: Use CRAVAT WebAPI with a Program
• Write a program (of the language of your choice) that queries CRAVAT WebAPI for the 1000 Genomes allele frequency of the mutation A to T on the plus strand of chromosome 22 at position 30421786.
Python example
>import requests>r = requests.get(‘http://training.cravat.us/rest/service/query?mutation=chr22_30421786_+_A_T’)>output = r.json()>af = float(output[‘1000 Genomes allele frequency’])>af0.007787540089339018
If you don’t have Python “requests” module, try on the command line>pip install requestsOr, follow the instruction on http://docs.python-requests.org/en/latest/user/install/.
>output{u'Transcript in COSMIC': u'', u'Reference transcript (priority to coding change)': u'NM_021090.3', u'Reference transcript protein sequence change': u'I', u'ExAC total allele frequency': u'0.0021585500799119472503662109375', u'ExAC allele frequency (African/African American)': u'0.0238370001316070556640625', u'Reference transcript amino acid position': u'1198', u'Reference transcript strand': u'+', u'ExAC allele frequency (Non-Finnish European)': u'0', u'ExAC allele frequency (South Asian)': u'0', u'Alternate base': u'T', u'HUGO symbol': u'MTMR3', u'1000 Genomes allele frequency': u'0.0077875400893390178680419921875', u'ExAC allele frequency (Other)': u'0.0011037499643862247467041015625', u'Occurrences in COSMIC by primary sites [exact nucleotide change]': u'', u'ESP6500 allele frequency (African American)': u'0.02269629947841167449951171875', u'Position': u'30421786', u'Reference base': u'A', u'Reference transcript codon change': u'aAc>aTc', u'Protein sequence change in COSMIC': u'', u'ExAC allele frequency (East Asian)': u'0', u'ExAC allele frequency (Finnish)': u'0', u'Other transcripts': u'NM_153051.2:aAc>aTc:N1161I|1161, NM_153050.2:aAc>aTc:N1170I|1170, ENST00000323630:aAc>aTc:N1062I|1062, ENST00000351488:aAc>aTc:N1161I|1161, ENST00000333027:aAc>aTc:N1170I|1170, ENST00000406629:aAc>aTc:N1170I|1170, ENST00000401950:aAc>aTc:N1198I|1198', u'Reference transcript sequence Ontology': u'MS', u'Occurrences in COSMIC [exact nucleotide change]': u'', u'Reference transcript reference amino acid(s)': u'N', u'ESP6500 allele frequency (European American)': u'0', u'Strand': u'+', u'ExAC allele frequency (Latino)': u'0.001123600057326257228851318359375', u'Chromosome': u'chr22'}
CRAVAT WebAPI for Single Mutation
Fast, URL-Based Query for One Mutation
Extra Credit: Use CRAVAT WebAPI with a Program
• Write a program (of the language of your choice) that queries CRAVAT WebAPI for the 1000 Genomes allele frequency of the mutation A to T on the plus strand of chromosome 22 at position 30421786.
CRAVAT WebAPI for Job Submission
Programmatic Submission of CRAVAT Jobs
• Submission of a job via HTTP GET or POST• Result will be emailed just as with a web browser-based submission.
CRAVAT WebAPI for Job Submission
Programmatic Submission of CRAVAT Jobs
• Submission of a job via HTTP GET or POST• Result will be emailed just as with a web browser-based submission.
WebAPI URL: http://training.cravat.us/rest/service/submit
CRAVAT WebAPI for Job Submission
Programmatic Submission of CRAVAT Jobs
• Submission of a job via HTTP GET or POST• Result will be emailed just as with a web browser-based submission.
WebAPI URL: http://training.cravat.us/rest/service/submit
For the details of the job submission WebAPI, see Help > How to Use > Web Serviceat http://training.cravat.us.
CRAVAT WebAPI for Job Submission
Programmatic Submission of CRAVAT Jobs
Submission via HTTP GET
• Submission pararmeters in the URL analyses: "CHASM", "SnvGet", "VEST", "CHASM;SnvGet", or "VEST;SnvGet" chasmclassifier: classifier name for CHASM analysis email: email of the submitter hg18: "on" or "off". Input mutations are in hg18 coordinates or not. mutations: a string with mutations. Use “%2B” instead of “+”. tsvreport: "on" or "off". Text format reports returned or not.
• Return value as JSON status: "submitted" for successful job submission, "submissonfailed" for an error in the job
submission errormsg: If there was any error during the job submission, the error message is written here. jobid: The Job ID of the submitted job. This job ID can be used to check the status of the job later
using "status" method which is explained below.
>import requests>r = requests.get('http://training.cravat.us/rest/service/submit?mutations=1%20chr22 %2030421786 %2B A T&chasmclassifier=Ovary&[email protected]&tsvreport=on')>output = r.json()>output[‘status’]u’submitted’
CRAVAT WebAPI for Job Submission
Programmatic Submission of CRAVAT Jobs
Submission via HTTP POST
• Submission pararmeters as dictionaries analyses: "CHASM", "SnvGet", "VEST", "CHASM;SnvGet", or "VEST;SnvGet" chasmclassifier: classifier name for CHASM analysis email: email of the submitter hg18: "on" or "off". Input mutations are in hg18 coordinates or not. inputfile: Input mutation file tsvreport: "on" or "off". Text format reports returned or not.
• Return value as JSON status: "submitted" for successful job submission, "submissonfailed" for an error in the job
submission errormsg: If there was any error during the job submission, the error message is written here. jobid: The Job ID of the submitted job. This job ID can be used to check the status of the job later
using "status" method which is explained below.
>import requests>r = requests.post('http://training.cravat.us/rest/service/submit', files={'inputfile':('input.txt', open('c:\\input.txt', 'r'))}, data={'chasmclassifier':'Ovary', 'email':'[email protected]‘, ‘tsvreport’:’on’})>output = r.json()>output[‘status’]u’submitted’
CRAVAT WebAPI for Job Submission
Programmatic Submission of CRAVAT Jobs
Submission via HTTP POST
• Submission pararmeters as dictionaries analyses: "CHASM", "SnvGet", "VEST", "CHASM;SnvGet", or "VEST;SnvGet" chasmclassifier: classifier name for CHASM analysis email: email of the submitter hg18: "on" or "off". Input mutations are in hg18 coordinates or not. inputfile: Input mutation file tsvreport: "on" or "off". Text format reports returned or not.
• Return value as JSON status: "submitted" for successful job submission, "submissonfailed" for an error in the job
submission errormsg: If there was any error during the job submission, the error message is written here. jobid: The Job ID of the submitted job. This job ID can be used to check the status of the job later
using "status" method which is explained below.
>import requests>r = requests.post('http://training.cravat.us/rest/service/submit', files={'inputfile':('input.txt', open('c:\\input.txt', 'r'))}, data={'chasmclassifier':'Ovary', 'email':'[email protected]‘, ‘tsvreport’:’on’})>output = r.json()>output[‘status’]u’submitted’
input.txt
V1 chr22 30421786 + A T
CRAVAT WebAPI for Job Submission
Programmatic Submission of CRAVAT Jobs
Checking Job Status
• URL: http://training.cravat.us/rest/service/status• Method: GET• Query parameters:
jobid: The job ID to query.• Produces: a JSON object, notable fields of which are as follows.
status: "running" for still running, "completed" for successful completion, "jobfailed" for failed errormsg: Error message if the job failed. resultfileurl: If the job completed successfully, the URL of the result file.
>import requests>r = requests.get('http://www.cravat.us/rest/service/status?jobid=test@20140204_102423’)>output = r.json()>output[‘status’]u’running’
Retrieving Job Result
URL Format: http://training.cravat.us/results/JOBID/JOBID.zipExample: http://training.cravat.us/results/rkim_20150319_104321/rkim_20150319_104321.zip