Mercurial > repos > greg > pima_report
comparison pima_report.py @ 25:4986a7fb2145 draft
Uploaded
author | greg |
---|---|
date | Thu, 20 Apr 2023 18:47:01 +0000 |
parents | 803e5965ed20 |
children | 46edd7435555 |
comparison
equal
deleted
inserted
replaced
24:803e5965ed20 | 25:4986a7fb2145 |
---|---|
540 for circos_file in self.circos_files: | 540 for circos_file in self.circos_files: |
541 contig = os.path.basename(circos_file) | 541 contig = os.path.basename(circos_file) |
542 contig_title = 'Alignment to %s' % contig | 542 contig_title = 'Alignment to %s' % contig |
543 self.doc.new_line() | 543 self.doc.new_line() |
544 self.doc.new_header(level=3, title=contig_title) | 544 self.doc.new_header(level=3, title=contig_title) |
545 self.doc.new_line('Blue indicates aligned sequences (to the reference) and yellow indicates missing sequences') | 545 self.doc.new_line('Blue color indicates query sequences aligned to the reference sequence, which is shown in yellow') |
546 self.doc.new_line(self.doc.new_inline_image(text='contig_title', path=os.path.abspath(circos_file))) | 546 self.doc.new_line(self.doc.new_inline_image(text='contig_title', path=os.path.abspath(circos_file))) |
547 self.doc.new_line('<div style="page-break-after: always;"></div>') | 547 self.doc.new_line('<div style="page-break-after: always;"></div>') |
548 self.doc.new_line() | 548 self.doc.new_line() |
549 if self.dbkey == 'ref_genome': | 549 if self.dbkey == 'ref_genome': |
550 headers = ["* Chromosome - NC_007530.2 Bacillus anthracis str. 'Ames Ancestor', complete sequence", | 550 headers = ["* Chromosome - NC_007530.2 Bacillus anthracis str. 'Ames Ancestor', complete sequence", |
712 if amr_deletions.shape[0] > 0: | 712 if amr_deletions.shape[0] > 0: |
713 amr_deletions.columns = ['contig', 'start', 'stop', 'name', 'type', 'drug', 'note'] | 713 amr_deletions.columns = ['contig', 'start', 'stop', 'name', 'type', 'drug', 'note'] |
714 amr_deletions = amr_deletions.loc[amr_deletions['type'].isin(['large-deletion', 'any']), :] | 714 amr_deletions = amr_deletions.loc[amr_deletions['type'].isin(['large-deletion', 'any']), :] |
715 self.doc.new_line() | 715 self.doc.new_line() |
716 self.doc.new_header(level=2, title=self.large_indel_title) | 716 self.doc.new_header(level=2, title=self.large_indel_title) |
717 self.doc.new_line('This section is informative only when your idolates were identified as *Bacillus anthracis* strains') | 717 self.doc.new_line('This section is informative only when your isolates were identified as *Bacillus anthracis* strains') |
718 for genome in ['Reference insertions', 'Query insertions']: | 718 for genome in ['Reference insertions', 'Query insertions']: |
719 genome_indels = large_indels[genome].copy() | 719 genome_indels = large_indels[genome].copy() |
720 self.doc.new_line() | 720 self.doc.new_line() |
721 self.doc.new_header(level=3, title=genome) | 721 self.doc.new_header(level=3, title=genome) |
722 if (genome_indels.shape[0] == 0): | 722 if (genome_indels.shape[0] == 0): |