INNER CODE UNIT · Python

__getitem__

pymzml/pymzML · pymzml/run.py:190

    def __getitem__(self, identifier):
        """
        Access spectrum or chromatogram with native id 'identifier'.

        Arguments:
            identifier (str or int): last number in the id tag of the spectrum
                element or a chromatogram identifier like 'TIC'

        Returns:
            spectrum (Spectrum or Chromatogram): spectrum/chromatogram object
            with native id 'identifier'
        """
        try:
            if isinstance(identifier, int) and identifier > self.get_spectrum_count():
                raise Exception("Requested identifier is out of range")
        except:
            pass

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…