Data Integrator (Python API)
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
cls.HGMDAnnotation.CHGMDAnnotation Class Reference

Connector class for accessing HGMD data stored in an in-house database. More...

Collaboration diagram for cls.HGMDAnnotation.CHGMDAnnotation:
Collaboration graph
[legend]

Public Member Functions

def Initialize (self, config)
 Initialize module, establishing a connection to the database. More...
 
def CloseConnection (self)
 Close the connection to the HGMD database. More...
 
def GetMutationsByGeneID (self, geneID)
 Retrieves all disease-related mutations that are reported in HGMD for a certain gene. More...
 
def GetMutationsByHGMD (self, hgmdAcc)
 Retrieves all disease-related mutations that are reported in HGMD for a certain HGMD accession number. More...
 
def GetMutationsByUMLS (self, umlsId, includeChildren=False)
 Retrieves all disease-related mutations that are reported in HGMD for a certain UMLS identifier. More...
 
def GetMutationsByCoordinateRange (self, startCoord, endCoord)
 Retrieve all disease-related mutations that are reported in HGMD for a given coordinate range. More...
 
def GetMutationsByDisease (self, diseaseTokens, exact=True, operator="OR")
 Retrieve all disease-related mutations that are reported in HGMD for the given disease terms. More...
 
def GetDiseases (self, diseaseTokens, operator="OR")
 Retrieve all HGMD disease terms from the database that contain the particular word tokens. More...
 
def GetDiseaseSets (self)
 Get the predefined disease sets from the database. More...
 
def GetConcepts (self, terms, op="OR")
 Get the disease concepts that are build from UMLS. More...
 

Public Attributes

 db
 
 coordSys
 

Static Public Attributes

tuple MUTATION_DATA
 
string GENERAL_QUERY_STUB
 
 config = None
 
 hgmd = CHGMDAnnotation()
 
int geneID = 5071
 
def mutations = hgmd.GetMutationsByGeneID(geneID)
 
string pos = "GRCh37:6:10404798"
 
string start = "GRCh37:6:10404798"
 
string end = "GRCh37:6:10404898"
 
string disease = "Parkinson disease"
 
list disease = ["parkin", "dement"]
 
string op = " AND "
 
def diseases = hgmd.GetDiseases(disease ,op)
 

Detailed Description

Connector class for accessing HGMD data stored in an in-house database.

Member Function Documentation

◆ CloseConnection()

def cls.HGMDAnnotation.CHGMDAnnotation.CloseConnection (   self)

Close the connection to the HGMD database.

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

◆ GetConcepts()

def cls.HGMDAnnotation.CHGMDAnnotation.GetConcepts (   self,
  terms,
  op = "OR" 
)

Get the disease concepts that are build from UMLS.

    @param terms Query terms that should be containg in the concepts.
    If empty, all concepts will be returned
    @param op The logical operator that defines if the terms
    should be contained jointly in the concept (AND) or if any
    of them should be present (OR)
    @return The list of concepts. @c False if there was an
    error (issued by @ref common.ErrorHandler).

◆ GetDiseases()

def cls.HGMDAnnotation.CHGMDAnnotation.GetDiseases (   self,
  diseaseTokens,
  operator = "OR" 
)

Retrieve all HGMD disease terms from the database that contain the particular word tokens.

Parameters
diseaseTokensThe disease term(s) that have to be present in the disease name. Can be either a single term or a list of terms.
operatorThe logical operator that defines, if the disease tokens should be contained jointly in the HGMD disease string (AND) or if any of them should be present (OR)
Returns
The list of disease names from HGMD. False if there was an error (issued by common.ErrorHandler).

◆ GetDiseaseSets()

def cls.HGMDAnnotation.CHGMDAnnotation.GetDiseaseSets (   self)

Get the predefined disease sets from the database.

    @return A dictionary of predefined disease sets. The keys are the
    defined disease classes (like 'Alzheimer', 'Parkinson'), the values
    contain the exact HGMD disease terms (like 'Parkinson disease,
    early-onset'). @c False if an error occured (issued by @ref
    common.ErrorHandler).

◆ GetMutationsByCoordinateRange()

def cls.HGMDAnnotation.CHGMDAnnotation.GetMutationsByCoordinateRange (   self,
  startCoord,
  endCoord 
)

Retrieve all disease-related mutations that are reported in HGMD for a given coordinate range.

