def get_line_info(line):
    """Get gene information from line in data file.

    Parameters
    ----------
    line : String
        Line from gene anotation file.
    offset : Integer, optional
        Number used to offset the position of data in cases the columns
        do not match. The default is 0.

    Returns
    -------
    Instance of a gene, transcript or exon.

    None
        Returns None in case the sequence type is in the excluded list.

    """
    excluded = ( 'centromere', 'match', 'cDNA_match', 'recombination_feature',
                'sequence_feature', 'region', 'enhancer', 'D_loop')


    if 'Curated Genomic' in line:  # this sequence reference changes the column data order

        offset=1

    else:

        offset=0

    line = line.split()

    line_dict = {}



    # get seqeunce type
    line_dict['seq_type'] = line[2 + offset]

    if line_dict['seq_type'] in excluded:  # Return if  sequence type on the excluded list

        return None

    # get chromosome ID
    line_dict['chromosome'] = line[0]

    # Get sequence start and end
    line_dict['seq_range'] = (int(line[3+offset]), int(line[4+offset]))

    # Get sequence orientation (+: sense, -:antisense)
    line_dict['orientation'] = line[6+offset]

    # get general seqeunce description
    description = line[8+offset].split(';')

    line_dict['ID'] = description[0][3:]

    if 'Parent' in description[1]:

        line_dict['parent'] = description[1][7:]
        geneID = description[2]

        index = geneID.find('GeneID:')

        line_dict['geneID'] = geneID[index+7:].split(',')[0]
        line_dict['name'] = ''

    else:

        line_dict['name'] = description[2][5:]
        line_dict['parent'] = ''
        geneID = description[1]
        index = geneID.find('GeneID:')
        line_dict['geneID'] = geneID[index+7:].split(',')[0]

    return line_dict