Skip to content

Commit

Permalink
Merge branch 'pvs1-hotfix' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
julesjacobsen committed Sep 20, 2024
2 parents 7d81e85 + e943e04 commit c9af881
Show file tree
Hide file tree
Showing 17 changed files with 61 additions and 31 deletions.
8 changes: 8 additions & 0 deletions exomiser-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# The Exomiser Command Line Executable - Changelog

## 14.0.2 2024-09-20

- Fix for issue #571. This is a bug-fix release to prevent erroneous assignment of `PVS1` to recessive-compatible variants in LOF-tolerant genes.

## 14.0.1 2024-09-03

- Fix for Issue #565. This is a patch release to prevent a possible ArrayIndexOutOfBoundsException being thrown when outputting the variants TSV file. There are no other changes.

## 14.0.0 2024-02-29

- Minimum Java version is now **Java 17**
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.0</version>
<version>14.0.2</version>
</parent>


Expand Down
8 changes: 8 additions & 0 deletions exomiser-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# The Exomiser - Core Library Changelog

## 14.0.2 2024-09-20

- Fix for issue #571. This is a bug-fix release to prevent erroneous assignment of `PVS1` to recessive-compatible variants in LOF-tolerant genes.

## 14.0.1 2024-09-03

- Fix for Issue #565. This is a patch release to prevent a possible ArrayIndexOutOfBoundsException being thrown when outputting the variants TSV file. There are no other changes.

## 14.0.0 2024-02-29

