Skip to content

Commit

Permalink
Merge branch 'splice-acmg' into development
Browse files Browse the repository at this point in the history
# Conflicts:
#	exomiser-cli/pom.xml
#	exomiser-core/pom.xml
#	exomiser-core/src/main/java/org/monarchinitiative/exomiser/core/analysis/util/acmg/Acmg2015EvidenceAssigner.java
#	exomiser-data-genome/pom.xml
#	exomiser-data-phenotype/pom.xml
#	exomiser-rest-prioritiser/pom.xml
#	exomiser-spring-boot-autoconfigure/pom.xml
#	exomiser-spring-boot-starter/pom.xml
#	exomiser-spring-boot-test/pom.xml
#	exomiser-web/pom.xml
#	phenix-repository/pom.xml
#	pom.xml
  • Loading branch information
julesjacobsen committed Nov 13, 2024
2 parents c9af881 + a1720b2 commit 70802e4
Show file tree
Hide file tree
Showing 61 changed files with 2,569 additions and 524 deletions.
6 changes: 4 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 2
version: 2.1
jobs:
build:
working_directory: ~/exomiser
Expand All @@ -11,7 +11,9 @@ jobs:
- image: cimg/openjdk:17.0.7
steps:
- checkout
- run: chmod +x mvnw
- run:
name: make executable
command: chmod +x mvnw
- restore_cache:
key: exomiser-{{ arch }}-{{ checksum "pom.xml" }}
- run: ./mvnw clean install -Dmaven.javadoc.skip=true -B -V
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
Expand Down
2 changes: 1 addition & 1 deletion exomiser-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.2</version>
<version>14.1.0-ALPHA</version>
</parent>


Expand Down
8 changes: 7 additions & 1 deletion exomiser-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.2</version>
<version>14.1.0-ALPHA</version>
</parent>

<dependencies>
Expand Down Expand Up @@ -139,6 +139,12 @@
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.rocksdb</groupId>
<artifactId>rocksdbjni</artifactId>
<version>7.6.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
* Implementation of the ACGS v4 guidelines, Table 3 from
* https://www.acgs.uk.com/media/11631/uk-practice-guidelines-for-variant-classification-v4-01-2020.pdf
*
* @deprecated Guidelines now suggest using the {@link Acmg2020PointsBasedClassifier}
* @since 13.1.0
*/
@Deprecated(since = "14.1.0", forRemoval = true)
public final class Acgs2020Classifier implements AcmgEvidenceClassifier {

public AcmgClassification classify(AcmgEvidence acmgEvidence) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
* Implementation of the 2015 ACMG Standards guidelines for interpretation of sequence variants (Richards et al. doi:10.1038/gim.2015.30).
* Table 5 'Rules for combining criteria to classify sequence variants'
*
* @deprecated Guidelines now suggest using the {@link Acmg2020PointsBasedClassifier}
* @since 13.1.0
*/
@Deprecated(since = "14.1.0", forRemoval = true)
public final class Acmg2015Classifier implements AcmgEvidenceClassifier {

public AcmgClassification classify(AcmgEvidence acmgEvidence) {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ public static Evidence parseValue(String displayString) {
} catch (IllegalArgumentException ex) {
// swallow and try the display string
}
return switch (displayString) {
case "StandAlone" -> STAND_ALONE;
case "VeryStrong" -> VERY_STRONG;
case "Strong" -> STRONG;
case "Moderate" -> MODERATE;
case "Supporting" -> SUPPORTING;
return switch (displayString.toLowerCase()) {
case "standalone" -> STAND_ALONE;
case "verystrong" -> VERY_STRONG;
case "strong" -> STRONG;
case "moderate" -> MODERATE;
case "supporting" -> SUPPORTING;
default -> throw new IllegalArgumentException("Unrecognised evidence value '" + displayString + "'");
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,24 @@ public String toString() {
return '[' + stringJoiner.toString() + ']';
}

public static AcmgEvidence parseAcmgEvidence(String criteria) {
if (criteria == null || criteria.isEmpty()) {
return AcmgEvidence.empty();
}
AcmgEvidence.Builder acmgEvidenceBuilder = AcmgEvidence.builder();
for (String criterion : criteria.replace("[", "").replace("]", "").split("[, ]+")) {
String[] criteriaModifier = criterion.trim().split("_");
AcmgCriterion acmgCriterion = AcmgCriterion.valueOf(criteriaModifier[0]);
if (criteriaModifier.length == 2) {
AcmgCriterion.Evidence modifier = AcmgCriterion.Evidence.parseValue(criteriaModifier[1]);
acmgEvidenceBuilder.add(acmgCriterion, modifier);
} else {
acmgEvidenceBuilder.add(acmgCriterion);
}
}
return acmgEvidenceBuilder.build();
}

public static class Builder {

private final EnumMap<AcmgCriterion, Evidence> evidence = new EnumMap<>(AcmgCriterion.class);
Expand All @@ -264,6 +282,19 @@ public boolean contains(AcmgCriterion acmgCriterion) {
return evidence.containsKey(acmgCriterion);
}

public boolean containsWithEvidence(AcmgCriterion acmgCriterion, Evidence evidenceStrength) {
return evidence.containsKey(acmgCriterion) && evidence.get(acmgCriterion) == evidenceStrength;
}

public void remove(AcmgCriterion acmgCriterion) {
evidence.remove(acmgCriterion);
}

@Nullable
public Evidence evidenceForCategory(AcmgCriterion acmgCriterion) {
return evidence.get(acmgCriterion);
}

public AcmgEvidence build() {
return evidence.isEmpty() ? EMPTY : new AcmgEvidence(evidence);
}
Expand Down
Loading

0 comments on commit 70802e4

Please sign in to comment.