Parameters
startCoordThe start coordinate of the range, specified as a string in the format Build:Chromosome:Start[-End]
endCoordThe end coordinate of the range specified as a string in the format Build:Chromosome:Start[-End]. Has to be greater or equal to startCoord.
Returns
The list of mutations stored in HGMD. False if there was an error when getting the data (issued by common.ErrorHandler).

◆ GetMutationsByDisease()

def cls.HGMDAnnotation.CHGMDAnnotation.GetMutationsByDisease (   self,
  diseaseTokens,
  exact = True,
  operator = "OR" 
)

Retrieve all disease-related mutations that are reported in HGMD for the given disease terms.

Parameters
diseaseTokensThe disease term(s) that have to be present in the disease name. Can be either a single term or a list of terms.
exactIf True, only exact matches to the requested disease terms are returned, if False, also partial matched are considered.
operatorThe logical operator that defines, if the disease tokens should be contained jointly in the HGMD string (AND) or if any of them should be present (OR)
Returns
The list of mutations known in HGMD. False, if there was an error (issued by common.ErrorHandler).

◆ GetMutationsByGeneID()

def cls.HGMDAnnotation.CHGMDAnnotation.GetMutationsByGeneID (   self,
  geneID 
)

Retrieves all disease-related mutations that are reported in HGMD for a certain gene.

Parameters
geneIDThe Entrez Gene ID of the gene of interesest, e.g., 5071 for PARK2
Returns
The list of mutations stored in HGMD. False, if there was an error when getting the data (issued by common.ErrorHandler).

◆ GetMutationsByHGMD()

def cls.HGMDAnnotation.CHGMDAnnotation.GetMutationsByHGMD (   self,
  hgmdAcc 
)

Retrieves all disease-related mutations that are reported in HGMD for a certain HGMD accession number.

Parameters
hgmdAccThe HGMD accession number
Returns
The list of mutations stored in HGMD. False, if there was an error when getting the data (issued by common.ErrorHandler).

◆ GetMutationsByUMLS()

def cls.HGMDAnnotation.CHGMDAnnotation.GetMutationsByUMLS (   self,
  umlsId,
  includeChildren = False 
)

Retrieves all disease-related mutations that are reported in HGMD for a certain UMLS identifier.

Parameters
umlsIdThe UMLS identifier
includeChildrenIf true, will also include mutations that are annotated to descending terms.
Returns
The list of mutations stored in HGMD. False, if there was an error when getting the data (issued by common.ErrorHandler).

◆ Initialize()

def cls.HGMDAnnotation.CHGMDAnnotation.Initialize (   self,
  config 
)

Initialize module, establishing a connection to the database.

    Prior to any use of this module, this initialization function needs to
    be called, as otherwise the database connection is not established.
    @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).

Member Data Documentation

◆ config

cls.HGMDAnnotation.CHGMDAnnotation.config = None
static

◆ coordSys

cls.HGMDAnnotation.CHGMDAnnotation.coordSys

◆ db

cls.HGMDAnnotation.CHGMDAnnotation.db

◆ disease [1/2]

list cls.HGMDAnnotation.CHGMDAnnotation.disease = "Parkinson disease"
static

◆ disease [2/2]

list cls.HGMDAnnotation.CHGMDAnnotation.disease = ["parkin", "dement"]
static

◆ diseases

def cls.HGMDAnnotation.CHGMDAnnotation.diseases = hgmd.GetDiseases(disease ,op)
static

◆ end

string cls.HGMDAnnotation.CHGMDAnnotation.end = "GRCh37:6:10404898"
static

◆ geneID

int cls.HGMDAnnotation.CHGMDAnnotation.geneID = 5071
static

◆ GENERAL_QUERY_STUB

string cls.HGMDAnnotation.CHGMDAnnotation.GENERAL_QUERY_STUB
static

◆ hgmd

cls.HGMDAnnotation.CHGMDAnnotation.hgmd = CHGMDAnnotation()
static

◆ MUTATION_DATA

tuple cls.HGMDAnnotation.CHGMDAnnotation.MUTATION_DATA
static
Initial value:
= (
("gene", "", "allmut", "Gene symbol" ),
("base", "mutationCategory" "allmut", "Mutation category"))

◆ mutations

def cls.HGMDAnnotation.CHGMDAnnotation.mutations = hgmd.GetMutationsByGeneID(geneID)
static

◆ op

string cls.HGMDAnnotation.CHGMDAnnotation.op = " AND "
static

◆ pos

string cls.HGMDAnnotation.CHGMDAnnotation.pos = "GRCh37:6:10404798"
static

◆ start

string cls.HGMDAnnotation.CHGMDAnnotation.start = "GRCh37:6:10404798"
static

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