Skip to content

Commit

Permalink
#739 - Added text to single and multigene curators
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Aug 13, 2024
1 parent bc06d93 commit e267cd4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions www/dataset_curator.html
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ <h5 class="title is-5">
<p>Dataset: <span id="current-dataset-post" class="has-text-weight-semibold"></span></p>
<p>Analysis: <span id="current-analysis-post" class="has-text-weight-semibold">Primary analysis</span></p>
<p>Number of selected observations: <span id="num-selected" class="has-text-weight-semibold"></span></p>
<p>Gene: <span id="current-gene-post" class="has-text-weight-semibold"></span></p>
</div>
<div id="post-plot-customize">
<div id="facet-content" class="content is-hidden">
Expand Down
6 changes: 6 additions & 0 deletions www/js/curator_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,10 +659,16 @@ const cloneDisplay = async (event, display) => {
selected_genes = manuallyEnteredGenes;
const geneSymbolString = config.gene_symbols.join(" ");
document.getElementById('genes-manually-entered').value = geneSymbolString;
// Mostly need this to populate the current gene(s) in the display contaainer
chooseGenes();
} else {
selectedGene = config.gene_symbol;
// Mostly need this to populate the current gene(s) in the display contaainer
chooseGene();
}



try {
plotStyle.cloneDisplay(config);
} catch (error) {
Expand Down
4 changes: 4 additions & 0 deletions www/js/dataset_curator.js
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,8 @@ const chooseGene = () => {
document.getElementById("gene-s-failed").classList.remove("is-hidden");
document.getElementById("gene-s-success").classList.add("is-hidden");
document.getElementById("current-gene").textContent = "";
document.getElementById("current-gene-post").textContent = "";

for (const plotBtn of document.getElementsByClassName("js-plot-btn")) {
plotBtn.disabled = true;
}
Expand All @@ -701,6 +703,7 @@ const chooseGene = () => {
// Display current selected gene
document.getElementById("current-gene-c").classList.remove("is-hidden");
document.getElementById("current-gene").textContent = selectedGene;
document.getElementById("current-gene-post").textContent = selectedGene;
// Force validationcheck to see if plot button should be enabled
trigger(document.querySelector(".js-plot-req"), "change");
document.getElementById("plot-options-s").click();
Expand Down Expand Up @@ -875,6 +878,7 @@ const curatorSpecifcCreatePlot = async (plotType) => {
*/
const curatorSpecifcDatasetTreeCallback = () => {
document.getElementById("current-gene").textContent = "";
document.getElementById("current-gene-post").textContent = "";
}

/**
Expand Down
7 changes: 6 additions & 1 deletion www/js/multigene_curator.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,10 @@ const chooseGenes = (event) => {
const geneTagsElt = document.getElementById("gene-tags");
geneTagsElt.replaceChildren();

document.getElementById("num-selected-genes-c").classList.remove("is-hidden");
document.getElementById("num-selected-genes").textContent = selected_genes.size;
document.getElementById("num-selected-genes-post").textContent = selected_genes.size;

if (selected_genes.size == 0) return; // Do not trigger after initial population

// Update list of gene tags
Expand Down Expand Up @@ -755,7 +759,8 @@ const curatorSpecifcCreatePlot = async (plotType) => {
}

const curatorSpecifcDatasetTreeCallback = async () => {
//pass
document.getElementById("num-selected-genes").textContent = 0;
document.getElementById("num-selected-genes-post").textContent = 0;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions www/multigene_curator.html
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@ <h5 class="title is-5">
<i class="mdi mdi-chevron-down"></i>
</span>
</h5>
<div id="num-selected-genes-c" class="is-hidden">
Number of selected genes:
<span id="num-selected-genes"></span>
</div>
<div class="js-step-collapsable mt-3" id="gene-collapsable">
<p>Genes entered manually or chosen from an existing gene list will be added to your group of selected genes to plot. Note that only genes or orthologs found in the dataset will appear in the plot.</p>

Expand Down Expand Up @@ -304,6 +308,7 @@ <h5 class="title is-5">
<p>Dataset: <span id="current-dataset-post" class="has-text-weight-semibold"></span></p>
<p>Analysis: <span id="current-analysis-post" class="has-text-weight-semibold">Primary analysis</span></p>
<p>Number of selected observations: <span id="num-selected" class="has-text-weight-semibold"></span></p>
<p>Number of selected genes: <span id="num-selected-genes-post" class="has-text-weight-semibold"></span></p>
</div>
<div id="post-plot-customize">
<div id="facet-content" class="content is-hidden">
Expand Down

0 comments on commit e267cd4

Please sign in to comment.