How to use the pyteomics.auxiliary.OffsetIndex function in pyteomics

To help you get started, we’ve selected a few pyteomics examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mobiusklein / ms_deisotope / ms_deisotope / data_source / mgf.py View on Github external
def _create_parser(self):
        if self._use_index:
            return _MGFParser(self.source_file, read_charges=False,
                              convert_arrays=1, encoding=self.encoding)
        simple_reader = mgf.MGF(
            self.source_file, read_charges=False,
            convert_arrays=1, encoding=self.encoding)
        simple_reader.index = OffsetIndex()
        return simple_reader