IonIdentityMolecularNetworking#

class pyopenms.IonIdentityMolecularNetworking#

Bases: object

Cython implementation of _IonIdentityMolecularNetworking

Original C++ documentation is available here

Includes the necessary functions to generate filed required for GNPS ion identity molecular networking (IIMN).

__init__(self) None#

Methods

__init__(self)

annotateConsensusMap

__static_IonIdentityMolecularNetworking_annotateConsensusMap(consensus_map: ConsensusMap ) -> None

writeSupplementaryPairTable

__static_IonIdentityMolecularNetworking_writeSupplementaryPairTable(consensus_map: ConsensusMap , output_file: Union[bytes, str, String] ) -> None

annotateConsensusMap()#
__static_IonIdentityMolecularNetworking_annotateConsensusMap(consensus_map: ConsensusMap ) -> None

Annotate ConsensusMap for ion identity molecular networking (IIMN) workflow by GNPS.

Adds meta values Constants::UserParams::IIMN_ROW_ID (unique index for each feature), Constants::UserParams::IIMN_ADDUCT_PARTNERS (related features row IDs) and Constants::UserParams::IIMN_ANNOTATION_NETWORK_NUMBER (all related features with different adduct states) get the same network number). This method requires the features annotated with the Constants::UserParams::IIMN_LINKED_GROUPS meta value. If at least one of the features has an annotation for Constants::UserParam::IIMN_LINKED_GROUPS, annotate ConsensusMap for IIMN.

param consensus_map:

Input ConsensusMap without IIMN annotations.

writeSupplementaryPairTable()#
__static_IonIdentityMolecularNetworking_writeSupplementaryPairTable(consensus_map: ConsensusMap , output_file: Union[bytes, str, String] ) -> None

Write supplementary pair table (csv file) from a ConsensusMap with edge annotations for connected features. Required for GNPS IIMN.

The table contains the columns “ID 1” (row ID of first feature), “ID 2” (row ID of second feature), “EdgeType” (MS1/2 annotation), “Score” (the number of direct partners from both connected features) and “Annotation” (adducts and delta m/z between two connected features).

param consensus_map:

Input ConsensusMap annotated with IonIdentityMolecularNetworking.annotateConsensusMap.

param output_file:

Output file path for the supplementary pair table.