Skip to content

Commit

Permalink
bioindex util constant for the list of all trait groups
Browse files Browse the repository at this point in the history
  • Loading branch information
moriondo2022 committed Dec 10, 2024
1 parent a1d585f commit dca8362
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/utils/bioIndexUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ async function processRequest(req, onResolve, onError, onLoad, limitWhile) {
export const DEFAULT_SIGMA = 2;
export const DEFAULT_GENESET_SIZE = "small";
export const DEFAULT_TRAIT_GROUP = "all";
export const TRAIT_GROUPS = ["portal", "gcat_trait", "rare_v2"];

export default {
query,
Expand All @@ -152,5 +153,6 @@ export default {
BIO_INDEX_HOST_PRIVATE,
DEFAULT_SIGMA,
DEFAULT_GENESET_SIZE,
DEFAULT_TRAIT_GROUP
DEFAULT_TRAIT_GROUP,
TRAIT_GROUPS
};
5 changes: 2 additions & 3 deletions src/views/PIGEAN/Gene/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,9 @@ export default new Vuex.Store({
context.commit("setPhewasData", context.state.pigeanGene.data);
} else {
// If ALL is selected, query all trait groups and get top results across all
const TRAIT_GROUPS = ["portal", "gcat_trait", "rare_v2"];
let traitsData = [];
for (let i = 0; i < TRAIT_GROUPS.length; i++){
let group = TRAIT_GROUPS[i];
for (let i = 0; i < bioIndexUtils.TRAIT_GROUPS.length; i++){
let group = bioIndexUtils.TRAIT_GROUPS[i];
let traitQuery = `${group},${context.state.geneName},${
bioIndexUtils.DEFAULT_SIGMA},${context.state.genesetSize}`;
let groupData = await bioIndexUtils.query("pigean-gene", traitQuery);
Expand Down
5 changes: 2 additions & 3 deletions src/views/PIGEAN/GeneSet/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ export default new Vuex.Store({
context.commit("setPhewasData", context.state.pigeanGeneset.data);
} else {
// If ALL is selected, query all trait groups and get top results across all
const TRAIT_GROUPS = ["portal", "gcat_trait", "rare_v2"];
let traitsData = [];
for (let i = 0; i < TRAIT_GROUPS.length; i++){
let group = TRAIT_GROUPS[i];
for (let i = 0; i < bioIndexUtils.TRAIT_GROUPS.length; i++){
let group = bioIndexUtils.TRAIT_GROUPS[i];
let traitQuery = `${group},${name},${
bioIndexUtils.DEFAULT_SIGMA},${genesetSize}`;
let groupData = await bioIndexUtils.query("pigean-gene-set", traitQuery);
Expand Down

0 comments on commit dca8362

Please sign in to comment.