Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: evaluate-busco brakes when input mags > ~1,300 #142

Merged
merged 14 commits into from
Mar 6, 2024
74 changes: 50 additions & 24 deletions q2_moshpit/assets/busco/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@

<div class="row row-cols-1 row-cols-md-2 g-4">
<div class="col-lg-12">
<div class="card mt-3 h-100">
<div class="card mt-3 h-10">
<h5 class="card-header">Plot description</h5>
<div class="card-body">
<p>
The left plot shows the results generated by BUSCO for <b>all bins</b> and
<b> samples</b>. "BUSCO attempts to provide a quantitative assessment
of the completeness in terms of the expected gene content of a genome
assembly, transcriptome, or annotated gene set. The results are
simplified into categories of Complete and single-copy, Complete and
duplicated, Fragmented, or Missing BUSCOs. BUSCO completeness results
simplified into categories of complete and single-copy, complete and
duplicated, fragmented, or missing BUSCOs. BUSCO completeness results
make sense only in the context of the biology of your organism". Visit the
<a
href="https://busco.ezlab.org/busco_userguide.html#interpreting-the-results"
Expand All @@ -51,10 +51,6 @@ <h5 class="card-header">Plot description</h5>
>
for more information.
</p>
<p>
Hoover over the graph to obtain information about the lineage dataset
used for each bin, and the number of genes in each BUSCO category.
</p>
<p>
The right barplot shows assembly statistics calculated for each bin using BBTools.
Specifically, it displays the statistics computed by the <b>stats.sh</b> procedure from BBMap.
Expand All @@ -66,10 +62,6 @@ <h5 class="card-header">Plot description</h5>
</a>
of stats.sh for more information.
</p>
<p>
Choose the assembly statistic that you wish to display from the drop-down manu below the graphs.
Hoover over the graph to show the numerical values that each bar represents.
</p>

<div style="align-items: center; display: flex">
<span class="header-inline">Downloads</span>
Expand All @@ -92,14 +84,46 @@ <h5 class="card-header">Plot description</h5>
</div>
</div>
</div>

<div class="card mt-3 h-10">
<h5 class="card-header">Plot Controls</h5>
<div class="card-body">
<ul>
<li>
By default only the first 10 samples are displayed. Use a regular expression (regex) in the search box to display
an arbitrary subset of the samples.
</li>
<ul>
<li>
No more than ~1,300 MAGs can be displayed simultaneously. If you exceed this limit an error image will be displayed.
</li>
<li>
If you have 14 samples named "sample_i" where "i" is a number from 1-14, and you whish to visualize only
"sample_1" and "sample_14" your regex expression could look like this: ^sample_1$|^sample_14$
</li>
<li>
You can test your regex'es with this <a href="https://regex101.com/">Regular Expression Tester</a>.
</li>
</ul>
<li>
Choose the assembly statistic that you wish to display from the drop-down menu below.
</li>
<li>
Hover over the graph to obtain information about the lineage dataset
used for each bin, and the number of genes in each BUSCO category.
</li>
</ul>

<div id="plot-controls"></div>
</div>
</div>
</div>
</div>

<div class="row">
{% if vega_plots_overview is defined %}
<div class="col-lg-6">
<div id="plot"></div>
<div id="plot-controls"></div>
</div>
{% else %}
<p>Unable to generate the completeness plot</p>
Expand All @@ -118,19 +142,21 @@ <h5 class="card-header">Plot description</h5>

const spec = JSON.parse(document.getElementById("spec").innerHTML);

vegaEmbed("#plot", spec)
.then(function (result) {
result.view.logLevel(vega.Warn);
window.v = result.view;
vegaEmbed("#plot", spec).then(
function (result) {
result.view.logLevel(vega.Warn);
window.v = result.view;

// move the sliders to the right
const controls = document.getElementsByClassName("vega-bindings");
document.getElementById("plot-controls").appendChild(controls[0]);
})
.catch(function (error) {
// From 'js-error-handler.html'
handleErrors([error], $("#plot"));
});
// move the sliders to the right
const controls = document.getElementsByClassName("vega-bindings");
document.getElementById("plot-controls").appendChild(controls[0]);
}
).catch(
function (error) {
// From 'js-error-handler.html'
handleErrors([error], $("#plot"));
}
);
});
</script>

Expand Down
Loading
Loading