def _gene2n_transcripts(data):
    """
    Return a dictionary from gene id to number of transcripts in the gene.
    """
    return data.groupby('GeneID').apply(
        lambda df: len(set(df.TranscriptIDCluster))).to_dict()