From 8e1aab1548c5ecc591939ca470b17f399ff7e7b3 Mon Sep 17 00:00:00 2001 From: James Ko Date: Mon, 2 Feb 2026 15:08:32 -0500 Subject: [PATCH 1/5] NA for missing cna data --- .../cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java index a8b20e064..1428cb9de 100644 --- a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java +++ b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java @@ -155,6 +155,8 @@ private void makeRecordsList() { Object value = cnaMap.get(gene, sample); if (value != null) { cnaValue = value.toString(); + } else { + cnaValue = "NA"; } line.append("\t").append(cnaValue); } @@ -178,8 +180,9 @@ private void processExistingCnaFile() { try { for (int i = 1; i < header.size(); i++) { if (!cvrSampleListUtil.getPortalSamples().contains(header.get(i))) { - continue; + continue; // Don't load data for samples that aren't in the portal } + // Also don't load data for new DMP samples if (!cvrSampleListUtil.getNewDmpSamples().contains(header.get(i))) { samples.add(header.get(i)); genes.add(data.get(0)); From b07fcf5454c74784b178f0724fa99221263d8c69 Mon Sep 17 00:00:00 2001 From: James Ko Date: Mon, 2 Feb 2026 15:22:58 -0500 Subject: [PATCH 2/5] fix behavior --- .../cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java index 1428cb9de..9bbfccc8a 100644 --- a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java +++ b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java @@ -151,10 +151,11 @@ private void makeRecordsList() { for (String gene : genes) { StringBuilder line = new StringBuilder(gene); for (String sample : samples) { - String cnaValue = "0"; + String cnaValue; Object value = cnaMap.get(gene, sample); if (value != null) { - cnaValue = value.toString(); + cnaValue = value.toString().trim(); + cnaValue = cnaValue.isEmpty() ? "NA" : cnaValue; } else { cnaValue = "NA"; } From 32e3682db8e851e2946770b4626b9958ec372f27 Mon Sep 17 00:00:00 2001 From: James Ko Date: Mon, 2 Feb 2026 15:34:19 -0500 Subject: [PATCH 3/5] fix gene panel NAs --- .../cmo/pipelines/cvr/genepanel/CVRGenePanelProcessor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/genepanel/CVRGenePanelProcessor.java b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/genepanel/CVRGenePanelProcessor.java index fb2f2d222..fea5feb53 100644 --- a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/genepanel/CVRGenePanelProcessor.java +++ b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/genepanel/CVRGenePanelProcessor.java @@ -56,7 +56,9 @@ public String process(CVRGenePanelRecord i) throws Exception { List record = new ArrayList<>(); record.add(cvrUtilities.convertWhitespace(i.getSAMPLE_ID())); for (String profile : geneticProfiles) { - record.add(cvrUtilities.convertWhitespace(i.getPanelMap().get(profile))); + String raw = i.getPanelMap().get(profile); + String value = (raw == null || raw.trim().isEmpty()) ? "NA" : raw; + record.add(cvrUtilities.convertWhitespace(value)); } return String.join("\t", record); } From bfff74a3efa0a709c03b17eab78a4ee099779d33 Mon Sep 17 00:00:00 2001 From: James Ko Date: Mon, 2 Feb 2026 15:40:14 -0500 Subject: [PATCH 4/5] remove comments --- .../org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java index 9bbfccc8a..29dd1595a 100644 --- a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java +++ b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/cna/CVRCnaDataReader.java @@ -181,9 +181,8 @@ private void processExistingCnaFile() { try { for (int i = 1; i < header.size(); i++) { if (!cvrSampleListUtil.getPortalSamples().contains(header.get(i))) { - continue; // Don't load data for samples that aren't in the portal + continue; } - // Also don't load data for new DMP samples if (!cvrSampleListUtil.getNewDmpSamples().contains(header.get(i))) { samples.add(header.get(i)); genes.add(data.get(0)); From e310dfaea46884c01f14006184f2933d3f2f56a7 Mon Sep 17 00:00:00 2001 From: James Ko Date: Tue, 10 Feb 2026 10:09:23 -0500 Subject: [PATCH 5/5] Normalize blank values in clinical data --- .../cvr/model/staging/CVRClinicalRecord.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/model/staging/CVRClinicalRecord.java b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/model/staging/CVRClinicalRecord.java index cfc1c965b..cca48625c 100644 --- a/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/model/staging/CVRClinicalRecord.java +++ b/cvr/src/main/java/org/cbioportal/cmo/pipelines/cvr/model/staging/CVRClinicalRecord.java @@ -245,7 +245,10 @@ public void setSO_COMMENTS(String soComments) { } public String getSAMPLE_COVERAGE() { - return this.sampleCoverage != null ? this.sampleCoverage : ""; + if (Strings.isNullOrEmpty(this.sampleCoverage) || "null".equals(this.sampleCoverage)) { + return "NA"; + } + return this.sampleCoverage; } public void setSAMPLE_COVERAGE(String sampleCoverage) { @@ -253,7 +256,10 @@ public void setSAMPLE_COVERAGE(String sampleCoverage) { } public String getCYCLE_THRESHOLD() { - return this.cycleThreshold != null ? this.cycleThreshold : ""; + if (Strings.isNullOrEmpty(this.cycleThreshold) || "null".equals(this.cycleThreshold)) { + return "NA"; + } + return this.cycleThreshold; } public void setCYCLE_THRESHOLD(String cycleThreshold) { @@ -301,7 +307,10 @@ public void setMSI_COMMENT(String msiComment) { } public String getMSI_SCORE() { - return this.msiScore != null ? this.msiScore : ""; + if (Strings.isNullOrEmpty(this.msiScore) || "Not Available".equals(this.msiScore)) { + return "NA"; + } + return this.msiScore; } public void setMSI_SCORE(String msiScore) {