Skip to content

Commit

Permalink
fix(browser): correctly sort transcripts without tissue expression
Browse files Browse the repository at this point in the history
  • Loading branch information
rileyhgrant committed Nov 22, 2024
1 parent 8f4cac3 commit 5768d15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions browser/src/GenePage/sortedTranscripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ const sortedTranscripts = (
}
}

const t1Mean = mean(t1.gtex_tissue_expression!.map((tissue) => tissue.value)) || 0
const t2Mean = mean(t2.gtex_tissue_expression!.map((tissue) => tissue.value)) || 0
const t1Mean = t1.gtex_tissue_expression
? mean(t1.gtex_tissue_expression.map((tissue) => tissue.value)) || 0
: 0
const t2Mean = t2.gtex_tissue_expression
? mean(t2.gtex_tissue_expression.map((tissue) => tissue.value)) || 0
: 0

if (t1Mean === t2Mean) {
return t1.transcript_id.localeCompare(t2.transcript_id)
Expand Down

0 comments on commit 5768d15

Please sign in to comment.