def add_psms_to_proteindata(proteindata, p_acc, pool, psmdata):
    """Fill function for create_featuredata_map"""
    seq, psm_id = psmdata[2], psmdata[3]
    try:
        proteindata[p_acc]['pools'][pool]['psms'].add(psm_id)
    except KeyError:
        emptyinfo = {'psms': set(), 'peptides': set(), 'unipeps': 0}
        try:
            proteindata[p_acc]['pools'][pool] = emptyinfo
        except KeyError:
            proteindata[p_acc].update({'pools': {pool: emptyinfo}})
        proteindata[p_acc]['pools'][pool]['psms'].add(psm_id)
    proteindata[p_acc]['pools'][pool]['peptides'].add(seq)
def add_psms_to_proteindata ( proteindata , p_acc , pool , psmdata ) : seq , psm_id = psmdata [ 2 ] , psmdata [ 3 ] try : proteindata [ p_acc ] [ 'pools' ] [ pool ] [ 'psms' ] . add ( psm_id ) except KeyError : emptyinfo = { 'psms' : set ( ) , 'peptides' : set ( ) , 'unipeps' : 0 } try : proteindata [ p_acc ] [ 'pools' ] [ pool ] = emptyinfo except KeyError : proteindata [ p_acc ] . update ( { 'pools' : { pool : emptyinfo } } ) proteindata [ p_acc ] [ 'pools' ] [ pool ] [ 'psms' ] . add ( psm_id ) proteindata [ p_acc ] [ 'pools' ] [ pool ] [ 'peptides' ] . add ( seq )
Fill function for create_featuredata_map