Skip to content

Commit

Permalink
metaquast: cosmetic-feature: --no-krona option added (workaround for #…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeigurevich committed Sep 8, 2023
1 parent 2bd5060 commit 2723558
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
9 changes: 7 additions & 2 deletions manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,12 @@ <h3>2.3 Command line options</h3>
<div class='option'>
<code><a name='no_plots'></a><b>--no-plots</b></code>
</div>
Do not draw plots.
Do not draw static plots (in the PDF format by default).

<div class='option'>
<code><a name='no_krona'></a><b>--no-krona</b></code>
</div>
Do not draw <a href="#krona_charts">Krona pie charts</a>. Note: these plots are created <b>only</b> in the MetaQUAST <i>de novo</i> evaluation mode (without reference genomes).

<div class='option'>
<code><b>--no-html</b></code>
Expand Down Expand Up @@ -1393,7 +1398,7 @@ <h3>3.3 MetaQUAST output</h3>
</div>
<p>Note that values for some metrics like # contigs may not sum up, because one contig may be aligned to multiple reference genomes.
You may read an extended discussion and explanation of this effect in the case of # misassemblies in the <a href="https://github.com/ablab/quast/issues/158">corresponding GitHub issue</a>.</p>
<p><span class='metric-name'>Krona charts</span><br>
<p><a name='krona_charts'></a><span class='metric-name'>Krona charts</span><br>
Krona pie charts show assemblies and dataset taxonomic profiles. Relative species abundance is calculated based on the <a href="#total_length">total aligned length</a> of contigs aligned to corresponding reference genome.
Charts are created for each assembly and one additional chart is created for all assemblies altogether.<br>
Note: these plots are created <b>only</b> in <i>de novo</i> evaluation mode (MetaQUAST without reference genomes).</p>
Expand Down
9 changes: 5 additions & 4 deletions quast_libs/html_saver/html_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,12 @@ def create_meta_report(results_dirpath, json_texts):
if not os.path.isfile(html_fpath):
init(html_fpath, is_meta=True)

from quast_libs import search_references_meta
taxons_for_krona = search_references_meta.taxons_for_krona
meta_log = get_logger(qconfig.LOGGER_META_NAME)
if taxons_for_krona:
create_krona_charts(taxons_for_krona, meta_log, results_dirpath, json_texts)
if qconfig.draw_krona:
from quast_libs import search_references_meta
taxons_for_krona = search_references_meta.taxons_for_krona
if taxons_for_krona:
create_krona_charts(taxons_for_krona, meta_log, results_dirpath, json_texts)

# reading html template file
with open(html_fpath) as f_html:
Expand Down
6 changes: 5 additions & 1 deletion quast_libs/options_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ def parse_options(logger, quast_args):
action='callback',
callback=set_multiple_variables,
callback_kwargs={'store_true_values': ['no_gc', 'no_sv', 'no_read_stats'],
'store_false_values': ['show_snps', 'draw_plots', 'html_report', 'create_icarus_html', 'analyze_gaps']},
'store_false_values': ['show_snps', 'draw_plots', 'draw_krona', 'html_report', 'create_icarus_html', 'analyze_gaps']},
default=False)
),
# (['--no-gzip'], dict(
Expand All @@ -679,6 +679,10 @@ def parse_options(logger, quast_args):
dest='draw_plots',
action='store_false')
),
(['--no-krona'], dict(
dest='draw_krona',
action='store_false')
),
(['--no-html'], dict(
dest='html_report',
action='callback',
Expand Down
5 changes: 4 additions & 1 deletion quast_libs/qconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
split_scaffolds = False
draw_plots = True
draw_circos = False
draw_krona = True
html_report = True
save_json = False
metagenemark = False
Expand Down Expand Up @@ -516,7 +517,9 @@ def usage(show_hidden=False, mode=None, short=True, stream=sys.stdout):
stream.write("\n")
stream.write("Speedup options:\n")
stream.write(" --no-check Do not check and correct input fasta files. Use at your own risk (see manual)\n")
stream.write(" --no-plots Do not draw plots\n")
stream.write(" --no-plots Do not draw static plots\n")
if mode == 'meta':
stream.write(" --no-krona Do not draw Krona pie charts (in the without references mode)\n")
stream.write(" --no-html Do not build html reports and Icarus viewers\n")
stream.write(" --no-icarus Do not build Icarus viewers\n")
stream.write(" --no-snps Do not report SNPs (may significantly reduce memory consumption on large genomes)\n")
Expand Down

0 comments on commit 2723558

Please sign in to comment.