Skip to content

Commit

Permalink
fix: SJIP-1091 convert gene list to upper case
Browse files Browse the repository at this point in the history
  • Loading branch information
celinepelletier committed Nov 14, 2024
1 parent 48c4330 commit 75eb6f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/endpoints/transcriptomics/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ export const checkSampleIdsAndGene = async (sample_ids: string[], ensembl_gene_i

export const checkGenesExist = async (genes: string[]): Promise<MatchedGene[]> => {
const client = EsInstance.getInstance();
const genesUpperCase = genes.map(gene => gene.toUpperCase());

const { body } = await client.search({
index: esDiffGeneExpIndex,
Expand All @@ -237,12 +238,12 @@ export const checkGenesExist = async (genes: string[]): Promise<MatchedGene[]> =
should: [
{
terms: {
gene_symbol: genes,
gene_symbol: genesUpperCase,
},
},
{
terms: {
ensembl_gene_id: genes,
ensembl_gene_id: genesUpperCase,
},
},
],
Expand Down

0 comments on commit 75eb6f0

Please sign in to comment.