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

Public Member Functions

def __init__ (s)
 Ctor. More...
 
def SetOutputFile (s, ffn, mode="w")
 Set an output file instead of default sys.stderr. More...
 
def Write (s, errorText)
 Emit an error message. More...
 
def Emit (s, token)
 Standard way of reporting an error. More...
 

Static Public Attributes

string ERR_CANNOT_OPEN_FILE = "Cannot open file ``{0}''.";
 
string ERR_INVALID_FILE_FORMAT = "``{0}'': Invalid file format.";
 
string ERR_MULTIPLE_STDIN_INPUT = "Cannot read from more than one standard input.";
 
string ERR_CANNOT_MAP_WO_ENSG = "Either input or output format must be from human.";
 
string ERR_INVALID_COLUMN_NR = "Invalid column number: ``{0}''.";
 
string ERR_TOO_MANY_COLUMNS = "Too many columns supplied.";
 
string ERR_VARYING_NR_COLUMNS = "Varying number of columns in input.";
 
string ERR_VARYING_NR_COLUMNS2 = "Varying number of columns in input: previous" +\
 
string ERR_INVALID_COLUMN_FOR_OPTION = "Invalid column selection '{0}' for " +\
 
string ERR_CANNOT_MAP_IDENTITY = "Cannot perform identity mapping.";
 
string ERR_MUST_BE_ON_SAME_CHROM = "Pair must be on same chromosome ({0}-{1}).";
 
string ERR_OVERLAPPING_LD_BLOCKS = "LD block overlap.";
 
string ERR_UNKNOWN_CHROM = "Unknown chromosome: ``{0}''.";
 
string ERR_INVALID_GENOMIC_COORDINATE = "Invalid genomic coordinate: ``{0}''.";
 
string ERR_INVALID_STARTEND_POS = "The end position ({0}) of a genomic "+\
 
string ERR_INCORRECT_GENOME_BUILD = "Incompatible genome build: ``{0}''.";
 
string ERR_COULD_NOT_CONVERT_DATA_TYPE = "Could not convert ``{0}'' to <{1}>.";
 
string ERR_INVALID_GENOTYPE = "``{0}'': Invalid or missing genotype.";
 
string ERR_ONLY_POSITIVE_NUMBERS = "Only positive numbers are allowed. "+\
 
string ERR_OPTION_MISSING = "Option(s) missing: ``{0}''.";
 
string ERR_MUTEX_OPTIONS = "Options mutually exclude: ``{0}''.";
 
string ERR_INVALID_COMBINATION_OF_PENETRANCE_AND_DETECTANCE
 
string ERR_DB_DOES_NOT_EXIST_IS_EMPTY = "Database does not exist or does not " +\
 
string ERR_DB_NOT_INITIALIZED = "Database connector has not been initialized."
 
string ERR_INVALID_CONFIG = "Dint configuration missing."
 
string ERR_DB_MISSING_PY_MODULE = "Missing database interface module ``{0}''."
 
string ERR_DB_CONNECTION_ALREADY_OPEN = "Database connection already " +\
 
string ERR_DB_CONNECTION_CLOSED = "Database connection to the server {0} " +\
 
string ERR_DB_NO_CONNECTION = "Cannot establish database connection. " +\
 
string ERR_DB_CONNECTION = "Database connection to the server {0} " +\
 
string ERR_DB_UNSUPPORTED_DB = "Unsupported database selected, we " +\
 
string ERR_DB_SQL_STATEMENT_WRONG = "SQL error, please insult the guy " +\
 
string ERR_DB_EXECUTION = "The SQL query cannot be executed for the " +\
 
string ERR_UNSUPPORTED_IDENTIFIER = "The identifier system {0} is unknown, " +\
 
string ERR_INVALID_CMD_PARAMETER = "Invalid command line parameter: ``{0}''.";
 
string ERR_INVALID_PARAMETER = "The function parameter {0} contains the invalid "+\
 
