IonIdentityMolecularNetworking#
- class pyopenms.IonIdentityMolecularNetworking#
Bases:
objectIncludes the necessary functions to generate filed required for GNPS ion identity molecular networking (IIMN).
- __init__() None#
Methods
__init__()annotateConsensusMap(consensus_map)Annotate ConsensusMap for ion identity molecular networking (IIMN) workflow by GNPS.
writeSupplementaryPairTable(consensus_map, ...)Write supplementary pair table (csv file) from a ConsensusMap with edge annotations for connected features.
- static annotateConsensusMap(consensus_map: pyopenms.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.
- Parameters:
consensus_map – Input ConsensusMap without IIMN annotations.
- static writeSupplementaryPairTable(consensus_map: pyopenms.ConsensusMap, output_file: str) 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).
- Parameters:
consensus_map – Input ConsensusMap annotated with IonIdentityMolecularNetworking.annotateConsensusMap.
output_file – Output file path for the supplementary pair table.