Skip to content

Commit

Permalink
Fix gene plot which fetched wrong ids in tulos frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
glormph committed Nov 18, 2024
1 parent 221b2c3 commit ecef1af
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/frontend/mstulos/src/GenePlots.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ let errors = [];
async function fetchData() {
let url = new URL('/mstulos/plotdata/genes/', document.location);
let expids = new Set();
data.forEach(x => x.experiments.forEach(x => expids.add(x[0])));
const post = {expids: Array.from(expids), gids: data.map(x => x.id )}
const post = {
expids: Array.from(new Set(data.flatMap(x => x.experiments.map(e => e[0])))),
gids: Array.from(new Set(data.flatMap(x => x.genes.map(g => g[0])))),
}
const resp = await postJSON(url, post);
return resp;
}
Expand Down

0 comments on commit ecef1af

Please sign in to comment.