Data Integrator (Python API)
Public Member Functions | Public Attributes | List of all members
cls.MITABDBAccess.CMITABDBAccess Class Reference

Accesses interaction data that has been stored in a specific database schema before. More...

Public Member Functions

def Close (self)
 Close connection to the database. More...
 
def Initialize (self, config, mitabConfig=None)
 Initialize and establish database connection using the parameters provided in the configuration file. More...
 
def GetInteractionsByID (self, queryIds=None, targetIds=None, limit=None)
 
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 GetStats (self)
 

Public Attributes

 mitabConfig
 
 db
 
 cache
 

Detailed Description

Accesses interaction data that has been stored in a specific database schema before.

Member Function Documentation

◆ Close()

def cls.MITABDBAccess.CMITABDBAccess.Close (   self)

Close connection to the database.

◆ GetInteractionsByID()

def cls.MITABDBAccess.CMITABDBAccess.GetInteractionsByID (   self,
  queryIds = None,
  targetIds = None,
  limit = None 
)
     Get all the interactions that are known for the query id(s) provided.

     @param queryIds Identifiers of the queries
     @param targetIds Identifiers of the targets, optional
     @return A list of interactions

◆ GetSignificanceOfInteractionOverlap()

def cls.MITABDBAccess.CMITABDBAccess.GetSignificanceOfInteractionOverlap (   self,
  queryId,
  setIds 
)

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

In contrast to GetInteractionsByID, this method does not return any interactions that involve queryId and setIds, but will use these to compute the significance of the overlap, considering all interactions as the background. The likelihood ratio and pvalue are computed using Fisher's exact test

Parameters
queryIdThe id of the query interactors
setIdsTHe ids of the interactors annotated to a certain set
Returns
A tuple containing likelihood ratio, p-value

◆ GetStats()

def cls.MITABDBAccess.CMITABDBAccess.GetStats (   self)
     Returns some statistics.

     @return A dictionary containing some basic interaction information.

◆ Initialize()

def cls.MITABDBAccess.CMITABDBAccess.Initialize (   self,
  config,
  mitabConfig = None 
)

Initialize and establish database connection using the parameters provided in the configuration file.

Parameters
configcommon.Paths.CPaths object containing database access credentials
mitabConfigAdditional parameters defining the interaction types or detection methods that should be considered.
Returns
True if all went ok. False if there was an error (issued by common.ErrorHandler).

Member Data Documentation

◆ cache

cls.MITABDBAccess.CMITABDBAccess.cache

◆ db

cls.MITABDBAccess.CMITABDBAccess.db

◆ mitabConfig

cls.MITABDBAccess.CMITABDBAccess.mitabConfig

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