Skip to content

Commit

Permalink
URL options now handled for manually entered genes, gene lists, datas…
Browse files Browse the repository at this point in the history
…et collections and exact matches
  • Loading branch information
jorvis committed Jan 15, 2024
1 parent 016d659 commit ba093ce
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion www/expression.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<div class="field is-grouped">
<div class="control">
<label class="checkbox">
<input type="checkbox">
<input type="checkbox" id="gene-search-exact-match" >
Exact match
</label>
</div>
Expand Down
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ <h3 class="mt-6 mb-3">
<div class="field is-grouped">
<div class="control">
<label class="checkbox">
<input type="checkbox" checked>
<input type="checkbox" id="gene-search-exact-match" checked>
Exact
</label>
</div>
Expand Down
8 changes: 6 additions & 2 deletions www/js/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ document.addEventListener('DOMContentLoaded', () => {
document.querySelector('#page-header-label').textContent = 'Gene Expression Search';

// Handle passed URL parameters

if (getUrlParameter('gene_symbol_exact_match') === 'true') {
document.querySelector('#gene-search-exact-match').checked = true;
}

});

Expand Down Expand Up @@ -33,6 +35,8 @@ const parseDatasetCollectionURLParams = () => {
const layout_id = getUrlParameter('layout_id');

if (layout_id) {
selectDatasetCollection(layout_id);
selected_dc_share_id = layout_id;
selected_dc_label = dataset_collection_label_index[layout_id];
document.querySelector('#dropdown-dc-selector-label').innerHTML = selected_dc_label;
}
}
5 changes: 5 additions & 0 deletions www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ document.addEventListener('DOMContentLoaded', () => {
if (manually_entered_genes.length > 0) {
url += `gene_symbol=${manually_entered_genes.join(',')}`;
}

// are we doing exact matches?
if (document.querySelector('#gene-search-exact-match').checked) {
url += '&gene_symbol_exact_match=true';
}

// add the gene lists
if (Object.keys(selected_carts).length > 0) {
Expand Down

0 comments on commit ba093ce

Please sign in to comment.