How to use the protmapper.uniprot_client.load_fasta_sequences function in protmapper

To help you get started, we’ve selected a few protmapper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sorgerlab / indra / indra / sources / hprd / api.py View on Github external
'ppi_file must be given.')
    if ptm_file and not seq_file:
        raise ValueError('If ptm_file is given, seq_file must also be given.')
    # Load complexes into dataframe
    cplx_df = None
    if complexes_file:
        cplx_df = pd.read_csv(complexes_file, delimiter='\t', names=_cplx_cols,
                              dtype='str', na_values=['-', 'None'])
    # Load ptm data into dataframe
    ptm_df = None
    seq_dict = None
    if ptm_file:
        ptm_df = pd.read_csv(ptm_file, delimiter='\t', names=_ptm_cols,
                             dtype='str', na_values='-')
        # Load protein sequences as a dict keyed by RefSeq ID
        seq_dict = load_fasta_sequences(seq_file, id_index=2)
    # Load the PPI data into dataframe
    ppi_df = None
    if ppi_file:
        ppi_df = pd.read_csv(ppi_file, delimiter='\t', names=_ppi_cols,
                             dtype='str')
    # Create the processor
    return HprdProcessor(id_df, cplx_df, ptm_df, ppi_df, seq_dict, motif_window)

protmapper

Map protein sites to human reference sequence.

BSD-2-Clause
Latest version published 10 months ago

Package Health Score

51 / 100
Full package analysis

Similar packages