Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'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)