FileInfo#

class pyopenms.FileInfo#

Bases: object

Library-level equivalent of the FileInfo TOPP tool: inspect an OpenMS-readable file and return all file-level information as a structured result (also usable from pyOpenMS).

__init__() → None#

Methods

__init__()

run(filename, options)

Overloaded function.

run_all(filename)

Compute all content metrics (meta/processing/statistics on; no validation/index/detail/corrupt)

to_text(result)

Render the result as the FileInfo CLI human-readable text

to_tsv(result)

Render the result as the FileInfo CLI TSV

class Contact#

Bases: object

a contact person

property email: str#
property first_name: str#
property last_name: str#
class CorruptionInfo#

Bases: object

the -c block

property errors: list[str]#
property performed: bool#
property warnings: list[str]#
class DetailInfo#

Bases: object

the -d per-spectrum listing (pre-rendered)

property lines: list[str]#
property performed: bool#
class ExperimentMeta#

Bases: object

the -m metadata block (peak files)

property contacts: list[pyopenms.FileInfo.Contact]#
property date: str#
property detectors: list[str]#
property document_id: str#
property instrument_model: str#
property instrument_name: str#
property instrument_vendor: str#
property ion_sources: list[str]#
property mass_analyzers: list[str]#
property present: bool#
property sample_comment: str#
property sample_name: str#
property sample_organism: str#
class FastaInfo#

Bases: object

FASTA specifics

property ambiguity_counts: dict[str, int]#
property dup_headers: int#
property dup_sequences: int#
property is_nucleic_acid: bool#
property length_stats: pyopenms.SummaryStatistics#
property num_sequences: int#
property seq_with_ambiguous: int#
property total_residues: int#
class FeatureInfo#

Bases: object

feature / consensus specifics

property assigned_ids: int#
property charges: dict[int, int]#
property ids_per_element: dict[int, int]#
property is_consensus: bool#
property map_columns: list[pyopenms.FileInfo.MapColumn]#
property num_features: int#
property size_distribution: dict[int, int]#
property tic: float#
property unassigned_ids: int#
class FileMeta#

Bases: object

general file header (always populated)

property file_name: str#
property file_type: pyopenms.FileTypes.FileType#
property file_type_name: str#
class IdentInfo#

Bases: object

identification (idXML / mzIdentML) specifics

property avg_peptide_length: float#
property db_name: str#
property db_version: str#
property matched_spectra: int#
property modification_counts: dict[str, int]#
property modified_tophits: int#
property non_redundant_peptides: int#
property non_redundant_protein_hits: int#
property num_runs: int#
property peptide_hits: int#
property protein_hits: int#
property psms_per_spectrum: float#
property search_engines: list[str]#
property taxonomy: str#
class MapColumn#

Bases: object

a consensus map column header

property filename: str#
property identifier: str#
property label: str#
property size: int#
class MzTabInfo#

Bases: object

mzTab specifics

property mode: str#
property nucleic_acids: int#
property oligonucleotides: int#
property osms: int#
property peptides: int#
property proteins: int#
property psms: int#
property small_molecules: int#
property type: str#
property version: str#
class NamedStats#

Bases: object

a named SummaryStatistics block (-s)

property stats: pyopenms.SummaryStatistics#
property title: str#
class Options#

Bases: object

which optional analyses to run (mirror the CLI flags)

property check_corrupt: bool#
property check_index: bool#
property detailed: bool#
property forced_type: pyopenms.FileTypes.FileType#
property log_type: pyopenms.ProgressLogger.LogType#

(self) -> OpenMS::ProgressLogger::LogType

property meta: bool#
property processing: bool#
property statistics: bool#
property validate: bool#
class PeakInfo#

Bases: object

peak-file (MSExperiment) specifics

activation_methods_flat() → list[tuple[int, str, int]]#

Activation methods as a list of (ms_level, method_name, count) tuples

property chromatogram_types: dict[str, int]#
property faims_cvs: list[float]#
property float_arrays: dict[str, int]#
property instrument_name: str#
property int_arrays: dict[str, int]#
property mass_analyzers: list[tuple[str, float]]#
property ms_levels: list[int]#
property num_chrom_peaks: int#
property num_chromatograms: int#
property num_spectra: int#
property peak_type_per_ms_level: dict[int, str]#
property precursor_charges: dict[int, int]#
property spectra_per_ms_level: dict[int, int]#
property string_arrays: dict[str, int]#
property total_peaks: int#
class ProcessingStep#

Bases: object

a data-processing step (-p)

property actions: list[str]#
property completion_time: str#
property software_name: str#
property software_version: str#
class Range#

Bases: object

[min,max] interval for one dimension

property max: float#
property min: float#
property present: bool#
class RangeSet#

Bases: object

RT / m/z / mobility / intensity ranges

property has_mobility: bool#
property intensity: pyopenms.FileInfo.Range#
property mobility: pyopenms.FileInfo.Range#
property mz: pyopenms.FileInfo.Range#
property rt: pyopenms.FileInfo.Range#
class Ranges#

Bases: object

range categories (MSExperiment carries all four)

property chromatograms: pyopenms.FileInfo.RangeSet#
property combined: pyopenms.FileInfo.RangeSet#
property is_experiment: bool#
property per_ms_level: dict[int, pyopenms.FileInfo.RangeSet]#
property spectra_overall: pyopenms.FileInfo.RangeSet#
class Result#

Bases: object

all file-level information

property corruption: pyopenms.FileInfo.CorruptionInfo#
property detail: pyopenms.FileInfo.DetailInfo#
property experiment_meta: pyopenms.FileInfo.ExperimentMeta | None#
property fasta: pyopenms.FileInfo.FastaInfo | None#
property feature: pyopenms.FileInfo.FeatureInfo | None#
property ident: pyopenms.FileInfo.IdentInfo | None#
property meta: pyopenms.FileInfo.FileMeta#
property mztab: pyopenms.FileInfo.MzTabInfo | None#
property peak: pyopenms.FileInfo.PeakInfo | None#
property processing: list[pyopenms.FileInfo.ProcessingStep]#
property ranges: pyopenms.FileInfo.Ranges#
property statistics: list[pyopenms.FileInfo.NamedStats]#
property targeted_summary: str#
property text: str#
property transformation_summary: str#
property tsv: str#
property validation: pyopenms.FileInfo.ValidationInfo#
class ValidationInfo#

Bases: object

the -v / -i blocks

property detail: str#
property errors: list[str]#
property index_checked: bool#
property index_valid: bool#
property indexed_chromatograms: int#
property indexed_spectra: int#
property performed: bool#
property schema_version: str#
property supported: bool#
property valid: bool#
property warnings: list[str]#
run(filename: str, options: pyopenms.FileInfo.Options) → pyopenms.FileInfo.Result#
run(filename: str) → pyopenms.FileInfo.Result

Overloaded function.

  1. run(filename: str, options: pyopenms.FileInfo.Options) -> pyopenms.FileInfo.Result

Load the file (type auto-detected unless options.forced_type) and compute all requested information

  1. run(filename: str) -> pyopenms.FileInfo.Result

Load the file with default options

run_all(filename: str) → pyopenms.FileInfo.Result#

Compute all content metrics (meta/processing/statistics on; no validation/index/detail/corrupt)

static to_text(result: pyopenms.FileInfo.Result) → str#

Render the result as the FileInfo CLI human-readable text

static to_tsv(result: pyopenms.FileInfo.Result) → str#

Render the result as the FileInfo CLI TSV