string ERR_INVALID_DISEASE_SET = "{0} is not a supported disease set, valid " +\
 
string ERR_NO_EXACT_MATCH = "Matching of exact reference and variant allele is " +\
 
string ERR_INVALID_NR_WEIGHTS = "Invalid number of weights.";
 
string ERR_INVALID_SORT_ORDER = "Invalid sort order: ``{0}''.";
 
string ERR_NR_WEIGHTS_MISMATCH = "Number of weights does not match number of "+\
 
string ERR_WEIGHTS_POSITIVE = "Weights must be non-negative.";
 
string ERR_INVALID_FILTER_ITEM = "Invalid filter item(s) ``{0}''.";
 
string ERR_EMPTY_PANEL = "Panel file does not contain valid entries."
 
string ERR_PVAL_NOT_COMPUTABLE = "P-value cannot be computed if no panel is "+\
 
string ERR_MIN_MAX = "The number {0} has to be greater or equal to {1}. "
 
string ERR_EMPTY_FILE = "The input file/stream is empty."
 
string ERR_EMPTY_HEADER = "The input file/stream does not contain a header.";
 
string ERR_AC_NE_GO = "Annotation corpus does not match ontology.";
 
string ERR_INCORRECT_AC = "Incorrect annotation corpus type ``{0}''.";
 
string ERR_NO_GRAPH_LIB = "No suitable graph library found.";
 
string ERR_MISSING_SAMPLE = "Sample {0} is missing from the VCF file.";
 
string ERR_BOTH_ADD_EXTRACT = "Cannot use both args ``-a'' and ``-e''.";
 
string ERR_RET_IC_ONLY = "Selected input type returns only information content "+\
 
string ERR_FUNSIM_IMPOSSIBLE = "Impossible to compute functional similarity "+\
 
string ERR_COLLCNT_PANEL = "Collapse and count options are applicable only "+\
 
string ERR_PANEL_INPTYPE_CONFLICT = "Wrong input type option for panel file.";
 
string ERR_ONLY_SINGLE_MEASURE_POSSIBLE = "Only a single semantic and "+\
 
string WRN_INSUFF_COLS = "Warning: Insufficient number of columns to index "+\
 
string WRN_MISSING_GENOME_BUILD = "Warning: Genome build missing in ``{0}''.";
 
string WRN_MISSING_BUILD_ASSUME_DEFAULT = "Warning: " + \
 
string WRN_UNEQUAL_GENOME_BUILD = "Warning: Default genome build {0} of the "+\
 
string WRN_OPT_NOT_EFFECTIVE = "Warning: Option ``{0}'' does not become "+\
 
string WRN_DET_SET
 
string WRN_PEN_SET
 
string WRN_MULTIPLE_VALUES_FOR_KEY = "Warning: Multiple values for key ``{0}''. "+\
 
string WRN_NON_BP_CHARACTERS = "Warning: {0}: Detected non-basepair characters.";
 
string WRN_INDEL_CHARACTER = "Warning: {0}: {1} should be indicated by a"+\
 
string WRN_NR_BP_MISMATCH = "Warning: {0}: Number of basepairs mismatch.";
 
string WRN_MULTIPLE_TAXIDS = "Warning: {0}: More than one taxon ID in MITAB "+\
 
string WRN_COV = "Warning: Genotype call for sample {0} in variant {1} was "+\
 

Detailed Description

 The error handler by default writes to \c sys.stderr. This can be changed
 by supplying an output file for writing. This class contains all available
 tokens, ie. messages that may appear in many different contexts.

Constructor & Destructor Documentation

◆ __init__()

def common.ErrorHandler.CErrorHandler.__init__ (   s)

Ctor.

Member Function Documentation

◆ Emit()

def common.ErrorHandler.CErrorHandler.Emit (   s,
  token 
)

