### Download an example mzML file Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/mzml_files.rst.txt Downloads a small example mzML file from a GitHub repository for analysis. Ensure the file path is correct. ```python import pyopenms as oms from urllib.request import urlretrieve gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve(gh + "/src/data/tiny.mzML", "test.mzML") ``` -------------------------------- ### Download Example Data Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/identification_accurate_mass.rst.txt Downloads example mzML files and associated database files if the specified directory does not exist. This is useful for running the example workflow without providing your own data. ```python if not os.path.isdir(os.path.join(os.getcwd(), "IdByMz_Example")): os.mkdir(os.path.join(os.getcwd(), "IdByMz_Example")) base = "https://abibuilder.cs.uni-tuebingen.de/archive/openms/Tutorials/Example_Data/Metabolomics/" urls = [ "datasets/2012_02_03_PStd_050_1.mzML", "datasets/2012_02_03_PStd_050_2.mzML", "datasets/2012_02_03_PStd_050_3.mzML", "databases/PositiveAdducts.tsv", "databases/NegativeAdducts.tsv", "databases/HMDBMappingFile.tsv", "databases/HMDB2StructMapping.tsv", ] for url in urls: request = requests.get(base + url, allow_redirects=True) open(os.path.join(files, os.path.basename(url)), "wb").write( request.content ) ``` -------------------------------- ### Download Example Data Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/PSM_to_features.rst.txt Downloads example featureXML and idXML files from a GitHub repository. Ensure you have internet connectivity. ```python import pyopenms as oms from urllib.request import urlretrieve base_url = ( "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms/src/data/" ) feature_file = "BSA1_F1.featureXML" urlretrieve(base_url + feature_file, feature_file) idxml_file = "BSA1_F1.idXML" urlretrieve(base_url + idxml_file, idxml_file) ``` -------------------------------- ### Download and Load mzML Data Source: https://pyopenms.readthedocs.io/en/latest/user_guide/ms_data.html Downloads an example mzML file and loads it into an MSExperiment object. This is a common setup for many pyOpenMS examples. ```python from urllib.request import urlretrieve gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve( gh + "/src/data/PrecursorPurity_input.mzML", "PrecursorPurity_input.mzML" ) exp = oms.MSExperiment() oms.MzMLFile().load("PrecursorPurity_input.mzML", exp) ``` -------------------------------- ### Download Example Feature Files Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/map_alignment.rst.txt Downloads example featureXML files from a GitHub repository and loads them into pyOpenMS FeatureMap objects. This is useful for testing alignment algorithms. ```python import pyopenms as oms from urllib.request import urlretrieve base_url = ( "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms/src/data/" ) # we use featureXML files which already contain PSMs (as obtained by oms.IDMapper()) # ... so we can use all aligners pyOpenMS has to offer feature_files = [ "BSA1_F1_idmapped.featureXML", "BSA2_F1_idmapped.featureXML", "BSA3_F1_idmapped.featureXML", ] feature_maps = [] # download the feature files and store feature maps in list (feature_maps) for feature_file in feature_files: urlretrieve(base_url + feature_file, feature_file) feature_map = oms.FeatureMap() oms.FeatureXMLFile().load(feature_file, feature_map) feature_maps.append(feature_map) ``` -------------------------------- ### Download Example Feature Data Source: https://pyopenms.readthedocs.io/en/latest/user_guide/map_alignment.html Downloads example featureXML files and loads them into pyOpenMS FeatureMap objects. These files are required for map alignment. ```python import pyopenms as oms from urllib.request import urlretrieve base_url = ( "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms/src/data/" ) # we use featureXML files which already contain PSMs (as obtained by oms.IDMapper()) # ... so we can use all aligners pyOpenMS has to offer feature_files = [ "BSA1_F1_idmapped.featureXML", "BSA2_F1_idmapped.featureXML", "BSA3_F1_idmapped.featureXML", ] feature_maps = [] # download the feature files and store feature maps in list (feature_maps) for feature_file in feature_files: urlretrieve(base_url + feature_file, feature_file) feature_map = oms.FeatureMap() oms.FeatureXMLFile().load(feature_file, feature_map) feature_maps.append(feature_map) ``` -------------------------------- ### Download Data and Run Simple Search Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/peptide_search.rst.txt Downloads example mzML and FASTA files and performs a peptide search using the SimpleSearchEngineAlgorithm. Ensure you have pyOpenMS installed. ```python from urllib.request import urlretrieve import pyopenms as oms gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve(gh + "/src/data/SimpleSearchEngine_1.mzML", "searchfile.mzML") urlretrieve(gh + "/src/data/SimpleSearchEngine_1.fasta", "search.fasta") protein_ids = [] peptide_ids = oms.PeptideIdentificationList() oms.SimpleSearchEngineAlgorithm().search( "searchfile.mzML", "search.fasta", protein_ids, peptide_ids ) ``` -------------------------------- ### Download Example mzML Files Source: https://pyopenms.readthedocs.io/en/latest/user_guide/untargeted_metabolomics_preprocessing.html Downloads two example mzML files from a GitHub repository for use in metabolomics pre-processing. Ensure you have an internet connection. ```python from urllib.request import urlretrieve gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve(gh + "/src/data/Metabolomics_1.mzML", "Metabolomics_1.mzML") urlretrieve(gh + "/src/data/Metabolomics_2.mzML", "Metabolomics_2.mzML") ``` -------------------------------- ### Download Example mzML Files Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/untargeted_metabolomics_preprocessing.rst.txt Downloads two example mzML files from GitHub using urlretrieve. Ensure you have internet connectivity. ```python from urllib.request import urlretrieve gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve(gh + "/src/data/Metabolomics_1.mzML", "Metabolomics_1.mzML") urlretrieve(gh + "/src/data/Metabolomics_2.mzML", "Metabolomics_2.mzML") ``` -------------------------------- ### Download Example Data Source: https://pyopenms.readthedocs.io/en/latest/user_guide/export_files_GNPS.html Downloads example mzML and consensusXML files required for GNPS export. Ensure you have write permissions in the current directory. ```python from urllib.request import urlretrieve gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve( gh + "/src/data/Metabolomics_1_aligned.mzML", "Metabolomics_1_aligned.mzML" ) urlretrieve( gh + "/src/data/Metabolomics_2_aligned.mzML", "Metabolomics_2_aligned.mzML" ) urlretrieve( gh + "/src/data/UntargetedMetabolomics.consensusXML", "UntargetedMetabolomics.consensusXML", ) ``` -------------------------------- ### Download Example Feature Data Source: https://pyopenms.readthedocs.io/en/latest/user_guide/feature_linking.html Downloads example FeatureXML files from a GitHub repository and loads them into pyOpenMS FeatureMap objects. This is a prerequisite for performing feature linking. ```python import pyopenms as oms from urllib.request import urlretrieve base_url = ( "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms/src/data/" ) feature_files = [ "BSA1_F1.featureXML", "BSA2_F1.featureXML", "BSA3_F1.featureXML", ] feature_maps = [] # download the feature files and store feature maps in list (feature_maps) for feature_file in feature_files: urlretrieve(base_url + feature_file, feature_file) feature_map = oms.FeatureMap() oms.FeatureXMLFile().load(feature_file, feature_map) feature_maps.append(feature_map) ``` -------------------------------- ### Download Example GNPS Data Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/export_files_GNPS.rst.txt Downloads example mzML and consensusXML files required for GNPS workflows. ```python from urllib.request import urlretrieve gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve( gh + "/src/data/Metabolomics_1_aligned.mzML", "Metabolomics_1_aligned.mzML" ) urlretrieve( gh + "/src/data/Metabolomics_2_aligned.mzML", "Metabolomics_2_aligned.mzML" ) urlretrieve( gh + "/src/data/UntargetedMetabolomics.consensusXML", "UntargetedMetabolomics.consensusXML" ) ``` -------------------------------- ### Install pyOpenMS using pip Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/installation.rst.txt Use these commands to install the stable version of pyOpenMS from PyPI. Ensure numpy is installed first. ```bash pip install numpy pip install pyopenms ``` -------------------------------- ### Install Nightly pyOpenMS Builds Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/installation.rst.txt Install the latest nightly builds of pyOpenMS from the specified index URL to access the newest features. ```bash pip install --index-url https://pypi.cs.uni-tuebingen.de/simple/ pyopenms ``` -------------------------------- ### Install ML Libraries Source: https://pyopenms.readthedocs.io/en/latest/user_guide/interfacing_ml_libraries.html Installs the seaborn and xgboost libraries required for machine learning tasks. Run these commands in your environment. ```bash pip install seaborn pip install xgboost ``` -------------------------------- ### SwathWindowLoader.__init__ Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.SwathWindowLoader.rst.txt Initializes the SwathWindowLoader object. ```APIDOC ## SwathWindowLoader.__init__ ### Description Initializes a new instance of the SwathWindowLoader class. ### Method __init__ ### Parameters This method does not take any explicit parameters in its signature, but its behavior might depend on the class's internal state or default settings. ``` -------------------------------- ### General Algorithm Usage in OpenMS Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/algorithms.rst.txt Demonstrates the basic pattern for using an algorithm class, populating an MSExperiment, and running the algorithm. ```output algorithm = NameOfTheAlgorithmClass() exp = MSExperiment() # populate exp, for example load from file # ... # run the algorithm on data algorithm.filterExperiment(exp) ``` -------------------------------- ### Applying GaussFilter to mzML Data Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/algorithms.rst.txt Example of loading mzML data, applying a GaussFilter, and processing the experiment. Ensure pyopenms is installed and necessary data is available. ```python import pyopenms as oms from urllib.request import urlretrieve gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve(gh + "/src/data/tiny.mzML", "test.mzML") gf = oms.GaussFilter() exp = oms.MSExperiment() om.MzMLFile().load("test.mzML", exp) gf.filterExperiment(exp) # oms.MzMLFile().store("test.filtered.mzML", exp) ``` -------------------------------- ### FASTAFile.writeStart() Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.FASTAFile.html Prepares a FASTA file for streamed writing. ```APIDOC ## FASTAFile.writeStart() ### Description Prepares a FASTA file given by 'filename' for streamed writing using writeNext(). ### Method writeStart(self, filename) ### Parameters - **filename** (bytes | str | String_): The path to the FASTA file to prepare for writing. ### Raises - Exception: UnableToCreateFile is thrown if the process is not able to write to the file (e.g., disk full?). ``` -------------------------------- ### FLASHDeconvAlgorithm.startProgress Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.FLASHDeconvAlgorithm.html Initializes and starts the progress display for the algorithm. ```APIDOC ## FLASHDeconvAlgorithm.startProgress ### Description Starts the progress display. ### Parameters - **begin** (int) - The starting value for the progress range. - **end** (int) - The ending value for the progress range. - **label** (bytes | str | String) - A label for the progress display. ``` -------------------------------- ### Create and Store mzML File Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/first_steps.rst.txt Demonstrates creating an empty MSExperiment object and storing it as an mzML file. Requires pyOpenMS to be imported as oms. ```python import pyopenms as oms exp = oms.MSExperiment() oms.MzMLFile().store("testfile.mzML", exp) ``` -------------------------------- ### TransitionPQPFile Methods Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.TransitionPQPFile.rst.txt This section details the methods available for the TransitionPQPFile class, including initialization and various conversion utilities. ```APIDOC ## TransitionPQPFile.__init__ ### Description Initializes a new instance of the TransitionPQPFile class. ### Method __init__ ### Parameters This method does not take any explicit parameters in its signature. ### Code Example ```python from pyopenms import TransitionPQPFile pqp_file = TransitionPQPFile() ``` ``` ```APIDOC ## TransitionPQPFile.convertPQPToTargetedExperiment ### Description Converts data from a PQP file to a TargetedExperiment object. ### Method convertPQPToTargetedExperiment ### Parameters This method likely takes the path to the PQP file as an argument. ### Code Example ```python from pyopenms import TransitionPQPFile, TargetedExperiment pqp_file_handler = TransitionPQPFile() targeted_experiment = TargetedExperiment() # Assuming 'input.pqp' is a valid PQP file path pqp_file_handler.convertPQPToTargetedExperiment('input.pqp', targeted_experiment) ``` ``` ```APIDOC ## TransitionPQPFile.convertTSVToTargetedExperiment ### Description Converts data from a TSV file to a TargetedExperiment object. ### Method convertTSVToTargetedExperiment ### Parameters This method likely takes the path to the TSV file as an argument. ### Code Example ```python from pyopenms import TransitionPQPFile, TargetedExperiment pqp_file_handler = TransitionPQPFile() targeted_experiment = TargetedExperiment() # Assuming 'input.tsv' is a valid TSV file path pqp_file_handler.convertTSVToTargetedExperiment('input.tsv', targeted_experiment) ``` ``` ```APIDOC ## TransitionPQPFile.convertTargetedExperimentToPQP ### Description Converts a TargetedExperiment object to a PQP file. ### Method convertTargetedExperimentToPQP ### Parameters This method likely takes the path for the output PQP file and a TargetedExperiment object as arguments. ### Code Example ```python from pyopenms import TransitionPQPFile, TargetedExperiment pqp_file_handler = TransitionPQPFile() targeted_experiment = TargetedExperiment() # Populate this object with data # Assuming 'output.pqp' is the desired output file path pqp_file_handler.convertTargetedExperimentToPQP(targeted_experiment, 'output.pqp') ``` ``` ```APIDOC ## TransitionPQPFile.convertTargetedExperimentToTSV ### Description Converts a TargetedExperiment object to a TSV file. ### Method convertTargetedExperimentToTSV ### Parameters This method likely takes the path for the output TSV file and a TargetedExperiment object as arguments. ### Code Example ```python from pyopenms import TransitionPQPFile, TargetedExperiment pqp_file_handler = TransitionPQPFile() targeted_experiment = TargetedExperiment() # Populate this object with data # Assuming 'output.tsv' is the desired output file path pqp_file_handler.convertTargetedExperimentToTSV(targeted_experiment, 'output.tsv') ``` ``` ```APIDOC ## TransitionPQPFile.validateTargetedExperiment ### Description Validates a TargetedExperiment object. ### Method validateTargetedExperiment ### Parameters This method likely takes a TargetedExperiment object as an argument. ### Code Example ```python from pyopenms import TransitionPQPFile, TargetedExperiment pqp_file_handler = TransitionPQPFile() targeted_experiment = TargetedExperiment() # Populate this object with data validation_result = pqp_file_handler.validateTargetedExperiment(targeted_experiment) # Process validation_result ``` ``` -------------------------------- ### Install Necessary Libraries Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/interfacing_ml_libraries.rst.txt Installs the seaborn and xgboost libraries using pip. Run this command in your environment before proceeding. ```ipython3 !pip install seaborn !pip install xgboost ``` -------------------------------- ### Create and Populate MSExperiment Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/ms_data.rst.txt Demonstrates creating an MSExperiment, adding multiple MSSpectrum objects with peaks, and iterating through them. Useful for building experimental data from scratch. ```python # The following examples creates an MSExperiment which holds six # MSSpectrum instances. exp = oms.MSExperiment() for i in range(6): spectrum = oms.MSSpectrum() spectrum.setRT(i) spectrum.setMSLevel(1) for mz in range(500, 900, 100): peak = oms.Peak1D() peak.setMZ(mz + i) peak.setIntensity(100 - 25 * abs(i - 2.5)) spectrum.push_back(peak) exp.addSpectrum(spectrum) # Iterate over spectra for i_spectrum, spectrum in enumerate(exp, start=1): print("Spectrum {i:d}:".format(i=i_spectrum)) for peak in spectrum: print(spectrum.getRT(), peak.getMZ(), peak.getIntensity()) ``` ```output Spectrum 1: 0.0 500.0 37.5 0.0 600.0 37.5 0.0 700.0 37.5 0.0 800.0 37.5 Spectrum 2: 1.0 501.0 62.5 1.0 601.0 62.5 1.0 701.0 62.5 1.0 801.0 62.5 Spectrum 3: 2.0 502.0 87.5 2.0 602.0 87.5 2.0 702.0 87.5 2.0 802.0 87.5 Spectrum 4: 3.0 503.0 87.5 3.0 603.0 87.5 3.0 703.0 87.5 3.0 803.0 87.5 Spectrum 5: 4.0 504.0 62.5 4.0 604.0 62.5 4.0 704.0 62.5 4.0 804.0 62.5 Spectrum 6: 5.0 505.0 37.5 5.0 605.0 37.5 5.0 705.0 37.5 5.0 805.0 37.5 ``` -------------------------------- ### Install reticulate R Package Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/pyopenms_in_r.rst.txt Install the 'reticulate' package to enable R to use Python functionalities. This is a prerequisite for using pyOpenMS in R. ```R install.packages("reticulate") ``` -------------------------------- ### SimpleOpenMSSpectraFactory.__init__ Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.SimpleOpenMSSpectraFactory.html Initializes the SimpleOpenMSSpectraFactory object. ```APIDOC ## SimpleOpenMSSpectraFactory.__init__() ### Description Initializes the SimpleOpenMSSpectraFactory object. ### Method __init__ ### Parameters None ``` -------------------------------- ### Create and Store Empty mzML File Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/pyopenms_in_r.rst.txt Demonstrates creating an empty MSExperiment object and storing it as an mzML file using pyOpenMS functionalities accessed through R. ```R library(reticulate) ropenms=import("pyopenms", convert = FALSE) exp = ropenms$MSExperiment() ropenms$MzMLFile()$store("testfile.mzML", exp) ``` -------------------------------- ### Get pyOpenMS Object Help Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/pyopenms_in_r.rst.txt Use the 'py_help' function from reticulate to get detailed information about pyOpenMS objects directly within R. ```R library(reticulate) ropenms=import("pyopenms", convert = FALSE) idXML=ropenms$IdXMLFile py_help(idXML) ``` -------------------------------- ### CVMappingFile.__init__ Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.CVMappingFile.rst.txt Initializes a new instance of the CVMappingFile class. ```APIDOC ## CVMappingFile.__init__ ### Description Initializes a new instance of the CVMappingFile class. ### Method __init__ ### Parameters This method does not take any explicit parameters. ``` -------------------------------- ### OpenMSBuildInfo.__init__() Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.OpenMSBuildInfo.html Constructs an OpenMSBuildInfo object. Can be default constructed or copy constructed. ```APIDOC ## OpenMSBuildInfo.__init__() ### Description Constructs an OpenMSBuildInfo object. Can be default constructed or copy constructed. ### Method __init__ ### Parameters None ``` -------------------------------- ### FASTAFile.readStart() Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.FASTAFile.html Prepares a FASTA file for streamed reading. ```APIDOC ## FASTAFile.readStart() ### Description Prepares a FASTA file given by 'filename' for streamed reading using readNext(). ### Method readStart(self, filename) ### Parameters - **filename** (bytes | str | String_): The path to the FASTA file to prepare for reading. ### Raises - Exception: FileNotFoundError is thrown if the file does not exist. - Exception: ParseError is thrown if the file does not conform to the standard. ``` -------------------------------- ### Get Protease Enzyme Names and Description Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/digestion.rst.txt Retrieves all available protease names from the ProteaseDB and gets the regular expression description for a specific enzyme like Lys-C. ```python names = [] oms.ProteaseDB().getAllNames(names) len(names) # at least 25 by default e = oms.ProteaseDB().getEnzyme("Lys-C") e.getRegExDescription() e.getRegEx() ``` -------------------------------- ### Get Spectrum Data as Dictionary Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.PeakSpectrum.html Retrieves spectrum data as a dictionary. Use 'all' to get all columns including custom data arrays. Defaults to standard columns. ```python >>> # Get all columns (default) >>> data = spectrum.get_data_dict() ``` ```python >>> # Get only specific columns for performance >>> data = spectrum.get_data_dict(columns=['mz', 'intensity']) ``` ```python >>> # Get all available columns including custom data arrays >>> all_cols = spectrum.get_df_columns('all') >>> data = spectrum.get_data_dict(columns=all_cols) ``` -------------------------------- ### Get Chromatogram DataFrame Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.MRMTransitionGroupCP.html Retrieve a pandas DataFrame representation of the chromatograms stored within an MRMTransitionGroupCP object. You can specify which columns to include or get all default columns. Use get_chromatogram_df_columns() to discover available columns. ```python >>> # Get all default columns >>> df = mrm.get_chromatogram_df() ``` ```python >>> # Discover available columns >>> print(mrm.get_chromatogram_df_columns()) ``` ```python >>> # Get only specific columns >>> df = mrm.get_chromatogram_df(columns=['rt', 'intensity']) ``` -------------------------------- ### SiriusMSFile_CompoundInfo.__init__ Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.SiriusMSFile_CompoundInfo.rst.txt Initializes a SiriusMSFile_CompoundInfo object. ```APIDOC ## SiriusMSFile_CompoundInfo.__init__ ### Description Initializes a SiriusMSFile_CompoundInfo object. ### Method __init__ ### Parameters This method does not take any explicit parameters in its signature, but its initialization might depend on the context in which it is called within the pyopenms library. ``` -------------------------------- ### Create and Populate MSExperiment with MSSpectra Source: https://pyopenms.readthedocs.io/en/latest/user_guide/ms_data.html Demonstrates the creation of an MSExperiment object and populating it with multiple MSSpectrum instances, each containing several peaks. Useful for setting up simulated LC-MS/MS data. ```python exp = oms.MSExperiment() for i in range(6): spectrum = oms.MSSpectrum() spectrum.setRT(i) spectrum.setMSLevel(1) for mz in range(500, 900, 100): peak = oms.Peak1D() peak.setMZ(mz + i) peak.setIntensity(100 - 25 * abs(i - 2.5)) spectrum.push_back(peak) exp.addSpectrum(spectrum) ``` -------------------------------- ### Get a memory view of IntegerDataArray data Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.IntegerDataArray.html Use get_data_mv() to get a memory view of the integer data. This is more memory efficient but unsafe if the original object is not guaranteed to persist. Use get_data() for safe access. ```python ida = pyopenms.IntegerDataArray() ida.push_back(1) ida.push_back(2) data = ida.get_data_mv() # Memory view - changes affect original ``` -------------------------------- ### Get a memory view of FloatDataArray data Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.FloatDataArray.html Use get_data_mv() to get a memory view of the float data. This is memory-efficient but unsafe if the original FloatDataArray object is temporary or deleted. Prefer get_data() for safe access. ```python fd = pyopenms.FloatDataArray() fd.push_back(1.0) fd.push_back(2.0) data = fd.get_data_mv() # Memory view - changes affect original ``` -------------------------------- ### MzIdentMLFile.startProgress() Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.MzIdentMLFile.html Initializes and starts the progress display for a given operation. ```APIDOC ## MzIdentMLFile.startProgress() ### Description Starts the progress display. This method initializes the progress tracking with a specified range and an optional label. ### Method `startProgress(self, begin: int, end: int, label: bytes | str | String) -> None` ### Parameters #### Path Parameters * **begin** (int) - The starting value of the progress range. * **end** (int) - The ending value of the progress range. * **label** (bytes | str | String) - An optional label to describe the progress operation. ``` -------------------------------- ### TransitionPQPFile.convertTargetedExperimentToPQP Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.TransitionPQPFile.html Writes a targeted experiment structure into a PQP file. ```APIDOC ## TransitionPQPFile.convertTargetedExperimentToPQP ### Description Write out a targeted experiment (TraML structure) into a PQP file. ### Parameters * **filename** (bytes) - The output file * **targeted_exp** (TargetedExperiment) - The targeted experiment ``` -------------------------------- ### Get RNase Enzyme Names and Properties Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/digestion.rst.txt Accesses the RNaseDB to retrieve all available RNA cleavage enzyme names and gets the regular expression and three-prime gain properties for a specific enzyme like RNase_T1. ```python db = oms.RNaseDB() names = [] db.getAllNames(names) names # Will print out all available enzymes: # ['RNase_U2', 'RNase_T1', 'RNase_H', 'unspecific cleavage', 'no cleavage', 'RNase_MC1', 'RNase_A', 'cusativin'] e = db.getEnzyme("RNase_T1") e.getRegEx() e.getThreePrimeGain() ``` -------------------------------- ### TMTSixPlexQuantitationMethod.getName() Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.TMTSixPlexQuantitationMethod.html Gets the name of the TMTSixPlexQuantitationMethod. ```APIDOC ## Method: getName ### Description Returns the name of the quantitation method. ### Returns - `bytes | str | String` ``` -------------------------------- ### IMSElement.getName Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.IMSElement.html Gets the name of the element. ```APIDOC ## IMSElement.getName() ### Description Gets the name of the element. ### Returns - `bytes`: The name of the element. ``` -------------------------------- ### OPXLSpectrumProcessingAlgorithms.__init__ Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.OPXLSpectrumProcessingAlgorithms.rst.txt Initializes the OPXLSpectrumProcessingAlgorithms object. ```APIDOC ## OPXLSpectrumProcessingAlgorithms.__init__ ### Description Initializes the OPXLSpectrumProcessingAlgorithms object. ### Method __init__ ### Parameters None ``` -------------------------------- ### FeatureDistance.__init__() Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.FeatureDistance.html Constructs a FeatureDistance object. Can be initialized with maximum intensity and constraint settings, or by copying an existing FeatureDistance object. ```APIDOC ## FeatureDistance.__init__() ### Description Constructs a FeatureDistance object. Can be initialized with maximum intensity and constraint settings, or by copying an existing FeatureDistance object. ### Method __init__ ### Parameters #### Overload 1: - **_max_intensity** (float) - The maximum intensity value. - **_force_constraints** (bool) - Whether to force constraints. #### Overload 2: - **_in_0** (FeatureDistance) - An existing FeatureDistance object to copy. ``` -------------------------------- ### getName Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.FeatureFinderMetaboIdentCompound.html Gets the compound name. ```APIDOC ## getName() Gets the compound name. Return type: str ``` -------------------------------- ### TransitionPQPFile Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.html Cython implementation of TransitionPQPFile for handling PQP transition files. ```APIDOC ## TransitionPQPFile ### Description Cython implementation of _TransitionPQPFile. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### getMass Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.FeatureFinderMetaboIdentCompound.html Gets the compound mass. ```APIDOC ## getMass() Gets the compound mass. Return type: float ``` -------------------------------- ### IsobaricNormalizer.__init__ Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.IsobaricNormalizer.rst.txt Initializes the IsobaricNormalizer. ```APIDOC ## IsobaricNormalizer.__init__ ### Description Initializes the IsobaricNormalizer. ### Method __init__ ### Parameters None ``` -------------------------------- ### getSubsections Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.MultiplexDeltaMassesGenerator.rst.txt Gets the subsections of the generator. ```APIDOC ## MultiplexDeltaMassesGenerator.getSubsections ### Description Gets the subsections of the generator. ### Method getSubsections ### Parameters None ### Returns list[str] - A list of subsection names. ``` -------------------------------- ### getName Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.MultiplexDeltaMassesGenerator.rst.txt Gets the name of the generator. ```APIDOC ## MultiplexDeltaMassesGenerator.getName ### Description Gets the name of the generator. ### Method getName ### Parameters None ### Returns str - The name of the generator. ``` -------------------------------- ### XTandemXMLFile.__init__() Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.XTandemXMLFile.html Initializes an instance of the XTandemXMLFile class. ```APIDOC ## XTandemXMLFile.__init__() ### Description Initializes an instance of the XTandemXMLFile class. ### Method __init__(self) ### Parameters None ``` -------------------------------- ### getSubsections Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.MasstraceCorrelator.rst.txt Gets the subsections of the MasstraceCorrelator. ```APIDOC ## MasstraceCorrelator.getSubsections ### Description Returns a list of subsections or sub-modules associated with the MasstraceCorrelator. This might be relevant for more complex configurations or hierarchical structures. ### Method getSubsections ### Returns A list of subsection identifiers. ``` -------------------------------- ### TransitionPQPFile.convertPQPToTargetedExperiment Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.TransitionPQPFile.html Reads a PQP file and constructs a targeted experiment structure. ```APIDOC ## TransitionPQPFile.convertPQPToTargetedExperiment ### Description Reads in a PQP file and construct a targeted experiment (TraML structure). ### Parameters * **filename** (bytes) - The input file * **targeted_exp** (TargetedExperiment) - The output targeted experiment * **legacy_traml_id** (bool) - Should legacy TraML IDs be used? ### Overload for LightTargetedExperiment ### Description Reads in a PQP file and construct a targeted experiment (Light transition structure). ### Parameters * **filename** (bytes) - The input file * **targeted_exp** (LightTargetedExperiment) - The output targeted experiment * **legacy_traml_id** (bool) - Should legacy TraML IDs be used? ``` -------------------------------- ### getSubsections Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.MetaboliteSpectralMatching.rst.txt Gets the subsections of the MetaboliteSpectralMatching. ```APIDOC ## MetaboliteSpectralMatching.getSubsections ### Description Gets the subsections of the MetaboliteSpectralMatching. ### Method getSubsections ### Parameters None explicitly documented. ``` -------------------------------- ### SolverParam.__init__ Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.SolverParam.html Initializes SolverParam. Holds the parameters of the LP solver. ```APIDOC ## SolverParam.__init__() ### Description Initializes SolverParam. Holds the parameters of the LP solver. ### Method __init__ ### Parameters None ``` -------------------------------- ### TransitionTSVFile.startProgress Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.TransitionTSVFile.html Starts the progress display with a given range and label. ```APIDOC ## TransitionTSVFile.startProgress() ### Description Starts the progress display. ### Parameters - `_begin` (int) - The start of the progress range. - `_end` (int) - The end of the progress range. - `_label` (bytes | str | String) - The label for the progress display. ``` -------------------------------- ### getParameters Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.MetaboliteSpectralMatching.rst.txt Gets the parameters of the MetaboliteSpectralMatching. ```APIDOC ## MetaboliteSpectralMatching.getParameters ### Description Gets the parameters of the MetaboliteSpectralMatching. ### Method getParameters ### Parameters None explicitly documented. ``` -------------------------------- ### getName Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.MasstraceCorrelator.rst.txt Gets the name of the MasstraceCorrelator. ```APIDOC ## MasstraceCorrelator.getName ### Description Returns the name identifier of the MasstraceCorrelator instance. This can be useful for distinguishing between multiple correlator objects or for logging purposes. ### Method getName ### Returns The name of the MasstraceCorrelator. ``` -------------------------------- ### Basic Protease Digestion with PyOpenMS Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.ProteaseDigestion.html Demonstrates how to set up a protease digestion using PyOpenMS. This includes downloading a FASTA file, initializing the ProteaseDigestion object, setting the enzyme, and performing digestion on a protein sequence. It also shows how to filter the resulting peptides by minimum and maximum length. ```python from pyopenms import * from urllib.request import urlretrieve urlretrieve ("http://www.uniprot.org/uniprot/P02769.fasta", "bsa.fasta") dig = ProteaseDigestion() dig.setEnzyme('Lys-C') bsa_string = "".join([l.strip() for l in open("bsa.fasta").readlines()[1:]]) bsa_oms_string = String(bsa_string) minlen = 6 maxlen = 30 result_digest = [] result_digest_min_max = [] bsa_aaseq = AASequence.fromString(bsa_oms_string) dig.digest(bsa_aaseq, result_digest) dig.digest(bsa_aaseq, result_digest_min_max, minlen, maxlen) print(result_digest[4].toString()) print(len(result_digest)) print(result_digest_min_max[4].toString()) print(len(result_digest_min_max)) ``` -------------------------------- ### MorphologicalFilter.startProgress Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.MorphologicalFilter.html Starts the progress display. ```APIDOC ## MorphologicalFilter.startProgress() ### Description Starts the progress display. ### Method startProgress(self, begin: int, end: int, label: bytes | str | String) ### Parameters #### Path Parameters - **begin** (int) - The starting value for the progress. - **end** (int) - The ending value for the progress. - **label** (bytes | str | String) - The label for the progress display. ``` -------------------------------- ### Sample Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.html Cython implementation of the Sample class. ```APIDOC ## Sample ### Description Cython implementation of the _Sample class. ### Class Signature `Sample` ``` -------------------------------- ### ProtXMLFile.__init__ Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.ProtXMLFile.html Initializes the ProtXMLFile object. ```APIDOC ## ProtXMLFile.__init__() ### Description Initializes the ProtXMLFile object. ### Method __init__(self) ### Parameters None ``` -------------------------------- ### startProgress Source: https://pyopenms.readthedocs.io/en/latest/_sources/apidocs/_autosummary/pyopenms/pyopenms.MetaboliteSpectralMatching.rst.txt Starts the progress indicator. ```APIDOC ## MetaboliteSpectralMatching.startProgress ### Description Starts the progress indicator. ### Method startProgress ### Parameters None explicitly documented. ``` -------------------------------- ### Create and Combine Molecular Formulas Source: https://pyopenms.readthedocs.io/en/latest/user_guide/chemistry.html Demonstrates creating empirical formulas for methanol and water, and combining them to form ethanol. Shows how to print the resulting formula and its elemental composition. ```python 1methanol = oms.EmpiricalFormula("CH3OH") 2water = oms.EmpiricalFormula("H2O") 3ethanol = oms.EmpiricalFormula("CH2") + methanol 4print("Ethanol chemical formula:", ethanol.toString()) 5print("Ethanol composition:", ethanol.getElementalComposition()) 6print("Ethanol has", ethanol.getElementalComposition()[b"H"], "hydrogen atoms") ``` -------------------------------- ### PyOpenMS Methods Starting with 'S' Source: https://pyopenms.readthedocs.io/en/latest/genindex.html This section lists various methods from different PyOpenMS classes that start with the letter 'S'. These methods are typically used for setting specific properties or configurations within the respective classes. ```APIDOC ## setParseUnknownScores() ### Description Sets whether unknown scores should be parsed. ### Method (pyopenms.PepXMLFile method) ## setPartialSequence() ### Description Sets a partial sequence for a given entry. ### Method (pyopenms.SequestInfile method) ## setPathToFile() ### Description Sets the file path for a source file. ### Method (pyopenms.SourceFile method) ## setPeakAnnotations() ### Description Sets the peak annotations for a peptide hit. ### Method (pyopenms.PeptideHit method) ## setPeakGroups() ### Description Sets the peak groups for a deconvolved spectrum. ### Method (pyopenms.DeconvolvedSpectrum method) ## setPeakMassTolerance() ### Description Sets the peak mass tolerance. ### Method (pyopenms.InspectInfile method) (pyopenms.SequestInfile method) ## setPeptideEvidences() ### Description Sets the peptide evidences for a peptide hit. ### Method (pyopenms.PeptideHit method) ## setPeptideGroupLabel() ### Description Sets the label for a peptide group. ### Method (pyopenms.Peptide method) ## setPeptideIdentifications() ### Description Sets the peptide identifications for various feature types. ### Method (pyopenms.AnnotatedSRun method) (pyopenms.BaseFeature method) (pyopenms.ConsensusFeature method) (pyopenms.Feature method) (pyopenms.MRMFeature method) ## setPeptideMassUnit() ### Description Sets the mass unit for peptides. ### Method (pyopenms.SequestInfile method) ## setPeptideRef() ### Description Sets a reference to a peptide. ### Method (pyopenms.IncludeExcludeTarget method) (pyopenms.ReactionMonitoringTransition method) ## setPeptides() ### Description Sets the peptides for a targeted experiment. ### Method (pyopenms.TargetedExperiment method) ## setPercentage() ### Description Sets the percentage value. ### Method (pyopenms.Gradient method) ## setPka() ### Description Sets the pKa value for a residue. ### Method (pyopenms.Residue method) ## setPkb() ### Description Sets the pKb value for a residue. ### Method (pyopenms.Residue method) ## setPkc() ### Description Sets the pKc value for a residue. ### Method (pyopenms.Residue method) ## setPolarity() ### Description Sets the polarity for instrument settings or ion source. ### Method (pyopenms.InstrumentSettings method) (pyopenms.IonSource method) ## setPos() ### Description Sets the position for a peak in 1D or mobility data. ### Method (pyopenms.ChromatogramPeak method) (pyopenms.MobilityPeak1D method) (pyopenms.Peak1D method) (pyopenms.Precursor method) ## setPossibleChargeStates() ### Description Sets the possible charge states for a precursor. ### Method (pyopenms.Precursor method) ## setPrecision() ### Description Sets the precision for IMS weights. ### Method (pyopenms.IMSWeights method) ## setPrecursor() ### Description Sets the precursor information for chromatogram settings or deconvolved spectra. ### Method (pyopenms.ChromatogramSettings method) (pyopenms.DeconvolvedSpectrum method) (pyopenms.MSChromatogram method) ## setPrecursorAdduct() ### Description Sets the adduct for a spectral match. ### Method (pyopenms.SpectralMatch method) ## setPrecursorCVTermList() ### Description Sets the CV term list for a precursor in an include/exclude target. ### Method (pyopenms.IncludeExcludeTarget method) (pyopenms.ReactionMonitoringTransition method) ## setPrecursorErrorType() ### Description Sets the precursor error type for XTandem input. ### Method (pyopenms.XTandemInfile method) ## setPrecursorMassErrorUnit() ### Description Sets the mass error unit for the precursor in XTandem input. ### Method (pyopenms.XTandemInfile method) ## setPrecursorMassTolerance() ### Description Sets the mass tolerance for the precursor. ### Method (pyopenms.InspectInfile method) (pyopenms.SequestInfile method) ## setPrecursorMassToleranceMinus() ### Description Sets the minus precursor mass tolerance for XTandem input. ### Method (pyopenms.XTandemInfile method) ## setPrecursorMassTolerancePlus() ### Description Sets the plus precursor mass tolerance for XTandem input. ### Method (pyopenms.XTandemInfile method) ## setPrecursorMZ() ### Description Sets the m/z value for a precursor in an include/exclude target. ### Method (pyopenms.IncludeExcludeTarget method) (pyopenms.ReactionMonitoringTransition method) ## setPrecursorPeakGroup() ### Description Sets the precursor peak group for a deconvolved spectrum. ### Method (pyopenms.DeconvolvedSpectrum method) ## setPrecursors() ### Description Sets the precursors for a peak spectrum or spectrum settings. ### Method (pyopenms.PeakSpectrum method) (pyopenms.SpectrumSettings method) ## setPrecursorScanNumber() ### Description Sets the precursor scan number for a deconvolved spectrum. ### Method (pyopenms.DeconvolvedSpectrum method) ## setPrediction() ### Description Sets the prediction for an include/exclude target. ### Method (pyopenms.IncludeExcludeTarget method) (pyopenms.ReactionMonitoringTransition method) ## setPressure() ### Description Sets the pressure for an HPLC system. ### Method (pyopenms.HPLC method) ## setPrimaryIdentifier() ### Description Sets the primary identifier for a spectral match. ### Method (pyopenms.SpectralMatch method) ## setPrimaryMSRunPath() ### Description Sets the primary MSRun path for consensus maps, feature maps, or protein identifications. ### Method (pyopenms.ConsensusMap method) (pyopenms.FeatureMap method) (pyopenms.ProteinIdentification method) ## setPrintDuplicateReferences() ### Description Sets whether to print duplicate references in Sequest input. ### Method (pyopenms.SequestInfile method) ## setProcessingActions() ### Description Sets the processing actions for data processing. ### Method (pyopenms.DataProcessing method) ## setProduct() ### Description Sets the product information for chromatogram settings or MS chromatograms. ### Method (pyopenms.ChromatogramSettings method) (pyopenms.MSChromatogram method) ``` -------------------------------- ### Download Example Feature Data Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/feature_linking.rst.txt Downloads necessary featureXML files from a GitHub repository and loads them into pyOpenMS FeatureMap objects. Ensure you have an internet connection. ```python import pyopenms as oms from urllib.request import urlretrieve base_url = ( "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms/src/data/" ) feature_files = [ "BSA1_F1.featureXML", "BSA2_F1.featureXML", "BSA3_F1.featureXML", ] feature_maps = [] # download the feature files and store feature maps in list (feature_maps) for feature_file in feature_files: urlretrieve(base_url + feature_file, feature_file) feature_map = oms.FeatureMap() oms.FeatureXMLFile().load(feature_file, feature_map) feature_maps.append(feature_map) ``` -------------------------------- ### getNeighborhood Source: https://pyopenms.readthedocs.io/en/latest/genindex.html Gets the neighborhood from a KDTreeFeatureMaps object. ```APIDOC ## getNeighborhood() (pyopenms.KDTreeFeatureMaps method) ### Description Gets the neighborhood from a KDTreeFeatureMaps object. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Download Sample Data Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/scoring_spectra_hyperscore.rst.txt Downloads a sample mzML file for use in subsequent examples. Ensure you have internet connectivity. ```python from urllib.request import urlretrieve import pyopenms as oms gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve(gh + "/src/data/SimpleSearchEngine_1.mzML", "searchfile.mzML") ``` -------------------------------- ### getNavigator Source: https://pyopenms.readthedocs.io/en/latest/genindex.html Gets the navigator from a SplineInterpolatedPeaks object. ```APIDOC ## getNavigator() (pyopenms.SplineInterpolatedPeaks method) ### Description Gets the navigator from a SplineInterpolatedPeaks object. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### Initialize Cross-Validation Setup Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/interfacing_ml_libraries.rst.txt Sets up variables and structures for performing k-fold cross-validation, including creating an array of indices and initializing a DataFrame and list to store performance metrics. ```python # Performing k-fold cross validation X = np.arange(10) ss = ShuffleSplit(n_splits=5, test_size=0.25, random_state=0) performance_df = pd.DataFrame() performance_list = [] counter = 0 for train_index, test_index in ss.split(X_train, Y_train): counter += 1 X_train_Kfold, X_test_Kfold = ( ``` -------------------------------- ### TransformationDescription.getModelType() Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.TransformationDescription.html Gets the type of the model that has been fitted. ```APIDOC ## TransformationDescription.getModelType() ### Description Gets the type of the fitted model. ### Returns * `bytes | str | String`: The type of the fitted model. ``` -------------------------------- ### TraceInfo.name Source: https://pyopenms.readthedocs.io/en/latest/apidocs/_autosummary/pyopenms/pyopenms.TraceInfo.html Gets or sets the name of the trace. ```APIDOC ## TraceInfo.name ### Description Gets or sets the name of the trace. ### Attribute name ``` -------------------------------- ### Download and Load mzML File Source: https://pyopenms.readthedocs.io/en/latest/_sources/user_guide/first_steps.rst.txt Downloads a sample mzML file from a GitHub repository and loads its content into an MSExperiment object for inspection. Requires urllib.request and pyOpenMS. ```python from urllib.request import urlretrieve # download small example file gh = "https://raw.githubusercontent.com/OpenMS/OpenMS/develop/doc/pyopenms" urlretrieve(gh + "/src/data/tiny.mzML", "tiny.mzML") exp = oms.MSExperiment() # load example file oms.MzMLFile().load("tiny.mzML", exp) ```