code: def PFM_to_PPM(pfm):
      """
      Calculate position probability matrix from a position frequency matrix
      """
      ppm = pfm.copy()
      for col in range(ppm.shape[1]):
          total_count = np.sum(ppm[:, col])
          if total_count > 0:
              # Calculate frequency
              ppm[:, col] = ppm[:, col] / total_count
      return ppm
  
file_path: deepchem/deepchem/feat/sequence_featurizers/position_frequency_matrix_featurizer.py
imports: import numpy
  from deepchem.feat.molecule_featurizers import OneHotFeaturizer
  from deepchem.feat.base_classes import Featurizer
  from typing import List, Optional
label_desc: Use image node_id 1 for calling a global function with example usage: PFM_to_PPM(pfm) and returns: ppm