def getScans(self, modifications=True, fdr=True):
if fdr:<EOL><INDENT>sql = "<STR_LIT>" % (self.clvl, self.srank)<EOL>try:<EOL><INDENT>self.cur.execute(sql)<EOL><DEDENT>except sqlite3.OperationalError:<EOL><INDENT>sql = "<STR_LIT>" % self.clvl<EOL>self.cur.execute(sql)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>sql = "<STR_LIT>"<EOL>self.cur.execute(sql)<EOL><DEDENT>while True:<EOL><INDENT>results = self.cur.fetchmany(<NUM_LIT:1000>)<EOL>if not results:<EOL><INDENT>break<EOL><DEDENT>for tup in results:<EOL><INDENT>scan = self.parseFullScan(tup, modifications=modifications)<EOL>scan.spectrumId = tup[<NUM_LIT:3>]<EOL>yield scan<EOL><DEDENT><DEDENT>yield None<EOL>
get a random scan