Standard way of reporting an error.

    Emit an error message using one of the supported tokens.
    @param token  Token @c String defined in this class.

◆ SetOutputFile()

def common.ErrorHandler.CErrorHandler.SetOutputFile (   s,
  ffn,
  mode = "w" 
)

Set an output file instead of default sys.stderr.

    @param ffn  Full file name of new output file.
    @param mode  Mode for opening the file.
    @return \c True if all went ok, \c False on file opening error, an
     error message has already been emitted.

◆ Write()

def common.ErrorHandler.CErrorHandler.Write (   s,
  errorText 
)

Emit an error message.

    This function may only be used in case there is no token available,
    and is the most generic form of error output.
    @param errorText  Error or warning message.

Member Data Documentation

◆ ERR_AC_NE_GO

string common.ErrorHandler.CErrorHandler.ERR_AC_NE_GO = "Annotation corpus does not match ontology.";
static

◆ ERR_BOTH_ADD_EXTRACT

string common.ErrorHandler.CErrorHandler.ERR_BOTH_ADD_EXTRACT = "Cannot use both args ``-a'' and ``-e''.";
static

◆ ERR_CANNOT_MAP_IDENTITY

string common.ErrorHandler.CErrorHandler.ERR_CANNOT_MAP_IDENTITY = "Cannot perform identity mapping.";
static

◆ ERR_CANNOT_MAP_WO_ENSG

string common.ErrorHandler.CErrorHandler.ERR_CANNOT_MAP_WO_ENSG = "Either input or output format must be from human.";
static

◆ ERR_CANNOT_OPEN_FILE

string common.ErrorHandler.CErrorHandler.ERR_CANNOT_OPEN_FILE = "Cannot open file ``{0}''.";
static

◆ ERR_COLLCNT_PANEL

string common.ErrorHandler.CErrorHandler.ERR_COLLCNT_PANEL = "Collapse and count options are applicable only "+\
static

◆ ERR_COULD_NOT_CONVERT_DATA_TYPE

string common.ErrorHandler.CErrorHandler.ERR_COULD_NOT_CONVERT_DATA_TYPE = "Could not convert ``{0}'' to <{1}>.";
static

◆ ERR_DB_CONNECTION

string common.ErrorHandler.CErrorHandler.ERR_DB_CONNECTION = "Database connection to the server {0} " +\
static

◆ ERR_DB_CONNECTION_ALREADY_OPEN

string common.ErrorHandler.CErrorHandler.ERR_DB_CONNECTION_ALREADY_OPEN = "Database connection already " +\
static

◆ ERR_DB_CONNECTION_CLOSED

string common.ErrorHandler.CErrorHandler.ERR_DB_CONNECTION_CLOSED = "Database connection to the server {0} " +\
static

◆ ERR_DB_DOES_NOT_EXIST_IS_EMPTY

string common.ErrorHandler.CErrorHandler.ERR_DB_DOES_NOT_EXIST_IS_EMPTY = "Database does not exist or does not " +\
static

◆ ERR_DB_EXECUTION

string common.ErrorHandler.CErrorHandler.ERR_DB_EXECUTION = "The SQL query cannot be executed for the " +\
static

◆ ERR_DB_MISSING_PY_MODULE

string common.ErrorHandler.CErrorHandler.ERR_DB_MISSING_PY_MODULE = "Missing database interface module ``{0}''."
static

◆ ERR_DB_NO_CONNECTION

string common.ErrorHandler.CErrorHandler.ERR_DB_NO_CONNECTION = "Cannot establish database connection. " +\
static

◆ ERR_DB_NOT_INITIALIZED

string common.ErrorHandler.CErrorHandler.ERR_DB_NOT_INITIALIZED = "Database connector has not been initialized."
static

◆ ERR_DB_SQL_STATEMENT_WRONG

string common.ErrorHandler.CErrorHandler.ERR_DB_SQL_STATEMENT_WRONG = "SQL error, please insult the guy " +\
static

