Utilities
nplinker.scoring.utils
¶
get_presence_gcf_strain
¶
get_presence_gcf_strain(
gcfs: Sequence[GCF], strains: StrainCollection
) -> DataFrame
Get the occurrence of strains in gcfs.
The occurrence is a DataFrame with GCF objects as index and Strain objects as columns, and the values are 1 if the gcf occurs in the strain, 0 otherwise.
Source code in src/nplinker/scoring/utils.py
get_presence_spec_strain
¶
get_presence_spec_strain(
spectra: Sequence[Spectrum], strains: StrainCollection
) -> DataFrame
Get the occurrence of strains in spectra.
The occurrence is a DataFrame with Spectrum objects as index and Strain objects as columns, and the values are 1 if the spectrum occurs in the strain, 0 otherwise.
Source code in src/nplinker/scoring/utils.py
get_presence_mf_strain
¶
get_presence_mf_strain(
mfs: Sequence[MolecularFamily],
strains: StrainCollection,
) -> DataFrame
Get the occurrence of strains in molecular families.
The occurrence is a DataFrame with MolecularFamily objects as index and Strain objects as columns, and the values are 1 if the molecular family occurs in the strain, 0 otherwise.