comparison pima_report.py @ 7:9213359bfda8 draft

Uploaded
author greg
date Thu, 09 Mar 2023 18:00:40 +0000
parents b13d4c14caaa
children 66c7cdf7e93f
comparison
equal deleted inserted replaced
6:b13d4c14caaa 7:9213359bfda8
430 self.kraken_fracs['Fraction'] = (self.kraken_fracs['Fraction'] / 100).round(4) 430 self.kraken_fracs['Fraction'] = (self.kraken_fracs['Fraction'] / 100).round(4)
431 self.kraken_fracs.sort_values(by='Fraction', inplace=True, ascending=False) 431 self.kraken_fracs.sort_values(by='Fraction', inplace=True, ascending=False)
432 self.kraken_fracs['Taxa'] = self.kraken_fracs['Taxa'].str.lstrip() 432 self.kraken_fracs['Taxa'] = self.kraken_fracs['Taxa'].str.lstrip()
433 self.doc.new_line() 433 self.doc.new_line()
434 self.doc.new_header(2, 'Contamination check') 434 self.doc.new_header(2, 'Contamination check')
435 for kraken_fracs in self.kraken_fracs.iteritems(): 435 for read_type, kraken_fracs in self.kraken_fracs.iteritems():
436 self.doc.new_line(self.read_type + ' classifications') 436 self.doc.new_line(self.read_type + ' classifications')
437 self.doc.new_line() 437 self.doc.new_line()
438 Table_List = ["Percent of Reads", "Reads", "Level", "Label"] 438 Table_List = ["Percent of Reads", "Reads", "Level", "Label"]
439 for index, row in kraken_fracs.iterrows(): 439 for index, row in kraken_fracs.iterrows():
440 Table_List = Table_List + row.tolist() 440 Table_List = Table_List + row.tolist()