Pyteomics documentation v4.4.0dev2

usi - Universal Spectrum Identifier (USI) parser and minimal PROXI client

«  mztab - mzTab file reader   ::   Contents   ::   featurexml - reader for featureXML files  »

usi - Universal Spectrum Identifier (USI) parser and minimal PROXI client

Summary

USI is a standardized method of referencing a specific spectrum in a dataset, possibly attached to an interpretation. This module includes a USI type which can represent these constructs, parse() them and reconstruct them.

One use-case for USI is to request spectrum information from a PROXI service host. PROXI services are available from several of the major national proteomics data hosts, including MassIVE, PeptideAtlas, PRIDE, and jPOST.

Data access

USI for representing Universal Spectrum Identifiers. Call USI.parse() to parse a USI string.

proxi() to request a USI from a remote service. Provides access to the PeptideAtlas, MassIVE, PRIDE and jPOST hosts.

class pyteomics.usi.JPOSTBackend(**kwargs)[source]

Bases: pyteomics.usi._PROXIBackend

__init__(**kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

get(usi)

Retrieve a USI from the host PROXI service over the network.

Parameters:usi (str or USI) – The universal spectrum identifier to retrieve.
Returns:The spectrum as represented by the requested PROXI host.
Return type:dict
class pyteomics.usi.MassIVEBackend(**kwargs)[source]

Bases: pyteomics.usi._PROXIBackend

__init__(**kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

get(usi)

Retrieve a USI from the host PROXI service over the network.

Parameters:usi (str or USI) – The universal spectrum identifier to retrieve.
Returns:The spectrum as represented by the requested PROXI host.
Return type:dict
class pyteomics.usi.PRIDEBackend(**kwargs)[source]

Bases: pyteomics.usi._PROXIBackend

__init__(**kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

get(usi)

Retrieve a USI from the host PROXI service over the network.

Parameters:usi (str or USI) – The universal spectrum identifier to retrieve.
Returns:The spectrum as represented by the requested PROXI host.
Return type:dict
class pyteomics.usi.PeptideAtlasBackend(**kwargs)[source]

Bases: pyteomics.usi._PROXIBackend

__init__(**kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

get(usi)

Retrieve a USI from the host PROXI service over the network.

Parameters:usi (str or USI) – The universal spectrum identifier to retrieve.
Returns:The spectrum as represented by the requested PROXI host.
Return type:dict
class pyteomics.usi.USI[source]

Bases: pyteomics.usi.USI

Represent a Universal Spectrum Identifier (USI).

Note

This implementation will capture the interpretation component but will not interpret it at this time.

protocol

The protocol to use to access the data (usually mzspec)

Type:str
dataset

The name or accession number for the dataset the spectrum residues in

Type:str
datafile

The basename of the data file from dataset to retrieve the spectrum from

Type:str
scan_identifier_type

The format of the scan identifier, one of (scan, index, nativeId, trace)

Type:str
scan_identifier

A usually numerical but potentially comma separated value encoded as a string to uniquely identify the spectrum to be recovered from datafile in dataset.

Type:str
interpretation

The trailing material of the USI, such as the ProForma peptide sequence and charge

Type:str
__init__

Initialize self. See help(type(self)) for accurate signature.

count()

Return number of occurrences of value.

datafile

Alias for field number 2

dataset

Alias for field number 1

index()

Return first index of value.

Raises ValueError if the value is not present.

interpretation

Alias for field number 5

classmethod parse(usi)[source]

Parse a USI string into a USI object.

Parameters:usi (str) – The USI string to parse
Returns:
Return type:USI
protocol

Alias for field number 0

scan_identifier

Alias for field number 4

scan_identifier_type

Alias for field number 3

pyteomics.usi.proxi(usi, backend='peptide_atlas', **kwargs)[source]

Retrieve a USI from a PROXI <http://www.psidev.info/proxi>.

Parameters:
  • usi (str or USI) – The universal spectrum identifier to request.
  • backend (str or Callable) – Either the name of a PROXI host (peptide_atlas, massive, pride, or jpost), or a callable object (which _PROXIBackend instances are) which will be used to resolve the USI.
  • **kwargs – extra arguments passed when constructing the backend by name.
Returns:

The spectrum as represented by the requested PROXI host.

Return type:

dict

«  mztab - mzTab file reader   ::   Contents   ::   featurexml - reader for featureXML files  »