def __parse_compounds():
    '''Gets and parses file'''
    filename = get_file('compounds.tsv.gz')

    with io.open(filename, 'r', encoding='cp1252') as textfile:
        next(textfile)

        for line in textfile:
            tokens = line.strip().split('\t')
            chebi_id = int(tokens[0])

            __STATUSES[chebi_id] = tokens[1]
            __SOURCES[chebi_id] = tokens[3]

            parent_id_token = tokens[4]
            __PARENT_IDS[chebi_id] = float('NaN') \
                if parent_id_token == 'null' \
                else int(parent_id_token)
            __put_all_ids(chebi_id, chebi_id)

            if parent_id_token != 'null':
                parent_id = int(parent_id_token)
                __put_all_ids(parent_id, chebi_id)

            __NAMES[chebi_id] = None if tokens[5] == 'null' else tokens[5]
            __DEFINITIONS[chebi_id] = None if tokens[6] == 'null' \
                else tokens[6]
            __MODIFIED_ONS[chebi_id] = None if tokens[7] == 'null' \
                else datetime.datetime.strptime(tokens[7], '%Y-%m-%d')
            __CREATED_BYS[chebi_id] = None if tokens[8] == 'null' \
                or len(tokens) == 9 else tokens[8]
            __STARS[chebi_id] = float('NaN') \
                if tokens[9 if len(tokens) > 9 else 8] == 'null' \
                else int(tokens[9 if len(tokens) > 9 else 8])