class ProteomeScoutAPI()
def __init__(filename)
filename should be a ProteomeScout flatfile
def get_PTMs(ID)
Return all PTMs associated with the ID in question.
ID: str accession number to query in PTM_API
Returns:
ptm_list
- list list of ptms in tuples [(position, residue, modification-type),...,]. Returns -1 if unable to find the ID Returns [] (empty list) if no modifications
def get_structure(ID)
Return all structures associated with the ID in question.
POSTCONDITIONS:
Returns a list of tuples of structure
if there is a problem with the start and end position, these will be
returned as -1
[(domain_name, start_position, end_position),...,]
Returns -1 if unable to find the ID
Returns [] (empty list) if no structures
def get_domains(ID, domain_type)
Return all domains associated with the ID in question. For pfam domains domain_type is 'pfam' For UniProt domains domain_type is 'uniprot'
POSTCONDITIONS:
Returns a list of tuples of domains if there is a problem with the start and end position, these will be returned as -1 [(domain_name, start_position, end_position),...,]
Returns -1 if unable to find the ID
Returns [] (empty list) if no modifications
def get_domains_harmonized(ID)
This will harmonize pfam and uniprot domains into one tuple output with the following rules: 1. Use the pfam domain name (since it does not append numbers if more than one domain of that type) 2. Use the Uniprot domain boundaries (since they are typically more expansive) 3. If uniprot does not have a pfam domain, use the pfam domain as it is POSTCONDITIONS:
Returns a list of tuples of domains if there is a problem with the start and end position, these will be returned as -1 [(domain_name, start_position, end_position),...,]
Returns -1 if unable to find the ID
Returns [] (empty list) if no domains
def get_Scansite(ID)
Return all Scansite annotations that exist for a protein record (ID)
POSTCONDITIONS:
Returns a dict of tuples of scansite predictions. dictionary keys are the type of Scansite prediction (bind, kinase) Tuples in each are [(residuePosition, kinase/bind name, score),...,]
Returns -1 if unable to find the ID
Returns [] (empty list) if no scansite predictions
def get_Scansite_byPos(ID, res_pos)
Return all Scansite annotations that exist at a specific residue position, given as the AminoAcidPos, e.g. T183
POSTCONDITIONS:
Returns a list of tuples of modifications [(position, residue, modification-type),...,]
Returns -1 if unable to find the ID
Returns empty dictionary if no Scansite. Returns emtpy lists in Dictionary items if no Scansite predictions found at that site
def get_nearbyPTMs(ID, pos, window)
Return all PTMs associated with the ID in question that reside within +/-window, relative to the designated position (pos)
POSTCONDITIONS:
Returns a list of tuples of modifications [(position, residue, modification-type),...,]
Returns -1 if unable to find the ID
Returns [] (empty list) if no modifications
def get_species(ID)
Return the species associated with the ID in question. POSTCONDITIONS:
Returns a string of the species name
Returns '-1' if unable to find the ID
Returns '' (empty list) if no species
def get_sequence(ID)
Return the sequence associated with the ID in question. POSTCONDITIONS:
Returns a string of the sequence
Returns '-1' if unable to find the ID
Returns '' (empty list) if no sequence
def get_acc_gene(ID)
Return the gene name associated with the ID in question. POSTCONDITIONS:
Returns a string of the gene name
Returns '-1' if unable to find the ID
Returns '' (empty list) if no gene name
def get_phosphosites(ID)
Return all phosphosites associated with the ID in question.
POSTCONDITIONS:
Returns a list of tuples of phosphosites [(position, residue, phosphosite-type),...,]
Returns -1 if unable to find the ID
Returns [] (empty list) if no modifications
def get_evidence(ID)
Return all evidence associated with modifications for the ID in question.
POSTCONDITIONS:
Returns a list of tuples of evidence [(numEvidences, [ArrayOfEvidences], (numEvidences ScecondSite, [ArrayOfEvidences], etc.]
Returns -1 if unable to find the ID
Returns [] (empty list) if no modifications/evidences
def get_mutations(ID)
Return all mutations associated with the ID in question. mutations = PTM_API.get_mutations(ID)
POSTCONDITIONS:
Returns a list of tuples of mutations [(original residue, position, new residue, annotation),...,]
Returns -1 if unable to find the ID Returns -2 if the number of mutations and annotations do not match
Returns [] (empty list) if no mutations
def get_GO(ID)
Return all GO terms associated with the ID in question
POSTCONDITIONS:
Returns a list of GO Terms
Returns a -1 if unable to find the ID
Returns a [] (empty list) if no GO terms
def get_kinaseLoops(ID)
Return kinase activation loop with the ID in question
POSTCONDITIONS:
Returns a tuple of (loop/predicted, start, stop)
Returns a -1 if unable to find the ID
Returns a [] (empty list) if no kinase activation loops
def get_accessions(ID)
Return a list of accessions associated with the protein
POSTCONDITIONS:
Returns a list of the protein's accessions
Returns a -1 if unable to find the ID
def get_PTMs_withEvidenceThreshold(ID, evidenceThreshold)
Return all PTMs associated with the ID in question that have at least evidenceThreshold or more pieces of experimental or database evidence
POSTCONDITIONS:
Returns a list of tuples of modifications [(position, residue, modification-type),...,]
Returns -1 if unable to find the ID Returns -2 if the modifications have a mismatched evidence array
Returns [] (empty list) if no modifications fit that threshold
def get_PTMs_withEvidence(ID)
Return PTMs as a list of dictionaries with both the modification information and the evidence associated with that.
POSTCONDITIONS:
Returns a list of dictionaries, keys are 'mod' and 'evidence'. dictionary[0]['mod'] is an array with (position, residue, modification-type) of the first PTM in the ID record dictionary[0]['evidence'] is a list of experiment IDs for that PTM
Returns -1 if unable to find ID Returns -2 if the modifications have a mimatched evidence array
Returns [] (empty list) if no modifications