Closed mpoelchau closed 2 years ago
There is an eCode called Esf0042 in gff3.py line #866 with the message 'Unresolved forward reference.' However, the eCode Esf0042 is currently not documented in gff3_QC full documentation and not listed in the dictionary of ERROR.py as well. It might need to be documented.
Attached is the documentation for three categories of general error handling in gff3QC codes (function4gff.py, intra_model.py, inter_model.py, gff3_QC.py, and gff3.py). error handling in gff3_QC.docx
Since both gff3 QC errors and program errors are handled with pre-defined log levels of the logging module, we considered defining separate levels for gff3 QC errors (like gff3_ERROR). The way to do this is to use the logging.addLevelName
function and setup like the following example.
import logging
DEBUG_LEVELV_NUM = 9
logging.addLevelName(DEBUG_LEVELV_NUM, "DEBUGV")
def debugv(self, message, *args, **kws):
if self.isEnabledFor(DEBUG_LEVELV_NUM):
# Yes, logger takes its '*args' as 'args'.
self._log(DEBUG_LEVELV_NUM, message, args, **kws)
logging.Logger.debugv = debugv
(reference: https://newbedev.com/how-to-add-a-custom-loglevel-to-python-s-logging-facility)
However, we decided not to do it. Because gff3 QC errors are already put in the QC report with clear error messages for each eCode, defining new error levels adds unnecessary complications. In addition, custom levels are not recommended for developing a library in the python document. As a result, the error update for this issue will use the current handling method.
Closed via #116 .
Create new error (definitely violating the specification)/warning (probably violating the specification)/info (might be worth checking) classes
Modify the gff3toolkit to change the following error messages for gff3_QC - see Flag type column:
Intra-model: Multiple features within a model (Ema)
The error category 'Inter-model' collects formatting errors that can be found by comparing multiple gene models. Errors in this category are given an 'Error_Code' starting with 'Emr'.
+---------------+----------------------------------+----------------------------+ | Error_Code | Error_Tag | Checked if non-canonical | +===============+==================================+============================+ | Emr0001 | Duplicate transcript found | Warning | +---------------+----------------------------------+----------------------------+ | Emr0002 | Incorrectly split gene parent? | Warning | +---------------+----------------------------------+----------------------------+ | Emr0003 | Duplicate ID | Error | +---------------+----------------------------------+----------------------------+
Single feature (Esf)