MzPAF#
- class pyopenms.MzPAF#
Bases:
objectParser and writer for mzPAF (Peak Annotation Format) notation
- __init__(*args, **kwargs)#
Methods
__init__(*args, **kwargs)calculateTheoreticalMZ(ann, sequence)Calculate theoretical m/z for an annotation and peptide sequence, or None if unsupported
Parse ion series from character (returns None if invalid)
fromPeakAnnotation(peak_annotation)Parse mzPAF annotations from a PeakAnnotation
ionSeriesToChar(series)Get the ion series character for an annotation
isMzPAFFormat(annotation)Check if a string appears to be in mzPAF format
isPeptideFragmentIon(series)Check if ion series is a peptide fragment ion (a, b, c, d, v, w, x, y, z)
parse(input)Parse an mzPAF string into a single annotation
parseMultiple(input)Parse an mzPAF string with potentially multiple annotations
toPeakAnnotation(mzpaf, mz, intensity)Create a PeakAnnotation from mzPAF data
toString(ann)Convert an annotation to mzPAF string
toStringMultiple(anns)Convert multiple annotations to mzPAF string
tryParse(input)Try to parse an mzPAF string (returns None on failure)
tryParseMultiple(input)Try to parse multiple annotations (returns None on failure)
- static calculateTheoreticalMZ(ann: pyopenms.MzPAFAnnotation, sequence: pyopenms.AASequence) float | None#
Calculate theoretical m/z for an annotation and peptide sequence, or None if unsupported
- static charToIonSeries(c: str) pyopenms.MzPAFIonSeries | None#
Parse ion series from character (returns None if invalid)
- static fromPeakAnnotation(peak_annotation: pyopenms.PeptideHit_PeakAnnotation) pyopenms.MzPAFPeakAnnotations#
Parse mzPAF annotations from a PeakAnnotation
- static ionSeriesToChar(series: pyopenms.MzPAFIonSeries) str#
Get the ion series character for an annotation
- static isMzPAFFormat(annotation: str) bool#
Check if a string appears to be in mzPAF format
- static isPeptideFragmentIon(series: pyopenms.MzPAFIonSeries) bool#
Check if ion series is a peptide fragment ion (a, b, c, d, v, w, x, y, z)
- static parse(input: str) pyopenms.MzPAFAnnotation#
Parse an mzPAF string into a single annotation
- static parseMultiple(input: str) pyopenms.MzPAFPeakAnnotations#
Parse an mzPAF string with potentially multiple annotations
- static toPeakAnnotation(mzpaf: pyopenms.MzPAFAnnotation, mz: float, intensity: float) pyopenms.PeptideHit_PeakAnnotation#
Create a PeakAnnotation from mzPAF data
- static toString(ann: pyopenms.MzPAFAnnotation) str#
Convert an annotation to mzPAF string
- static toStringMultiple(anns: pyopenms.MzPAFPeakAnnotations) str#
Convert multiple annotations to mzPAF string
- static tryParse(input: str) pyopenms.MzPAFAnnotation | None#
Try to parse an mzPAF string (returns None on failure)
- static tryParseMultiple(input: str) pyopenms.MzPAFPeakAnnotations | None#
Try to parse multiple annotations (returns None on failure)