-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EVA-3425 make sure reference and alternate is always upper case (#192)
* make sure reference and alternate is always upper case
- Loading branch information
Showing
24 changed files
with
238 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/test/java/uk/ac/ebi/eva/commons/models/data/VariantSourceEntryTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package uk.ac.ebi.eva.commons.models.data; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class VariantSourceEntryTest { | ||
@Test | ||
public void testChangeRefAltToUpperCase() { | ||
VariantSourceEntry variantSourceEntry = new VariantSourceEntry(null, null, new String[]{"a", "t"}, null); | ||
assertEquals("A", variantSourceEntry.getSecondaryAlternates()[0]); | ||
assertEquals("T", variantSourceEntry.getSecondaryAlternates()[1]); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/java/uk/ac/ebi/eva/commons/models/data/VariantStatsTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package uk.ac.ebi.eva.commons.models.data; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class VariantStatsTest { | ||
@Test | ||
public void testChangeRefAltToUpperCase() { | ||
VariantStats variantStats = new VariantStats("a", "t", null); | ||
assertEquals("A", variantStats.getRefAllele()); | ||
assertEquals("T", variantStats.getAltAllele()); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/test/java/uk/ac/ebi/eva/commons/models/data/VariantTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package uk.ac.ebi.eva.commons.models.data; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class VariantTest { | ||
@Test | ||
public void testChangeRefAltToUpperCase() { | ||
Variant variant = new Variant("1", 1, 1, "c", "t"); | ||
assertEquals("C", variant.getReference()); | ||
assertEquals("T", variant.getAlternate()); | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/test/java/uk/ac/ebi/eva/commons/models/mongo/AnnotationTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package uk.ac.ebi.eva.commons.models.mongo; | ||
|
||
import org.junit.Test; | ||
import uk.ac.ebi.eva.commons.models.mongo.entity.Annotation; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class AnnotationTest { | ||
|
||
@Test | ||
public void testChangeRefAltToUpperCase() { | ||
Annotation annotation = new Annotation("chr", 1, 1, "a", "t", | ||
"vep", "vep_cache"); | ||
assertEquals("chr_1_A_T_vep_vep_cache", annotation.getId()); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/test/java/uk/ac/ebi/eva/commons/models/mongo/VariantDocumentTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package uk.ac.ebi.eva.commons.models.mongo; | ||
|
||
import org.junit.Test; | ||
import uk.ac.ebi.eva.commons.models.data.Variant; | ||
import uk.ac.ebi.eva.commons.models.mongo.entity.VariantDocument; | ||
|
||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class VariantDocumentTest { | ||
@Test | ||
public void testChangeRefAltToUpperCase() { | ||
VariantDocument variantDocument = new VariantDocument(Variant.VariantType.SNV, "chr", 1, | ||
2, 1, "a", "t", (Map<String, Set<String>>) null, | ||
null, null); | ||
|
||
assertEquals("A", variantDocument.getReference()); | ||
assertEquals("T", variantDocument.getAlternate()); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/test/java/uk/ac/ebi/eva/commons/models/mongo/projections/SimplifiedVariantTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package uk.ac.ebi.eva.commons.models.mongo.projections; | ||
|
||
import org.junit.Test; | ||
import uk.ac.ebi.eva.commons.models.data.Variant; | ||
import uk.ac.ebi.eva.commons.models.mongo.entity.projections.SimplifiedVariant; | ||
|
||
import java.util.HashMap; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class SimplifiedVariantTest { | ||
|
||
@Test | ||
public void testChangeRefAltToUpperCase() { | ||
SimplifiedVariant simplifiedVariant = new SimplifiedVariant(Variant.VariantType.SNV, "chr", | ||
1, 2, 1, "a", "t", new HashMap<>()); | ||
assertEquals("A", simplifiedVariant.getReference()); | ||
assertEquals("T", simplifiedVariant.getAlternate()); | ||
} | ||
|
||
} |
Oops, something went wrong.