def set_gff_parsing_rules(config_obj):
    """Parsing which features in GFF to read.

    Set parsing information based on default presets or user input.
    Defines which features are considered as genes, which as
    transcript, where header for FASTA can be found and how gene and
    transcript can be linked

    Args:
      gff_source(str): either name of a preset or path to file with parsing rule

    Returns:
      (dict) dictionary with parameters for parsing the GFF
    """

    gff_dict = {}

    ## presets for parsing of GFF
    if config_obj.get('gff_preset') == "default" or (config_obj.get('gff_preset') == None and config_obj.get('gff_source') == None):
        gff_dict['gff_source'] = 'default'
        gff_dict['gff_gene_type'] = 'gene'
        gff_dict['gff_transcript_type'] = 'mRNA'
        gff_dict['gff_cds_type'] = 'CDS'
        gff_dict['gff_fasta_header_type'] = 'mRNA,CDS'
        gff_dict['gff_fasta_header_attr'] = 'ID'
        gff_dict['gff_connection'] = 'parent/child'
        gff_dict['gff_parent_child_types'] = 'mRNA,CDS'
        gff_dict['gff_parent_attr'] = 'Parent'
        gff_dict['gff_child_attr'] =  'ID'
    elif config_obj.get('gff_preset') == "maker":
        gff_dict['gff_source'] = 'maker'
        gff_dict['gff_gene_type'] = 'gene'
        gff_dict['gff_transcript_type'] = 'mRNA'
        gff_dict['gff_cds_type'] = 'CDS'
        gff_dict['gff_fasta_header_type'] = 'mRNA'
        gff_dict['gff_fasta_header_attr'] = 'ID'
        gff_dict['gff_connection'] = 'parent/child'
        gff_dict['gff_parent_child_types'] = 'mRNA'
        gff_dict['gff_parent_attr'] = 'Parent'
        gff_dict['gff_child_attr'] =  'ID'
    elif config_obj.get('gff_preset') == "augustus_masked":
        gff_dict['gff_source'] = 'augustus_masked'
        gff_dict['gff_gene_type'] = 'match'
        gff_dict['gff_transcript_type'] = 'mRNA'
        gff_dict['gff_cds_type'] = 'match_part'
        gff_dict['gff_fasta_header_type'] = 'match'
        gff_dict['gff_fasta_header_attr'] = 'Name'
        gff_dict['gff_connection'] = 'inline'
        gff_dict['gff_gene_attr'] = 'ID'
    # read file with information on how to parse GFF
    else:
        gff_dict['gff_source'] = config_obj.get('gff_source')
        gff_dict['gff_gene_type'] = config_obj.get('gff_gene_type')
        gff_dict['gff_transcript_type'] = config_obj.get('gff_transcript_type')
        gff_dict['gff_cds_type'] = config_obj.get('gff_cds_type')
        gff_dict['gff_fasta_header_type'] = config_obj.get('gff_fasta_header_type')
        gff_dict['gff_fasta_header_attr'] = config_obj.get('gff_fasta_header_attr')
        gff_dict['gff_connection'] = config_obj.get('gff_connection')
        gff_dict['gff_parent_child_types'] = config_obj.get('gff_parent_child_types')
        gff_dict['gff_parent_attr'] = config_obj.get('gff_parent_attr')
        gff_dict['gff_child_attr'] = config_obj.get('gff_child_attr')
        gff_dict['gff_gene_attr'] = config_obj.get('gff_gene_attr')

    return gff_dict