def get_transcript2phylosofs(data, s_exon2char):
    """
    Return a dictionary from transcript id to its phylosofs representation.
    """
    transcript2phylosofs = {}
    for _, gene in data.groupby('GeneID'):
        for transcript_id, transcript in gene.groupby('TranscriptIDCluster'):
            phylosofs = []
            for subexon in transcript.sort_values('S_exon_Rank')['S_exonID']:
                for ortholog in subexon.split('/'):
                    phylosofs.append(s_exon2char[ortholog])
            transcript2phylosofs[transcript_id] = ''.join(phylosofs)
    return transcript2phylosofs