◆ ERR_DB_UNSUPPORTED_DB

string common.ErrorHandler.CErrorHandler.ERR_DB_UNSUPPORTED_DB = "Unsupported database selected, we " +\
static

◆ ERR_EMPTY_FILE

string common.ErrorHandler.CErrorHandler.ERR_EMPTY_FILE = "The input file/stream is empty."
static

◆ ERR_EMPTY_HEADER

string common.ErrorHandler.CErrorHandler.ERR_EMPTY_HEADER = "The input file/stream does not contain a header.";
static

◆ ERR_EMPTY_PANEL

string common.ErrorHandler.CErrorHandler.ERR_EMPTY_PANEL = "Panel file does not contain valid entries."
static

◆ ERR_FUNSIM_IMPOSSIBLE

string common.ErrorHandler.CErrorHandler.ERR_FUNSIM_IMPOSSIBLE = "Impossible to compute functional similarity "+\
static

◆ ERR_INCORRECT_AC

string common.ErrorHandler.CErrorHandler.ERR_INCORRECT_AC = "Incorrect annotation corpus type ``{0}''.";
static

◆ ERR_INCORRECT_GENOME_BUILD

string common.ErrorHandler.CErrorHandler.ERR_INCORRECT_GENOME_BUILD = "Incompatible genome build: ``{0}''.";
static

◆ ERR_INVALID_CMD_PARAMETER

string common.ErrorHandler.CErrorHandler.ERR_INVALID_CMD_PARAMETER = "Invalid command line parameter: ``{0}''.";
static

◆ ERR_INVALID_COLUMN_FOR_OPTION

string common.ErrorHandler.CErrorHandler.ERR_INVALID_COLUMN_FOR_OPTION = "Invalid column selection '{0}' for " +\
static

◆ ERR_INVALID_COLUMN_NR

string common.ErrorHandler.CErrorHandler.ERR_INVALID_COLUMN_NR = "Invalid column number: ``{0}''.";
static

◆ ERR_INVALID_COMBINATION_OF_PENETRANCE_AND_DETECTANCE

string common.ErrorHandler.CErrorHandler.ERR_INVALID_COMBINATION_OF_PENETRANCE_AND_DETECTANCE
static
Initial value:
= """
You cannot specify penetrance = {0} and detectance = {1},
because these values contradict each other.
Please change at least one of the values.
If you would like to keep detectance = {1},
change the penetrance to a value between {2} and 1.0.
If you would like to keep penetrance = {0},
change the detectance to a value between 0.0 and {3}."""

◆ ERR_INVALID_CONFIG

string common.ErrorHandler.CErrorHandler.ERR_INVALID_CONFIG = "Dint configuration missing."
static

◆ ERR_INVALID_DISEASE_SET

string common.ErrorHandler.CErrorHandler.ERR_INVALID_DISEASE_SET = "{0} is not a supported disease set, valid " +\
static

◆ ERR_INVALID_FILE_FORMAT

string common.ErrorHandler.CErrorHandler.ERR_INVALID_FILE_FORMAT = "``{0}'': Invalid file format.";
static

◆ ERR_INVALID_FILTER_ITEM

string common.ErrorHandler.CErrorHandler.ERR_INVALID_FILTER_ITEM = "Invalid filter item(s) ``{0}''.";
static

◆ ERR_INVALID_GENOMIC_COORDINATE

string common.ErrorHandler.CErrorHandler.ERR_INVALID_GENOMIC_COORDINATE = "Invalid genomic coordinate: ``{0}''.";
static

◆ ERR_INVALID_GENOTYPE

string common.ErrorHandler.CErrorHandler.ERR_INVALID_GENOTYPE = "``{0}'': Invalid or missing genotype.";
static

◆ ERR_INVALID_NR_WEIGHTS

