def __init__(self, name, field, data_type=None, separators=[], info_key=None, 
                category=None, csq_key=None, record_rule=None, gt_key=None,
                string_rules={}, dict_entry=False):
        """
        The plugin class hold plugin information. The main task for a plugin
        is to return the correct value from a vcf field based on a number of
        rules. 
        "field" determines where in the vcf the value should be collected.
        "data_type" determines the type of the record that should be extracted
        "separators" define how the values are separated
        "info_key" and csq_key determines more specific where to look
        "record_rule" determines what value to return (If there are multiple values)
        "string_rules" determin how string matches should be prioritized.
        
        Arguments:
            name (str): The name of the plugin
            field (str): The field of the vcf that should be searched. Anyone of
                ['CHROM','POS','ID','REF','ALT', 'FILTER','QUAL',
                    'FILTER','INFO','FORMAT','sample_id']
            data_type (str): the data type of the record. Anyone of
                ['integer','float','flag','string']
            separators (list): A list of strings that describes how the record is
                                separated
            info_key (str): The name of the INFO field
            csq_key (str): The name of the Vep entry
            record_rule (str): Anyone of ['min', 'max']
            string_rules (dict): A dictionary with priority order of string matches
            dict_entry (bool): If the values are annotated as a dictionary. 
                         In that case the the annotattion after first splitter will
                         be used as key.
        
        """
        super(Plugin, self).__init__()
        self.logger = getLogger(__name__)
        # For testing only
        self.logger = getLogger('extract_vcf.plugin')
        
        # These are the valid data types for a entry
        self.data_types = ['integer','float','flag','string']
        self.name = name
        self.logger.info("Initiating plugin with name: {0}".format(
            self.name
        ))
        self.regex = None
        self.field = field
        self.logger.info("Field: {0}".format(self.field))
        
        self.data_type = data_type
        self.logger.info("Data type: {0}".format(self.data_type))
        
        self.separators = separators
        self.logger.info("Separators: {0}".format(self.separators))
        
        self.record_rule = record_rule
        self.logger.info("Record rule: {0}".format(self.record_rule))
        
        self.info_key = info_key
        self.logger.info("Info key: {0}".format(self.info_key))
        
        self.csq_key = csq_key
        self.logger.info("CSQ key: {0}".format(self.csq_key))
        
        self.category = category
        self.logger.info("Category: {0}".format(self.category))
        
        self.string_rules = string_rules
        self.logger.info("String rules: {0}".format(self.string_rules))
        
        self.gt_key = gt_key
        self.logger.info("gt_key: {0}".format(self.gt_key))
        
        self.dict_entry = dict_entry
def __init__ ( self , name , field , data_type = None , separators = [ ] , info_key = None , category = None , csq_key = None , record_rule = None , gt_key = None , string_rules = { } , dict_entry = False ) : super ( Plugin , self ) . __init__ ( ) self . logger = getLogger ( __name__ ) self . logger = getLogger ( 'extract_vcf.plugin' ) self . data_types = [ 'integer' , 'float' , 'flag' , 'string' ] self . name = name self . logger . info ( "Initiating plugin with name: {0}" . format ( self . name ) ) self . regex = None self . field = field self . logger . info ( "Field: {0}" . format ( self . field ) ) self . data_type = data_type self . logger . info ( "Data type: {0}" . format ( self . data_type ) ) self . separators = separators self . logger . info ( "Separators: {0}" . format ( self . separators ) ) self . record_rule = record_rule self . logger . info ( "Record rule: {0}" . format ( self . record_rule ) ) self . info_key = info_key self . logger . info ( "Info key: {0}" . format ( self . info_key ) ) self . csq_key = csq_key self . logger . info ( "CSQ key: {0}" . format ( self . csq_key ) ) self . category = category self . logger . info ( "Category: {0}" . format ( self . category ) ) self . string_rules = string_rules self . logger . info ( "String rules: {0}" . format ( self . string_rules ) ) self . gt_key = gt_key self . logger . info ( "gt_key: {0}" . format ( self . gt_key ) ) self . dict_entry = dict_entry
The plugin class hold plugin information. The main task for a plugin
        is to return the correct value from a vcf field based on a number of
        rules. 
        "field" determines where in the vcf the value should be collected.
        "data_type" determines the type of the record that should be extracted
        "separators" define how the values are separated
        "info_key" and csq_key determines more specific where to look
        "record_rule" determines what value to return (If there are multiple values)
        "string_rules" determin how string matches should be prioritized.
        
        Arguments:
            name (str): The name of the plugin
            field (str): The field of the vcf that should be searched. Anyone of
                ['CHROM','POS','ID','REF','ALT', 'FILTER','QUAL',
                    'FILTER','INFO','FORMAT','sample_id']
            data_type (str): the data type of the record. Anyone of
                ['integer','float','flag','string']
            separators (list): A list of strings that describes how the record is
                                separated
            info_key (str): The name of the INFO field
            csq_key (str): The name of the Vep entry
            record_rule (str): Anyone of ['min', 'max']
            string_rules (dict): A dictionary with priority order of string matches
            dict_entry (bool): If the values are annotated as a dictionary. 
                         In that case the the annotattion after first splitter will
                         be used as key.