import requests
jobid = ""
status_job = "http://tmbpred.leloir.org.ar/api/" + jobid;
consult_r = requests.get(status_job)
output_json = consult_r.json()
| Item | Type | Description |
|---|---|---|
| job_id | string of 36 characters Or 'Not found' | is a UUID code which identifies the job |
| status | string of job status | Possible values are Pending, Executing, Successfully, Error or '' (if the jobid is not found). |
| date_done | Date-time | Date and time of the sent job or '' if the jobid is not found. |
import requests
jobid = ""
down_data = "http://tmbpred.leloir.org.ar/download/" + jobid;
consult_r = requests.get(down_data)
if consult_r.status_code == 200:
#save as tar.gz
with open(jobid + ".tar.gz", "wb") as f:
f.write(consult_r.content)
else:
#some error found
output_json = consult_r.json()
| Item | Type | Default | Description |
|---|---|---|---|
| model-cancer | list of at least one Cancer Type ID | [] | Possible cancer types: "BRE", "COL", "END", "GAS", "GLI", "HAV", "LIV", "MEL", "NME", "NSL", "OVA", "PAN", "PRO" and "UNI". See more details in About, subheading List of cancer types. |
| model-quality | char | B | 'B', 'S' or 'X' for Best, Suggested or All Models respectively. |
| model-databy | list of one or two chars | ['G'] | 'G' for Gene and 'E' for Exon. |
| model-subset | list of one, two or three chars | ['O'] | 'O', 'C' and 'F' for Our-strategy, Census-strategy Foundation-one-strategy respectively. |
| string | It is optional, a valid mail to send the job id. | ||
| efile-delimiter | string | \t | '\t', ',', ';', ':', '\s+' for the separator TAB, COMMA, SEMICOLON, COLON and SPACES respectively. |
| efile-header | char o boolean | True | Any value is considered if the file has a header in the first line, except False, 'false', 'n', 'no' or '' indicate has not header. |
| data |
| Item | Type | Description |
|---|---|---|
| message | string | 'Send the job to process' if the data and file sent has not errors, or 'Errors on the submited data' if the data has errors. |
| status | integer | A status code, 200 for Ok, and 400 for Errors. |
| jobid | string | if no errors, this key is present and has the job id. |
| jobtype | string | type of job: CONSULT, PREDICT_BY_MUTATIONS or PREDICT_BY_COORDENATES |
| errors | dictionary | all the errors found in the data and file submited, specified the error origin. |
import requests
pred_tmb = "http://tmbpred.leloir.org.ar/api/pred_mutations"
data_send = {
"model-cancer": "BRE",
"model-quality": "B",
"model-databy": ["G"],
"model-subset": ["O"],
"email": "",
"efile-delimiter": "\t",
"efile-header": True,
"column-gene_exon_id": 1,
"column-mutations": 2
}
file_send = {
"efile-filename": ("example_by_mutations.txt", open("ejemplo.txt","rb"), "text/plain")
}
consult_r = requests.post(pred_tmb, data=data_send, files=file_send)
output_json = consult_r.json()
| Item | Type | Default | Description |
|---|---|---|---|
| model-cancer | list of at least one Cancer Type ID | [] | Possible cancer types: "BRE", "COL", "END", "GAS", "GLI", "HAV", "LIV", "MEL", "NME", "NSL", "OVA", "PAN", "PRO" and "UNI". See more details in About, subheading List of cancer types. |
| model-quality | char | B | 'B', 'S' or 'X' for Best, Suggested or All Models respectively. |
| model-databy | list of one or two chars | ['G'] | 'G' for Gene and 'E' for Exon. |
| model-subset | list of one, two or three chars | ['O'] | 'O', 'C' and 'F' for Our-strategy, Census-strategy Foundation-one-strategy respectively. |
| string | It is optional, a valid mail to send the job id. | ||
| efile-delimiter | string | \t | '\t', ',', ';', ':', '\s+' for the separator TAB, COMMA, SEMICOLON, COLON and SPACES respectively. |
| efile-header | char o boolean | True | Any value is considered if the file has a header in the first line, except False, 'false', 'n', 'no' or '' indicate has not header. |
| data |
| Item | Type | Description |
|---|---|---|
| message | string | 'Send the job to process' if the data and file sent has not errors, or 'Errors on the submited data' if the data has errors. |
| status | integer | A status code, 200 for Ok, and 400 for Errors. |
| jobid | string | if no errors, this key is present and has the job id. |
| jobtype | string | type of job: CONSULT, PREDICT_BY_MUTATIONS or PREDICT_BY_COORDENATES |
| errors | dictionary | all the errors found in the data and file submited, specified the error origin. |
import requests
pred_tmb = "http://tmbpred.leloir.org.ar/api/pred_coordenates"
data_send = {
"model-cancer": "BRE",
"model-quality": "B",
"model-databy": ["G"],
"model-subset": ["O"],
"email": "",
"efile-delimiter": "\t",
"efile-header": True,
"column-chromosome": 1,
"column-start_position": 2,
"column-end_position": 3
}
file_send = {
"efile-filename": ("example_by_coordenates.txt", open("ejemplo.txt","rb"), "text/plain")
}
consult_r = requests.post(pred_tmb, data=data_send, files=file_send)
output_json = consult_r.json()
| Item | Type | Default | Description |
|---|---|---|---|
| model-cancer | list of at least one Cancer Type ID | [] | Possible cancer types: "BRE", "COL", "END", "GAS", "GLI", "HAV", "LIV", "MEL", "NME", "NSL", "OVA", "PAN", "PRO" and "UNI". See more details in About, subheading List of cancer types. |
| model-quality | char | B | 'B', 'S' or 'X' for Best, Suggested or All Models respectively. |
| model-databy | list of one or two chars | ['G'] | 'G' for Gene and 'E' for Exon. |
| model-subset | list of one, two or three chars | ['O'] | 'O', 'C' and 'F' for Our-strategy, Census-strategy Foundation-one-strategy respectively. |
| string | It is optional, a valid mail to send the job id. |
| Item | Type | Description |
|---|---|---|
| message | string | 'Send the job to process' if the data and file sent has not errors, or 'Errors on the submited data' if the data has errors. |
| status | integer | A status code, 200 for Ok, and 400 for Errors. |
| jobid | string | if no errors, this key is present and has the job id. |
| jobtype | string | type of job: CONSULT, PREDICT_BY_MUTATIONS or PREDICT_BY_COORDENATES |
| errors | dictionary | all the errors found in the data and file submited, specified the error origin. |
import requests
consult_models = "http://tmbpred.leloir.org.ar/api/models"
data_send = {
"model-cancer": "BRE",
"model-quality": "B",
"model-databy": ["G"],
"model-subset": ["O"],
"email": ""
}
consult_r = requests.post(consult_models, data=data_send)
output_json = consult_r.json()
We propose two file templates to run the analysis and consider how appropiate TMBpred server is for your needs.The examples are purely fictitious and any resemblance to existing sample ID is purely coincidental: Example of input file to predict TMB by amount of mutations per gene/exon Example of input file to predict TMB by mutated genomic coordenates
After the execution and when the process is ended, you will have access to the results indicating your Job ID in the job status tab (in case you have added your email account, you will be notified there as well). Finally, you will receive a tar.gz file which contains 4 .txt files + README.pdf with a detail description of each file + other .pdf files with graphically results (the number of these files depends on the quality parameter you have selected): Example of output file to predict TMB by amount of Mutations Example of output file to predict TMB by mutated genomic coordenates
If you want to ascertain the genes/exons model(s) to be sequenced by cancer type, you will receive a tar.gz file which contains 2 .txt files + README.pdf with a detail description of each file: Example of output file to query the panel