string common.ErrorHandler.CErrorHandler.ERR_INVALID_NR_WEIGHTS = "Invalid number of weights.";
static

◆ ERR_INVALID_PARAMETER

string common.ErrorHandler.CErrorHandler.ERR_INVALID_PARAMETER = "The function parameter {0} contains the invalid "+\
static

◆ ERR_INVALID_SORT_ORDER

string common.ErrorHandler.CErrorHandler.ERR_INVALID_SORT_ORDER = "Invalid sort order: ``{0}''.";
static

◆ ERR_INVALID_STARTEND_POS

string common.ErrorHandler.CErrorHandler.ERR_INVALID_STARTEND_POS = "The end position ({0}) of a genomic "+\
static

◆ ERR_MIN_MAX

string common.ErrorHandler.CErrorHandler.ERR_MIN_MAX = "The number {0} has to be greater or equal to {1}. "
static

◆ ERR_MISSING_SAMPLE

string common.ErrorHandler.CErrorHandler.ERR_MISSING_SAMPLE = "Sample {0} is missing from the VCF file.";
static

◆ ERR_MULTIPLE_STDIN_INPUT

string common.ErrorHandler.CErrorHandler.ERR_MULTIPLE_STDIN_INPUT = "Cannot read from more than one standard input.";
static

◆ ERR_MUST_BE_ON_SAME_CHROM

string common.ErrorHandler.CErrorHandler.ERR_MUST_BE_ON_SAME_CHROM = "Pair must be on same chromosome ({0}-{1}).";
static

◆ ERR_MUTEX_OPTIONS

string common.ErrorHandler.CErrorHandler.ERR_MUTEX_OPTIONS = "Options mutually exclude: ``{0}''.";
static

◆ ERR_NO_EXACT_MATCH

string common.ErrorHandler.CErrorHandler.ERR_NO_EXACT_MATCH = "Matching of exact reference and variant allele is " +\
static

◆ ERR_NO_GRAPH_LIB

string common.ErrorHandler.CErrorHandler.ERR_NO_GRAPH_LIB = "No suitable graph library found.";
static

◆ ERR_NR_WEIGHTS_MISMATCH

string common.ErrorHandler.CErrorHandler.ERR_NR_WEIGHTS_MISMATCH = "Number of weights does not match number of "+\
static

◆ ERR_ONLY_POSITIVE_NUMBERS

string common.ErrorHandler.CErrorHandler.ERR_ONLY_POSITIVE_NUMBERS = "Only positive numbers are allowed. "+\
static

◆ ERR_ONLY_SINGLE_MEASURE_POSSIBLE

string common.ErrorHandler.CErrorHandler.ERR_ONLY_SINGLE_MEASURE_POSSIBLE = "Only a single semantic and "+\
static

◆ ERR_OPTION_MISSING

string common.ErrorHandler.CErrorHandler.ERR_OPTION_MISSING = "Option(s) missing: ``{0}''.";
static

◆ ERR_OVERLAPPING_LD_BLOCKS

string common.ErrorHandler.CErrorHandler.ERR_OVERLAPPING_LD_BLOCKS = "LD block overlap.";
static

◆ ERR_PANEL_INPTYPE_CONFLICT

string common.ErrorHandler.CErrorHandler.ERR_PANEL_INPTYPE_CONFLICT = "Wrong input type option for panel file.";
static

◆ ERR_PVAL_NOT_COMPUTABLE

string common.ErrorHandler.CErrorHandler.ERR_PVAL_NOT_COMPUTABLE = "P-value cannot be computed if no panel is "+\
static

◆ ERR_RET_IC_ONLY

string common.ErrorHandler.CErrorHandler.ERR_RET_IC_ONLY = "Selected input type returns only information content "+\
static

◆ ERR_TOO_MANY_COLUMNS

string common.ErrorHandler.CErrorHandler.ERR_TOO_MANY_COLUMNS = "Too many columns supplied.";
static

