Skip to content

Commit

Permalink
Updates to resolved sample type abbreviation values (#96)
Browse files Browse the repository at this point in the history
Sample type abbreviations R, M, and P now resolve to T
Adjacent Tissue now resolves to sample type abbreviation 'A'

Signed-off-by: Angelica Ochoa <[email protected]>
  • Loading branch information
ao508 authored Jan 29, 2025
1 parent a273edf commit 8355378
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ Please follow these checks if any changes were made to any classes in the web, s
### II. Message handlers checklist:
- [ ] Changes introduced affect the workflow of incoming messages.
- [ ] Messages are following the expected workflow when published to the topic(s) changed or introduced in this pull request.
- [ ] Unit tests were added or updated to ensure messages are handled as expected.

If no unit tests were updated or added, then please explain why: [insert details here]

Please describe how the workflow and messaging was tested/simulated:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ private static Map<SampleOrigin, String> initSampleOriginAbbrevMap() {
private static Map<CmoSampleClass, String> initCmoSampleClassAbbrevMap() {
Map<CmoSampleClass, String> map = new HashMap<>();
map.put(CmoSampleClass.UNKNOWN_TUMOR, "T");
map.put(CmoSampleClass.LOCAL_RECURRENCE, "R");
map.put(CmoSampleClass.PRIMARY, "P");
map.put(CmoSampleClass.RECURRENCE, "R");
map.put(CmoSampleClass.METASTASIS, "M");
map.put(CmoSampleClass.LOCAL_RECURRENCE, "T");
map.put(CmoSampleClass.PRIMARY, "T");
map.put(CmoSampleClass.RECURRENCE, "T");
map.put(CmoSampleClass.METASTASIS, "T");
map.put(CmoSampleClass.NORMAL, "N");
map.put(CmoSampleClass.ADJACENT_NORMAL, "N");
map.put(CmoSampleClass.ADJACENT_NORMAL, "A");
map.put(CmoSampleClass.ADJACENT_TISSUE, "T");
return map;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void testCmoLabelGenForSampleUpdate() throws Exception {
// generate cmoLabel for sample with updates
String newCmoLabel = cmoLabelGeneratorService.generateCmoSampleLabel(
updatedSample, existingSamples, DEFAULT_SAMPLES_BY_ALT_ID);
Assertions.assertEquals("C-MP789JR-P003-d01", newCmoLabel);
Assertions.assertEquals("C-MP789JR-T003-d01", newCmoLabel);

Status sampleStatus = cmoLabelGeneratorService.generateSampleStatus(
updatedSample, existingSamples);
Expand Down Expand Up @@ -286,7 +286,7 @@ public void testNewSampleExistingAltIdDnaNucAcid() throws Exception {
// if no samples exist by the same alt id then the new sample should receive tumor counter #3
String cmoLabelNoAltIds = cmoLabelGeneratorService.generateCmoSampleLabel(newSample1,
existingSamples, DEFAULT_SAMPLES_BY_ALT_ID);
Assertions.assertEquals("C-MP789JR-P003-d01", cmoLabelNoAltIds);
Assertions.assertEquals("C-MP789JR-T003-d01", cmoLabelNoAltIds);

// set up samples by alt id as same as existing samples
List<SampleMetadata> samplesByAltId =
Expand All @@ -296,7 +296,7 @@ public void testNewSampleExistingAltIdDnaNucAcid() throws Exception {
// and dna counter
String cmoLabelWithAltIds = cmoLabelGeneratorService.generateCmoSampleLabel(newSample1,
existingSamples, samplesByAltId);
Assertions.assertEquals("C-MP789JR-P001-d02", cmoLabelWithAltIds);
Assertions.assertEquals("C-MP789JR-T001-d02", cmoLabelWithAltIds);
newSample1.setCmoSampleName(cmoLabelWithAltIds);
samplesByAltId.add(newSample1);

Expand All @@ -308,7 +308,7 @@ public void testNewSampleExistingAltIdDnaNucAcid() throws Exception {
newSample2.setSampleClass("Non-PDX");
String cmoLabelWithAltIds2 = cmoLabelGeneratorService.generateCmoSampleLabel(newSample2,
existingSamples, samplesByAltId);
Assertions.assertEquals("C-MP789JR-P001-d03", cmoLabelWithAltIds2);
Assertions.assertEquals("C-MP789JR-T001-d03", cmoLabelWithAltIds2);
newSample2.setCmoSampleName(cmoLabelWithAltIds2);
samplesByAltId.add(newSample2);
}
Expand Down

0 comments on commit 8355378

Please sign in to comment.