def gene_id_check(genes, errors, columns, row_number):
    """
    Validate gene identifiers against a known set.

    Parameters
    ----------
    genes : set
        The known set of gene identifiers.
    errors :
        Passed by goodtables.
    columns :
        Passed by goodtables.
    row_number :
        Passed by goodtables.

    """
    message = ("Gene '{value}' in column {col} and row {row} does not "
               "appear in the metabolic model.")
    for column in columns:
        if "gene" in column['header'] and column['value'] not in genes:
            message = message.format(
                value=column['value'],
                row=row_number,
                col=column['number'])
            errors.append({
                'code': 'bad-value',
                'message': message,
                'row-number': row_number,
                'column-number': column['number'],
            })
def gene_id_check ( genes , errors , columns , row_number ) : message = ( "Gene '{value}' in column {col} and row {row} does not " "appear in the metabolic model." ) for column in columns : if "gene" in column [ 'header' ] and column [ 'value' ] not in genes : message = message . format ( value = column [ 'value' ] , row = row_number , col = column [ 'number' ] ) errors . append ( { 'code' : 'bad-value' , 'message' : message , 'row-number' : row_number , 'column-number' : column [ 'number' ] , } )
Validate gene identifiers against a known set.

    Parameters
    ----------
    genes : set
        The known set of gene identifiers.
    errors :
        Passed by goodtables.
    columns :
        Passed by goodtables.
    row_number :
        Passed by goodtables.