Data Integrator (Python API)
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
cls.GODBAccess.CGODBAccess Class Reference
Collaboration diagram for cls.GODBAccess.CGODBAccess:
Collaboration graph
[legend]

Public Member Functions

def Initialize (self, config)
 Initialize the module establish a connection to the database. More...
 
def CloseConnection (self)
 Close the connection to the database. More...
 
def Protein2GO (self, protein, category=None, manualOnly=False, limitToTerms=None, omitEvidenceCodeND=False, omitEvidenceCode=[])
 Get the GO terms that are annotated to a (list of) protein(s). More...
 
def GO2Protein (self, terms, maxDistance=None, minDistance=None, taxon=[], manualOnly=False, useTrembl=False, limitToProteins=None, relationship=False, omitEvidenceCodeND=False, omitEvidenceCode=[])
 Get the UniProtKB accession numbers of the proteins that are annotated to GO term(s) or its/their descendants. More...
 
def TermDescendants (self, terms, maxDistance=None, minDistance=None, relationship=False)
 Get the GO terms that are descendants of the query term(s) in the GO graph. More...
 
def QueryTerms (self, termParts, operand="AND", category=None)
 Get GO terms where the full name contains certain query strings. More...
 
def GetSignificanceOfInteractionOverlap (self, queryId, setIds)
 Compute likelihood ratio and p-value for the overlap of interactions annotated to the query id and the set ids. More...
 
def getAllAnnotations (self, category=None, limit=None, taxon=[], manualOnly=False, omitEvidenceCodeND=False, swissProtOnly=False, omitEvidenceCode=[])
 Return all protein-GO associations reported in the database. More...
 
def GetRelationshipTypes (self)
 Get all relationship types that are stored in the database. More...
 
def GetAllLinks (self, relationship=None, category=None)
 

Public Attributes

 Config
 
 DB
 
 SwissProtAccs
 

Static Public Attributes

 config = CPaths()
 
 go = CGODBAccess()
 
string goid = "GO:0061077"
 
 annotations = go.go2protein(goid)
 

Member Function Documentation

◆ CloseConnection()

def cls.GODBAccess.CGODBAccess.CloseConnection (   self)

Close the connection to the database.

    @return @c True if all went ok, @c False, if there was an
    error (issued by @ref common.ErrorHandler).

◆ getAllAnnotations()

def cls.GODBAccess.CGODBAccess.getAllAnnotations (   self,
  category = None,
  limit = None,
  taxon = [],
  manualOnly = False,
  omitEvidenceCodeND = False,
  swissProtOnly = False,
  omitEvidenceCode = [] 
)

