Skip to content

Commit 92db766

Browse files
authored
Merge pull request #2374 from broadinstitute/development
Release 1.111.1
2 parents 4720be7 + a7dde30 commit 92db766

File tree

14 files changed

+98
-30
lines changed

14 files changed

+98
-30
lines changed

.github/actions/setup-gcloud/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ runs:
1414
shell: bash
1515
run: sudo apt-get update && sudo apt-get -y install jq
1616
- name: Auth to GCP
17-
uses: google-github-actions/auth@v1
17+
uses: google-github-actions/auth@v3
1818
with:
1919
project_id: ${{ inputs.google_cloud_project }}
2020
workload_identity_provider: "projects/1038484894585/locations/global/workloadIdentityPools/github-wi-pool/providers/github-wi-provider"
2121
service_account: ${{ inputs.service_account_email }}
2222
- name: Set up Cloud SDK
23-
uses: google-github-actions/setup-gcloud@v2
23+
uses: google-github-actions/setup-gcloud@v3
2424
with:
2525
project_id: ${{ inputs.google_cloud_project }}
2626
- name: Authenticate docker

.github/workflows/build-and-publish-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ubuntu-24.04
1919
steps:
2020
- name: Check out repository code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
2222
- name: Configure gcloud
2323
uses: ./.github/actions/setup-gcloud
2424
with:

.github/workflows/deploy-to-production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
group: production-deployment
3030
steps:
3131
- name: Check out repository code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333
- name: Configure gcloud
3434
uses: ./.github/actions/setup-gcloud
3535
with:

.github/workflows/deploy-to-staging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
group: staging-deployment
2626
steps:
2727
- name: Check out repository code
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
- name: Configure gcloud
3030
uses: ./.github/actions/setup-gcloud
3131
with:

.github/workflows/run-all-tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ jobs:
1717
runs-on: self-hosted
1818

1919
steps:
20+
- name: Set up node
21+
uses: actions/setup-node@v6
22+
with:
23+
node-version: '24'
2024
- name: Check out repository code
21-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2226
- name: Configure gcloud
2327
uses: ./.github/actions/setup-gcloud
2428
with:

.github/workflows/run-orch-smoketest.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ jobs:
1414
runs-on: self-hosted
1515

1616
steps:
17+
- name: Set up node
18+
uses: actions/setup-node@v6
19+
with:
20+
node-version: '24'
1721
- name: Check out repository code
18-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
1923
- name: Configure gcloud
2024
uses: ./.github/actions/setup-gcloud
2125
with:

app/javascript/components/upload/upload-utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,8 @@ function validateNameUniqueness(file, allFiles, validationMessages) {
238238
const allOtherNames = allOtherFiles.map(f => f.name)
239239
// require 'isDirty' so we only show the error on the file being updated
240240
if (file.name && allOtherNames.includes(file.name) && file.isDirty) {
241-
validationMessages.fileName = `A file named ${file.name} already exists in your study`
241+
validationMessages.fileName = `A file named ${file.name} already exists in your study. If you recently deleted ` +
242+
`this file and are reusing it, please refresh the page to clear it from the cache.`
242243
}
243244
}
244245

