psims

Components of mzML

psims uses Python classes for XML elements in mzML. A few have custom logic that will trigger automatically, while others have helper methods that may be useful if you are constructing these objects directly.

class psims.mzml.components.Activation(params=None, context={}, **kwargs)[source]
class psims.mzml.components.Analyzer(order, params=None, context={}, **kwargs)[source]
class psims.mzml.components.Binary(encoded_array, context={})[source]
class psims.mzml.components.BinaryDataArray(binary, encoded_length, data_processing_reference=None, array_length=None, params=None, context={}, **kwargs)[source]

XSD Description

The structure into which encoded binary data goes. Byte ordering is always little endian (Intel style). Computers using a different endian style must convert to/from little endian when writing/reading mzML

class psims.mzml.components.BinaryDataArrayList(members, context={})[source]

XSD Description

List of binary data arrays.

class psims.mzml.components.CVList(cv_list=None, context={})[source]

XSD Description

Container for one or more controlled vocabulary definitions.

class psims.mzml.components.Chromatogram(index, binary_data_list=None, precursor=None, product=None, default_array_length=None, data_processing_reference=None, id=None, params=None, context={})[source]

XSD Description

A single chromatogram.

class psims.mzml.components.ComponentList(members, context={})[source]
classmethod build(members, context={}, type_key='type')[source]

Compile an ordered set of Source, Analyzer, and Detector-like objects into a sorted ComponentList instance.

Parameters
  • members (list) – A list of Source, Analyzer, and Detector-like objects.

  • context (DocumentContext) – The context of the containing document.

  • type_key (str) – The key to use to read the component type.

Returns

Return type

ComponentList

XSD Description

List with the different components used in the mass spectrometer. At least one source, one mass analyzer and one detector need to be specified.

class psims.mzml.components.Contact(params, context={}, **kwargs)[source]
class psims.mzml.components.DataProcessing(processing_methods=None, id=None, context={})[source]

XSD Description

Description of the way in which a particular software was used.

class psims.mzml.components.DataProcessingList(members, context={})[source]

XSD Description

List and descriptions of data processing applied to this data.

class psims.mzml.components.Detector(order, params=None, context={}, **kwargs)[source]
class psims.mzml.components.FileContent(params=None, context={}, **kwargs)[source]
class psims.mzml.components.FileDescription(content, source_files, contacts=None, context={})[source]

XSD Description

Information pertaining to the entire mzML file (i.e. not specific to any part of the data set) is stored here.

class psims.mzml.components.IndexedMzML(**attrs)[source]
class psims.mzml.components.InstrumentConfiguration(id, component_list=None, params=None, software_reference=None, context={}, **kwargs)[source]

XSD Description

Description of a particular hardware configuration of a mass spectrometer. Each configuration must have one (and only one) of the three different components used for an analysis. For hybrid instruments, such as an LTQ-FT, there must be one configuration for each permutation of the components that is used in the document. For software configuration, use a ReferenceableParamGroup element.

class psims.mzml.components.InstrumentConfigurationList(members, context={})[source]

XSD Description

List and descriptions of instrument configurations. At least one instrument configuration must be specified, even if it is only to specify that the instrument is unknown. In that case, the "instrument model" term is used to indicate the unknown instrument in the instrumentConfiguration.

class psims.mzml.components.IsolationWindow(lower=None, target=None, upper=None, params=None, context={}, **kwargs)[source]
class psims.mzml.components.MzML(**attrs)[source]

XSD Description

This is the root element for the Proteomics Standards Initiative (PSI) mzML schema, which is intended to capture the use of a mass spectrometer, the data generated, and the initial processing of that data (to the level of the peak list).

class psims.mzml.components.Organization(name='name', id='ORG_DOC_OWNER', context={})[source]

XSD Description

Organizations are entities like companies, universities, government agencies. Any additional information such as the address, email etc. should be supplied either as CV parameters or as user parameters.

class psims.mzml.components.Person(first_name='first_name', last_name='last_name', id='PERSON_DOC_OWNER', affiliation='ORG_DOC_OWNER', context={})[source]

XSD Description

A person's name and contact details. Any additional information such as the address, contact email etc. should be supplied using CV parameters or user parameters.

class psims.mzml.components.Precursor(selected_ion_list, activation=None, isolation_window=None, spectrum_reference=None, source_file_reference=None, external_spectrum_id=None, context={})[source]

XSD Description

The method of precursor ion selection and activation

class psims.mzml.components.PrecursorList(members, context={})[source]

XSD Description

List and descriptions of precursor isolations to the spectrum currently being described, ordered.