Return all protein-GO associations reported in the database.

    @param category Limit results to a certain GO categogy
    @param limit MISSING
    @param taxos MISSING
    @param manualOnly MISSING
    @param omitEvidenceCodeND Deprecated, use omitEvidenceCode
    If @c True, evidence codes 'ND' (usually
    annotate totally uniformatively to the ontology's root) will be
    omitted from the result. If @c False, even annotations with evidence
    code 'ND' are reported.
    @param omitEvidenceCode Omits the provided evidence code(s) from the
    query, e.g. IEA or ND. If this parameter is used and not empty, it will
    overwrite potentially conflicting information in humanOnly and
    omitEvidenceCodeND.
    @return A list of all GO annotations, ordered according to GAF2.0

◆ GetAllLinks()

def cls.GODBAccess.CGODBAccess.GetAllLinks (   self,
  relationship = None,
  category = None 
)

◆ GetRelationshipTypes()

def cls.GODBAccess.CGODBAccess.GetRelationshipTypes (   self)

Get all relationship types that are stored in the database.

    @return List of all relationship types in the DB

◆ GetSignificanceOfInteractionOverlap()

def cls.GODBAccess.CGODBAccess.GetSignificanceOfInteractionOverlap (   self,
  queryId,
  setIds 
)

Compute likelihood ratio and p-value for the overlap of interactions annotated to the query id and the set ids.

Returns
List of all relationship types in the DB

◆ GO2Protein()

def cls.GODBAccess.CGODBAccess.GO2Protein (   self,
  terms,
  maxDistance = None,
  minDistance = None,
  taxon = [],
  manualOnly = False,
  useTrembl = False,
  limitToProteins = None,
  relationship = False,
  omitEvidenceCodeND = False,
  omitEvidenceCode = [] 
)

Get the UniProtKB accession numbers of the proteins that are annotated to GO term(s) or its/their descendants.

Parameters
termsGO term ID(s) that serve(s) as the search query root. Descendants of the term(s) will also be included.
maxDistanceLimit the descendant level depth (e.g. value 1 will only include direct descendants, 0 only include the seach term).
minDistanceStart so many levels below the search term (eg value 1 will start with the first descendants, not include the query term).
taxonA list of taxon identifiers used to limit the results. If an empty list is provided, all species stored in the database will be queried.
manualOnlyDeprecated, use omitEvidenceCode. If @ True, associations of proteins to GO terms that have been eletronically inferred, will not be included, limiting the data to curated information. If False, all the information present in the GO database will be included.
useTremblIf True, all Trembl asssociations will be reported for human proteins, if False, only SwissProt curated human proteins will be reported. Has no effect on proteins of non-human species.
limitToProteinsMISSING
relationshipMISSING
omitEvidenceCodeNDDeprecated, use omitEvidenceCode. If True, evidence codes 'ND' (usually annotate totally uniformatively to the ontology's root) will be omitted from the result. If False, even annotations with evidence code 'ND' are reported.
omitEvidenceCodeOmits the provided evidence code(s) from the query, e.g. IEA or ND. If this parameter is used and not empty, it will overwrite potentially conflicting information in humanOnly and omitEvidenceCodeND.
Returns
A list containing the requested GO terms and annotated proteins. False if there was an error (issued by common.ErrorHandler).

◆ Initialize()

def cls.GODBAccess.CGODBAccess.Initialize (   self,
  config 
)

Initialize the module establish a connection to the database.

    @param config  @ref common.Paths.CPaths object containing database
    access credentials
    @return @c True if all went ok. @c False if there was an error
    (issued by @ref common.ErrorHandler).

◆ Protein2GO()

def cls.GODBAccess.CGODBAccess.Protein2GO (   self,
  protein,
  category = None,
  manualOnly = False,
  limitToTerms = None,
  omitEvidenceCodeND = False,
  omitEvidenceCode = [] 
)

Get the GO terms that are annotated to a (list of) protein(s).

    @param protein UniProtKB accession number(s) of the query protein(s).
    @param category If not @c None, limit the annotation to certain GO
     categories (either 'BP', 'MF', or 'CC').
    @param manualOnly Deprecated, use omitEvidenceCode.
    If @c True, only associations of protein to GO terms
    that have been manually curated will be included, if @c False, all the
    information present in the GO database will be used, including
    electronic annotations.
    @param limitToTerms If a list of GO terms are provided, they will
    be used as a filter and only terms that are present in this list
    will be returned.
    @param omitEvidenceCodeND Deprecated, use omitEvidenceCode.
    If @c True, evidence codes 'ND' (usually
    annotate totally uniformatively to the ontology's root) will be
    omitted from the result. If @c False, even annotations with evidence
    code 'ND' are reported.
    @param omitEvidenceCode Omits the provided evidence code(s) from the
    query, e.g. IEA or ND. If this parameter is used and not empty, it will
    overwrite potentially conflicting information in humanOnly and
    omitEvidenceCodeND.
    @return A @c list of @c dictionaries containing the annotated GO
    terms. Keys of the dictionary are: @c gene_symbol, @c association_date,
    @c term_category, @c term_name, @c relationship, @c term_id,
    @cevidence_code, @c source_db. Returns @c False if there was an error
    (issued by @ref common.ErrorHandler).

◆ QueryTerms()

def cls.GODBAccess.CGODBAccess.QueryTerms (   self,
  termParts,
  operand = "AND",
  category = None 
)

Get GO terms where the full name contains certain query strings.

    @param termParts The search string(s).
    @param operand Either AND or OR. If multiple terms are provided,
    this specifies if any (OR) or all of them (AND) should be contained.
    @param category GO namespace or all GO namespaces if left to @c None.
    @return A list of lists consisting of GO ID, GO name, and category.

◆ TermDescendants()

def cls.GODBAccess.CGODBAccess.TermDescendants (   self,
  terms,
  maxDistance = None,
  minDistance = None,
  relationship = False 
)

Get the GO terms that are descendants of the query term(s) in the GO graph.

Parameters
termsGO ID(s) of the query terms.
maxDistanceIf not None, limit the distance in the GO graph from the query term (e.g. value 1 will only include direct descendants, value 0 will only include the query term).
minDistanceIf not None, only include descendandts with a certain minumum graph distances to the query term (e.g. value 1 will start with the first descendants and not include the query term).
Returns
A list containing the descending GO terms. False if there was an error (issued by common.ErrorHandler).

Member Data Documentation

◆ annotations

cls.GODBAccess.CGODBAccess.annotations = go.go2protein(goid)
static

◆ Config

cls.GODBAccess.CGODBAccess.Config

◆ config

cls.GODBAccess.CGODBAccess.config = CPaths()
static

◆ DB

cls.GODBAccess.CGODBAccess.DB

◆ go

cls.GODBAccess.CGODBAccess.go = CGODBAccess()
static

◆ goid

string cls.GODBAccess.CGODBAccess.goid = "GO:0061077"
static

◆ SwissProtAccs

cls.GODBAccess.CGODBAccess.SwissProtAccs

The documentation for this class was generated from the following file: