def parse_annotations(vog_table_fp):
    """
    Parse the pvogs annotations from the VOGProteinTable.txt
    This tries to normalize the annotations into a standard
    set of descriptions that is used for counting.
    
    Anything that is annotated as hypothetical is translated
    to 'unknown'.
    
    'protein' and 'putative' are also stripped.
    
    Returns
    annotations_dic:dict
        A dictionary that holds the processed terms
        of the form
            {pvog_id : 
                [annotation_1, annotation_2, ...],
            ...}
            
    annotations_original:dict
        A dictionary that holds the original terms
        of the form
            {pvog_id: 
                [annotation_1, annotation_2, ...],
            ...}
    
    """

    annotations_dic = {}
    annotations_original = {}
    with open(vog_table_fp, 'r') as fin:
        for line in fin:
                fields = line.split('|')
                pvog = fields[0].split(':')[0]
                if len(fields) > 2:
                    annotation = fields[2].split(':')[0]
                    processed_annotation = annotation
                    if 'hypothetical' in processed_annotation:#or annotation == '-':
                        processed_annotation=processed_annotation.replace('hypothetical protein', '').strip()
                        if processed_annotation == '':
                            processed_annotation = 'unknown'
                        else:
                            processed_annotation = processed_annotation.strip()

                    if 'protein' in annotation:
                        processed_annotation = processed_annotation.replace('protein', '')
                    if 'putative' in annotation:
                        processed_annotation = processed_annotation.replace('putative', '')
                else:
                    annotation = 'unknown'
                    processed_annotation = 'unknown'

                if pvog not in annotations_dic:
                    annotations_dic[pvog] = [processed_annotation.strip()]
                else:
                    annotations_dic[pvog].append(processed_annotation.strip())

                if pvog not in annotations_original:
                    annotations_original[pvog] = [annotation.strip()]
                else:
                    annotations_original[pvog].append(annotation.strip())

    return annotations_dic, annotations_original