Mercurial > repos > greg > pima_report
comparison pima_report.py @ 11:4a7c31f28197 draft
Uploaded
| author | greg |
|---|---|
| date | Thu, 09 Mar 2023 18:34:01 +0000 |
| parents | 7c4077c9b3ad |
| children | 99613333fd1f |
comparison
equal
deleted
inserted
replaced
| 10:7c4077c9b3ad | 11:4a7c31f28197 |
|---|---|
| 436 Table_List = Table_List + row.tolist() | 436 Table_List = Table_List + row.tolist() |
| 437 row_count = int(len(Table_List) / 4) | 437 row_count = int(len(Table_List) / 4) |
| 438 self.doc.new_table(columns=4, rows=row_count, text=Table_List, text_align='left') | 438 self.doc.new_table(columns=4, rows=row_count, text=Table_List, text_align='left') |
| 439 if self.contamination_methods_title not in self.methods: | 439 if self.contamination_methods_title not in self.methods: |
| 440 self.methods[self.contamination_methods_title] = '' | 440 self.methods[self.contamination_methods_title] = '' |
| 441 method = 'Kraken2 version %s was used to assign the raw reads into taxa.' % self.kraken2_version | 441 method = '%s was used to assign the raw reads into taxa.' % self.kraken2_version.rstrip('report') |
| 442 self.methods[self.contamination_methods_title] = self.methods[self.contamination_methods_title].append(pandas.Series(method)) | 442 self.methods[self.contamination_methods_title] = self.methods[self.contamination_methods_title].append(pandas.Series(method)) |
| 443 | 443 |
| 444 def add_alignment(self): | 444 def add_alignment(self): |
| 445 self.ofh.write("\nXXXXXX In add_alignment\n\n") | 445 self.ofh.write("\nXXXXXX In add_alignment\n\n") |
| 446 # TODO: implement the draw_circos function for this. | 446 # TODO: implement the draw_circos function for this. |
| 521 self.ofh.write("row_count: %s\n" % str(row_count)) | 521 self.ofh.write("row_count: %s\n" % str(row_count)) |
| 522 self.doc.new_line() | 522 self.doc.new_line() |
| 523 self.ofh.write("Before new_table, len(Table_List):: %s\n" % str(len(Table_List))) | 523 self.ofh.write("Before new_table, len(Table_List):: %s\n" % str(len(Table_List))) |
| 524 self.doc.new_table(columns=5, rows=row_count, text=Table_List, text_align='left') | 524 self.doc.new_table(columns=5, rows=row_count, text=Table_List, text_align='left') |
| 525 if self.blastn_version is not None: | 525 if self.blastn_version is not None: |
| 526 blastn_version = 'The genome assembly was queried for features using blastn version %s.' % self.blastn_version | 526 blastn_version = 'The genome assembly was queried for features using %s.' % self.blastn_version |
| 527 bedtools_version = 'Feature hits were clustered using bedtools and the highest scoring hit for each cluster was reported.' | 527 bedtools_version = 'Feature hits were clustered using bedtools and the highest scoring hit for each cluster was reported.' |
| 528 method = '%s %s' % (blastn_version, bedtools_version) | 528 method = '%s %s' % (blastn_version, bedtools_version) |
| 529 self.methods[self.feature_methods_title] = self.methods[self.feature_methods_title].append(pandas.Series(method)) | 529 self.methods[self.feature_methods_title] = self.methods[self.feature_methods_title].append(pandas.Series(method)) |
| 530 | 530 |
| 531 def add_feature_plots(self): | 531 def add_feature_plots(self): |
| 742 self.add_illumina_library_information() | 742 self.add_illumina_library_information() |
| 743 self.add_contig_info() | 743 self.add_contig_info() |
| 744 self.evaluate_assembly() | 744 self.evaluate_assembly() |
| 745 self.add_assembly_information() | 745 self.add_assembly_information() |
| 746 if self.flye_assembly_info_file is not None: | 746 if self.flye_assembly_info_file is not None: |
| 747 method = 'ONT reads were assembled using %s' % self.flye_version | 747 method = 'ONT reads were assembled using %s' % self.flye_version.rstrip('assembly info') |
| 748 self.methods[self.assembly_methods_title] = self.methods[self.assembly_methods_title].append(pandas.Series(method)) | 748 self.methods[self.assembly_methods_title] = self.methods[self.assembly_methods_title].append(pandas.Series(method)) |
| 749 # Pull in the assembly summary and look at the coverage. | 749 # Pull in the assembly summary and look at the coverage. |
| 750 assembly_info = pandas.read_csv(self.flye_assembly_info_file, header=0, index_col=0, sep='\t') | 750 assembly_info = pandas.read_csv(self.flye_assembly_info_file, header=0, index_col=0, sep='\t') |
| 751 # Look for non-circular contigs. | 751 # Look for non-circular contigs. |
| 752 open_contigs = assembly_info.loc[assembly_info['circ.'] == 'N', :] | 752 open_contigs = assembly_info.loc[assembly_info['circ.'] == 'N', :] |