This release **requires data version >= 2402** and **Java version >= 17** (the previous LTS release).
Expand Down
2 changes: 1 addition & 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.0</version>
<version>14.0.2</version>
</parent>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,7 @@ private void assignPVS1(AcmgEvidence.Builder acmgEvidenceBuilder, VariantEvaluat
// Should this be using the hasCompatibleDiseaseMatches variable?
boolean inGeneWithKnownDiseaseAssociations = !knownDiseases.isEmpty();
if (inGeneWithKnownDiseaseAssociations && isLossOfFunctionEffect(variantEvaluation.getVariantEffect())
&& (modeOfInheritance == ModeOfInheritance.ANY
|| compatibleWithRecessive(modeOfInheritance)
|| compatibleWithDominant(modeOfInheritance) && (geneContraint != null && geneContraint.isLossOfFunctionIntolerant())
)
&& (geneContraint != null && geneContraint.isLossOfFunctionIntolerant())
) {
if (variantEvaluation.hasTranscriptAnnotations()) {
TranscriptAnnotation transcriptAnnotation = variantEvaluation.getTranscriptAnnotations().get(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ public float maxFreq() {
@JsonIgnore
@Nullable
public Frequency maxFrequency() {
return this.size == 0 ? null : frequency(maxSource);
return maxSource == -1 ? null : frequency(maxSource);
}

/**
Expand Down Expand Up @@ -454,10 +454,11 @@ public Builder addFrequency(FrequencySource frequencySource, int ac, int an, int
*/
private Builder addFrequency(FrequencySource frequencySource, float frequency, int ac, int an, int homCount) {
frequencySources[frequencySource.ordinal()] = frequencySource;
frequencyData[frequencySource.ordinal() * WORD_SIZE + FREQ_OFFSET] = frequency;
frequencyData[frequencySource.ordinal() * WORD_SIZE + AC_OFFSET] = ac;
frequencyData[frequencySource.ordinal() * WORD_SIZE + AN_OFFSET] = an;
frequencyData[frequencySource.ordinal() * WORD_SIZE + HOM_OFFSET] = homCount;
int freqIndex = frequencySource.ordinal() * WORD_SIZE;
frequencyData[freqIndex + FREQ_OFFSET] = frequency;
frequencyData[freqIndex + AC_OFFSET] = ac;
frequencyData[freqIndex + AN_OFFSET] = an;
frequencyData[freqIndex + HOM_OFFSET] = homCount;
return this;
}

Expand Down Expand Up @@ -517,10 +518,12 @@ public FrequencyData build() {
FrequencySource source = values[i];
if (frequencySources[source.ordinal()] != null) {
sources[dataPos] = source;
data[dataPos * WORD_SIZE + FREQ_OFFSET] = frequencyData[source.ordinal() * WORD_SIZE + FREQ_OFFSET];
data[dataPos * WORD_SIZE + AC_OFFSET] = frequencyData[source.ordinal() * WORD_SIZE + AC_OFFSET];
data[dataPos * WORD_SIZE + AN_OFFSET] = frequencyData[source.ordinal() * WORD_SIZE + AN_OFFSET];
data[dataPos * WORD_SIZE + HOM_OFFSET] = frequencyData[source.ordinal() * WORD_SIZE + HOM_OFFSET];
int dataIndex = dataPos * WORD_SIZE;
int freqIndex = source.ordinal() * WORD_SIZE;
data[dataIndex + FREQ_OFFSET] = frequencyData[freqIndex + FREQ_OFFSET];
data[dataIndex + AC_OFFSET] = frequencyData[freqIndex + AC_OFFSET];
data[dataIndex + AN_OFFSET] = frequencyData[freqIndex + AN_OFFSET];
data[dataIndex + HOM_OFFSET] = frequencyData[freqIndex + HOM_OFFSET];
dataPos++;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void testAssignsPVS1() {

"MALE, X_RECESSIVE, X_RECESSIVE, true",
"FEMALE, X_RECESSIVE, X_RECESSIVE, true",
"UNKNOWN, X_RECESSIVE, X_RECESSIVE, false",
"UNKNOWN, X_RECESSIVE, X_RECESSIVE, true",

"MALE, X_DOMINANT, X_DOMINANT, true",
"FEMALE, X_DOMINANT, X_DOMINANT, true",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@

package org.monarchinitiative.exomiser.core.model.frequency;

import org.h2.mvstore.MVStore;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.monarchinitiative.exomiser.core.genome.dao.serialisers.MvStoreUtil;
import org.monarchinitiative.exomiser.core.model.AlleleProtoAdaptor;
import org.monarchinitiative.exomiser.core.proto.AlleleProto;
import org.monarchinitiative.exomiser.core.proto.AlleleProtoFormatter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.*;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.is;
Expand Down Expand Up @@ -287,6 +290,17 @@ public void testGetMaxFrequencyWithData() {
assertThat(instance.maxFrequency(), equalTo(maxFrequency));
}

@Test
public void testGetMaxFrequencyWhenZeroData() {
Frequency maxFrequency = Frequency.of(GNOMAD_E_AFR, 0, 1000, 0);
Frequency minFrequency = Frequency.of(TOPMED, 0f);
FrequencyData instance = FrequencyData.of("rs545662810", minFrequency, maxFrequency);

assertThat(instance.maxFrequency(), equalTo(null));
assertThat(instance.maxFreq(), equalTo(0f));
assertThat(instance.frequencies(), equalTo(List.of(minFrequency, maxFrequency)));
}

@Test
public void testHasFrequencyOverPercentageValue() {
float maxFreq = 0.05f;
Expand Down Expand Up @@ -482,12 +496,12 @@ void floatArray() {
var an = 10000;
var hom = 10;
var af = Frequency.percentageFrequency(ac, an);
System.out.println("AF=" + af);

data[0] = (float) ac;
data[1] = (float) an;
data[2] = (float) hom;
data[3] = (float) af;
System.out.println("dataAF=" + data[3]);

assertThat(Frequency.percentageFrequency((int) data[0], (int) data[1]), equalTo((float) data[3]));
}

Expand Down
2 changes: 1 addition & 1 deletion exomiser-data-genome/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion exomiser-data-phenotype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion exomiser-rest-prioritiser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
</parent>

<artifactId>exomiser-rest-prioritiser</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion exomiser-spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion exomiser-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
</parent>

<artifactId>exomiser-spring-boot-starter</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion exomiser-spring-boot-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
</parent>

<artifactId>exomiser-spring-boot-test</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion exomiser-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion phenix-repository/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
</parent>

<artifactId>phenix-repository</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<groupId>org.monarchinitiative.exomiser</groupId>
<artifactId>exomiser</artifactId>
<version>14.0.0</version>
<version>14.0.2</version>
<packaging>pom</packaging>

<name>exomiser</name>
Expand Down

0 comments on commit c9af881

Please sign in to comment.