def __init__(self, filename, full=False, store=True, ms_filter=False, start=<NUM_LIT:0>):
super(MZMLIterator, self).__init__(filename)<EOL>cetree.register_namespace('<STR_LIT>', '<STR_LIT>')<EOL>self.scans = {}<EOL>self.store = store<EOL>self.full = full<EOL>self.ms_filter = ms_filter<EOL>self.start = start<EOL>self.filename.seek(<NUM_LIT:0>)<EOL>self.spectra = cetree.parse(self.filename).iter() if self.gzip else cetree.iterparse(self.filename)<EOL>self.ra = {}<EOL>duplicate_values = set([])<EOL>invalid_index = False<EOL>for event, element in self.spectra:<EOL><INDENT>if element.tag.endswith('<STR_LIT>'):<EOL><INDENT>self.ra[self._get_scan_from_string(element.get('<STR_LIT>'))] = element.text<EOL>if element.text in duplicate_values:<EOL><INDENT>invalid_index = True<EOL>break<EOL><DEDENT>duplicate_values.add(element.text)<EOL><DEDENT>element.clear()<EOL><DEDENT>if not self.ra or invalid_index:<EOL><INDENT>if invalid_index:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>self.ra = self.build_index(self.filename)<EOL><DEDENT>del self.spectra<EOL>self.filename.seek(<NUM_LIT:0>)<EOL>self.spectra = cetree.parse(self.filename).iter() if self.gzip else cetree.iterparse(self.filename)<EOL>self.scans = {}<EOL>self.startIter = True<EOL>self.db = None<EOL>
An iterator over the mzML file format.
         I just need a parser right now so the specs might not be exactly correct

        The returned items are ScanObjects