◆ ERR_UNKNOWN_CHROM

string common.ErrorHandler.CErrorHandler.ERR_UNKNOWN_CHROM = "Unknown chromosome: ``{0}''.";
static

◆ ERR_UNSUPPORTED_IDENTIFIER

string common.ErrorHandler.CErrorHandler.ERR_UNSUPPORTED_IDENTIFIER = "The identifier system {0} is unknown, " +\
static

◆ ERR_VARYING_NR_COLUMNS

string common.ErrorHandler.CErrorHandler.ERR_VARYING_NR_COLUMNS = "Varying number of columns in input.";
static

◆ ERR_VARYING_NR_COLUMNS2

string common.ErrorHandler.CErrorHandler.ERR_VARYING_NR_COLUMNS2 = "Varying number of columns in input: previous" +\
static

◆ ERR_WEIGHTS_POSITIVE

string common.ErrorHandler.CErrorHandler.ERR_WEIGHTS_POSITIVE = "Weights must be non-negative.";
static

◆ WRN_COV

string common.ErrorHandler.CErrorHandler.WRN_COV = "Warning: Genotype call for sample {0} in variant {1} was "+\
static

◆ WRN_DET_SET

string common.ErrorHandler.CErrorHandler.WRN_DET_SET
static
Initial value:
= """
Warning: You only selected penetrance = {0}. The detectance was set to {1},
which corresponds to the maximial value and will result in the most strict
filtering regarding detectance.
"""

◆ WRN_INDEL_CHARACTER

string common.ErrorHandler.CErrorHandler.WRN_INDEL_CHARACTER = "Warning: {0}: {1} should be indicated by a"+\
static

◆ WRN_INSUFF_COLS

string common.ErrorHandler.CErrorHandler.WRN_INSUFF_COLS = "Warning: Insufficient number of columns to index "+\
static

◆ WRN_MISSING_BUILD_ASSUME_DEFAULT

string common.ErrorHandler.CErrorHandler.WRN_MISSING_BUILD_ASSUME_DEFAULT = "Warning: " + \
static

◆ WRN_MISSING_GENOME_BUILD

string common.ErrorHandler.CErrorHandler.WRN_MISSING_GENOME_BUILD = "Warning: Genome build missing in ``{0}''.";
static

◆ WRN_MULTIPLE_TAXIDS

string common.ErrorHandler.CErrorHandler.WRN_MULTIPLE_TAXIDS = "Warning: {0}: More than one taxon ID in MITAB "+\
static

◆ WRN_MULTIPLE_VALUES_FOR_KEY

string common.ErrorHandler.CErrorHandler.WRN_MULTIPLE_VALUES_FOR_KEY = "Warning: Multiple values for key ``{0}''. "+\
static

◆ WRN_NON_BP_CHARACTERS

string common.ErrorHandler.CErrorHandler.WRN_NON_BP_CHARACTERS = "Warning: {0}: Detected non-basepair characters.";
static

◆ WRN_NR_BP_MISMATCH

string common.ErrorHandler.CErrorHandler.WRN_NR_BP_MISMATCH = "Warning: {0}: Number of basepairs mismatch.";
static

◆ WRN_OPT_NOT_EFFECTIVE

string common.ErrorHandler.CErrorHandler.WRN_OPT_NOT_EFFECTIVE = "Warning: Option ``{0}'' does not become "+\
static

◆ WRN_PEN_SET

string common.ErrorHandler.CErrorHandler.WRN_PEN_SET
static
Initial value:
= """
Warning: You only selected detectance = {0}. The penetrance was set to {1},
which corresponds to the maximal value and will result in the most strict
filtering regarding penetrance.
"""

◆ WRN_UNEQUAL_GENOME_BUILD

string common.ErrorHandler.CErrorHandler.WRN_UNEQUAL_GENOME_BUILD = "Warning: Default genome build {0} of the "+\
static

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