class psims.mzml.components.ProcessingMethod(order, software_reference, params=None, context={}, **kwargs)[source]

XSD Description

This attributes allows a series of consecutive steps to be placed in the correct order.

class psims.mzml.components.Product(isolation_window=None, spectrum_reference=None, context={})[source]

XSD Description

The method of product ion selection and activation in a precursor ion scan

class psims.mzml.components.ProductList(members, context={})[source]

XSD Description

List and descriptions of product isolations to the spectrum currently being described, ordered.

class psims.mzml.components.ReferenceableParamGroup(params=None, id=None, context={}, **kwargs)[source]

XSD Description

A collection of CVParam and UserParam elements that can be referenced from elsewhere in this mzML document by using the 'paramGroupRef' element in that location to reference the 'id' attribute value of this element.

class psims.mzml.components.ReferenceableParamGroupList(members, context)[source]

XSD Description

Container for a list of referenceableParamGroups

class psims.mzml.components.Run(default_instrument_configuration_reference, spectrum_list=None, chromatogram_list=None, id=None, default_source_file_reference=None, sample_reference=None, start_time_stamp=None, params=None, context={})[source]

XSD Description

A run in mzML should correspond to a single, consecutive and coherent set of scans on an instrument.

class psims.mzml.components.Sample(name, params=None, id=None, context={}, **kwargs)[source]

XSD Description

Expansible description of the sample used to generate the dataset, named in sampleName.

class psims.mzml.components.SampleList(members, context={})[source]

XSD Description

List and descriptions of samples.

class psims.mzml.components.Scan(scan_window_list=None, instrument_configuration_ref=None, source_file_reference=None, spectrum_reference=None, external_spectrum_id=None, params=None, context={}, **kwargs)[source]

XSD Description

Scan or acquisition from original raw file used to create this peak list, as specified in sourceFile.

class psims.mzml.components.ScanList(members, params=None, context={})[source]

XSD Description

List and descriptions of scans.

class psims.mzml.components.ScanSettings(id, source_file_references=None, target_list=None, params=None, context={}, **kwargs)[source]

XSD Description

Description of the acquisition settings of the instrument prior to the start of the run.

class psims.mzml.components.ScanSettingsList(members, context={})[source]

XSD Description

List with the descriptions of the acquisition settings applied prior to the start of data acquisition.

class psims.mzml.components.ScanWindow(lower, upper, params=None, context={})[source]
class psims.mzml.components.ScanWindowList(members, context={})[source]

XSD Description

A range of m/z values over which the instrument scans and acquires a spectrum.

class psims.mzml.components.SelectedIon(selected_ion_mz, intensity=None, charge=None, params=None, intensity_unit='number of detector counts', context={})[source]
class psims.mzml.components.SelectedIonList(members, context={})[source]

XSD Description

The list of selected precursor ions.

class psims.mzml.components.Software(id=None, version='0.0', params=None, context={}, **kwargs)[source]

XSD Description

Software information.

class psims.mzml.components.SoftwareList(members, context={})[source]

XSD Description

List and descriptions of software used to acquire and/or process the data in this mzML file.

class psims.mzml.components.Source(order, params=None, context={}, **kwargs)[source]
class psims.mzml.components.SourceFile(location=None, name=None, id=None, params=None, context={}, **kwargs)[source]
checksum(digest='sha-1')[source]

Compute a file integrity checksum of a file if it is local.

Returns

checksum_param – A CV term denoting the hashing function used and the checksum hex-string produced.

Return type

CVParam

XSD Description

Description of the source file, including location and type.

class psims.mzml.components.SourceFileList(members, context)[source]

XSD Description

List and descriptions of the source files this mzML document was generated or derived from

class psims.mzml.components.SourceFileRef(source_file_id, context={})[source]

XSD Description

This attribute must reference the 'id' of the appropriate sourceFile.

class psims.mzml.components.Spectrum(index, binary_data_list=None, scan_list=None, precursor_list=None, product_list=None, default_array_length=None, source_file_reference=None, data_processing_reference=None, id=None, params=None, context={}, **kwargs)[source]

XSD Description

The structure that captures the generation of a peak list (including the underlying acquisitions). Also describes some of the parameters for the mass spectrometer for a given acquisition (or list of acquisitions).

class psims.mzml.components.SpectrumList(members, default_data_processing_reference, context={})[source]

XSD Description

List and descriptions of spectra.

class psims.mzml.components.Target(params, context={}, **kwargs)[source]
class psims.mzml.components.TargetList(members, context={})[source]

XSD Description

Target list (or 'inclusion list') configured prior to the run.