app/javascript/lib/dot-plot-precompute-patch.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,17 @@
7676
// Series 1: percent expressing (for size) - will be scaled to 0-100
7777
// Data format: values[0] = mean_expression, values[1] = percent_expressing
7878
geneNames.forEach((gene, i) => {
79-
const geneData = data.genes[gene]
80-
79+
// gotcha for pathway diagrams and precomputed dot plots
80+
// this is because the pathway diagram may contain genes that were not included in the dot plot data
81+
// (e.g. because they were not expressed)
82+
let geneData = data.genes[gene]
83+
if (!geneData) {
84+
geneData = []
85+
// If gene is missing from data, fill with NaN and 0 cells expressing
86+
for (let j = 0; j < nCols; j++) {
87+
geneData.push([NaN, 0])
88+
}
89+
}
8190
// Map data from original order to sorted order
8291
geneData.forEach((values, originalIndex) => {
8392
const sortedIndex = originalToSortedIndex[originalIndex]

app/javascript/lib/pathway-expression.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { renderDotPlot } from '~/components/visualization/DotPlot'
2121
import { getEligibleLabels } from '~/lib/cluster-utils'
2222
import { fetchMorpheusJson } from '~/lib/scp-api'
2323
import { getFeatureFlagsWithDefaults } from '~/providers/UserProvider'
24+
import { shouldUsePreprocessedData } from '~/components/visualization/DotPlot'
2425

2526
// Denoise DevTools console log by not showing error that lacks user impact
2627
window.onerror = function(error) {
@@ -83,7 +84,7 @@ window.SCP.renderBackgroundDotPlotRegister = {}
8384
export async function renderBackgroundDotPlot(
8485
studyAccession, genes=[], cluster, annotation={},
8586
subsample, annotationValues, drawCallback,
86-
topContainerSelector
87+
topContainerSelector, usePreprocessed
8788
) {
8889
const graphId = 'background-dot-plot'
8990
document.querySelector(`#${graphId}`)?.remove()
@@ -122,7 +123,9 @@ export async function renderBackgroundDotPlot(
122123
annotation.name,
123124
annotation.type,
124125
annotation.scope,
125-
subsample
126+
subsample,
127+
false, // mock flag
128+
usePreprocessed
126129
)
127130
dataset = results[0]
128131

@@ -317,6 +320,8 @@ function mergeDotPlotMetrics(newMetrics, oldMetrics) {
317320

318321
/** Color pathway gene nodes by expression */
319322
export async function renderPathwayExpression(studyAccession, cluster, annotation, label, labels) {
323+
const flags = getFeatureFlagsWithDefaults()
324+
const usePreprocessed = shouldUsePreprocessedData(flags, window.SCP?.exploreInfo)
320325
let allDotPlotMetrics = {}
321326

322327
const pathwayGenes = getPathwayGenes()
@@ -337,10 +342,9 @@ export async function renderPathwayExpression(studyAccession, cluster, annotatio
337342
// the second render is for collapsed label-x-gene metrics (dotplot)
338343

339344
numDraws += 1
340-
if (numDraws === 1) {return}
345+
if (numDraws === 1 && !usePreprocessed) {return}
341346

342347
const dotPlotMetrics = getDotPlotMetrics(dotPlot)
343-
344348
if (!dotPlotMetrics) {
345349
// Occurs upon resizing window, artifact of internal Morpheus handling
346350
// of pre-dot-plot heatmap matrix. No user-facing impact.
@@ -367,7 +371,7 @@ export async function renderPathwayExpression(studyAccession, cluster, annotatio
367371
renderBackgroundDotPlot(
368372
studyAccession, dotPlotGeneBatches[numRenders], cluster, annotation,
369373
'All', annotationLabels, backgroundDotPlotDrawCallback,
370-
'#_ideogramPathwayContainer'
374+
'#_ideogramPathwayContainer', usePreprocessed
371375
)
372376
}
373377
}
@@ -378,7 +382,7 @@ export async function renderPathwayExpression(studyAccession, cluster, annotatio
378382
renderBackgroundDotPlot(
379383
studyAccession, dotPlotGeneBatches[0], cluster, annotation,
380384
'All', annotationLabels, backgroundDotPlotDrawCallback,
381-
'#_ideogramPathwayContainer'
385+
'#_ideogramPathwayContainer', usePreprocessed
382386
)
383387
}
384388

app/javascript/lib/validation/validate-file.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ function validateFileName(file, studyFile, allStudyFiles, allowedFileExts=['*'])
3030
if (otherNames.includes(file.name) ||
3131
otherUploadFileNames.includes(file.name) ||
3232
otherLocalFileNames.includes(file.name)) {
33-
const msg = `A file named ${file.name} already exists in your study`
33+
const msg = `A file named ${file.name} already exists in your study. If you recently deleted ` +
34+
`this file and are reusing it, please refresh the page to clear it from the cache.`
3435
issues.push(['error', 'filename:duplicate', msg])
3536
}
3637

0 commit comments

Comments
 (0)