Skip to content

Commit

Permalink
Merge pull request #24 from cBioPortal/Fix-Core-Dep-Issues-And-CnaUtils
Browse files Browse the repository at this point in the history
Fix core dep issues and cna utils
  • Loading branch information
haynescd committed Mar 14, 2024
2 parents aec1dce + fdda8ba commit fcb703b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>org.mskcc.cbio</groupId>
<artifactId>core</artifactId>
<version>1.0.7-SNAPSHOT</version>
<version>1.0.7</version>

<name>Portal Core</name>
<description>Core libraries shared among other modules</description>
Expand Down
14 changes: 9 additions & 5 deletions src/main/java/org/mskcc/cbio/portal/util/CnaUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,18 @@ public static void storeCnaEvents(
if (!CNA.AMP.equals(cnaEvent.getAlteration()) && !CNA.HOMDEL.equals(cnaEvent.getAlteration())) {
continue;
}

CnaEvent.Event event = cnaEvent.getEvent();
if (existingCnaEvents.contains(event)) {
cnaEvent.setEventId(event.getEventId());

// Revert PR https://github.com/cBioPortal/cbioportal-core/pull/1 breaks importer
Optional<CnaEvent.Event> existingCnaEvent = existingCnaEvents
.stream()
.filter(e -> e.equals(cnaEvent.getEvent()))
.findFirst();
if (existingCnaEvent.isPresent()) {
cnaEvent.setEventId(existingCnaEvent.get().getEventId());
DaoCnaEvent.addCaseCnaEvent(cnaEvent, false);
} else {
DaoCnaEvent.addCaseCnaEvent(cnaEvent, true);
existingCnaEvents.add(event);
existingCnaEvents.add(cnaEvent.getEvent());
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
<property name="basePackage" value="org.mskcc.cbio.portal.persistence,org.cbioportal.persistence.mybatis" />
</bean>


<bean id="cacheMapUtil" class="org.cbioportal.persistence.cachemaputil.InactiveCacheMapUtil" />

<!-- enable component scanning (beware that this does not enable mapper scanning!) -->
<context:component-scan base-package="org.mskcc.cbio.portal.util"/> <!-- - mainly to inject into global properties -->
<context:component-scan base-package="org.cbioportal.persistence" />
Expand All @@ -35,6 +38,7 @@
<!-- enable autowire -->
<context:annotation-config />


<!-- enable transaction demarcation with annotations -->
<tx:annotation-driven />

Expand Down

0 comments on commit fcb703b

Please sign in to comment.