def extract_edge_annotations_from_GTF(tab_fields):
    """ Extracts key-value annotations from the GTF description field
    """
    attributes = {}

    description = tab_fields[-1].strip()
    # Parse description
    for pair in [x.strip() for x in description.split(";")]:
        if pair == "": continue

        pair = pair.replace('"', '')
        key, val = pair.split()
        attributes[key] = val

    # Put in placeholders for important attributes (such as gene_id) if they
    # are absent
    if "gene_id" not in attributes:
        attributes["gene_id"] = "NULL"
    if "transcript_id" not in attributes:
        attributes["transcript_id"] = "NULL"

    attributes["source"] = tab_fields[1]

    return attributes