Search in sources :

Example 86 with Entity

use of org.molgenis.data.Entity in project molgenis by molgenis.

the class CaddAnnotatorTest method testFourOccurences.

@Test
public void testFourOccurences() {
    Iterator<Entity> results = annotator.annotate(input3);
    Entity resultEntity = results.next();
    assertEquals(resultEntity.get(CaddAnnotator.CADD_ABS), "0.5");
    assertEquals(resultEntity.get(CaddAnnotator.CADD_SCALED), "14.5");
}
Also used : DynamicEntity(org.molgenis.data.support.DynamicEntity) Entity(org.molgenis.data.Entity) Test(org.testng.annotations.Test) AbstractMolgenisSpringTest(org.molgenis.data.AbstractMolgenisSpringTest)

Example 87 with Entity

use of org.molgenis.data.Entity in project molgenis by molgenis.

the class CaddAnnotatorTest method testEightSingleAllelicIns.

@Test
public void testEightSingleAllelicIns() {
    Iterator<Entity> results = annotator.annotate(input7);
    Entity resultEntity = results.next();
    assertEquals(resultEntity.get(CaddAnnotator.CADD_ABS), "1.5");
    assertEquals(resultEntity.get(CaddAnnotator.CADD_SCALED), "15.5");
}
Also used : DynamicEntity(org.molgenis.data.support.DynamicEntity) Entity(org.molgenis.data.Entity) Test(org.testng.annotations.Test) AbstractMolgenisSpringTest(org.molgenis.data.AbstractMolgenisSpringTest)

Example 88 with Entity

use of org.molgenis.data.Entity in project molgenis by molgenis.

the class CaddAnnotatorTest method testSixMultiAllelicDel.

@Test
public void testSixMultiAllelicDel() {
    Iterator<Entity> results = annotator.annotate(input5);
    Entity resultEntity = results.next();
    assertEquals(resultEntity.get(CaddAnnotator.CADD_ABS), "-3.4,1.2");
    assertEquals(resultEntity.get(CaddAnnotator.CADD_SCALED), "1.123,24.1");
}
Also used : DynamicEntity(org.molgenis.data.support.DynamicEntity) Entity(org.molgenis.data.Entity) Test(org.testng.annotations.Test) AbstractMolgenisSpringTest(org.molgenis.data.AbstractMolgenisSpringTest)

Example 89 with Entity

use of org.molgenis.data.Entity in project molgenis by molgenis.

the class CaddAnnotatorTest method testTwoOccurencesNoMatch.

@Test
public void testTwoOccurencesNoMatch() {
    Iterator<Entity> results = annotator.annotate(input2);
    Entity resultEntity = results.next();
    assertEquals(resultEntity.get(CaddAnnotator.CADD_ABS), null);
    assertEquals(resultEntity.get(CaddAnnotator.CADD_SCALED), null);
}
Also used : DynamicEntity(org.molgenis.data.support.DynamicEntity) Entity(org.molgenis.data.Entity) Test(org.testng.annotations.Test) AbstractMolgenisSpringTest(org.molgenis.data.AbstractMolgenisSpringTest)

Example 90 with Entity

use of org.molgenis.data.Entity in project molgenis by molgenis.

the class CaddAnnotatorTest method testFiveMultiAllelic.

@Test
public void testFiveMultiAllelic() {
    Iterator<Entity> results = annotator.annotate(input4);
    Entity resultEntity = results.next();
    assertEquals(resultEntity.get(CaddAnnotator.CADD_ABS), "-2.4,0.2,0.5");
    assertEquals(resultEntity.get(CaddAnnotator.CADD_SCALED), "0.123,23.1,14.5");
}
Also used : DynamicEntity(org.molgenis.data.support.DynamicEntity) Entity(org.molgenis.data.Entity) Test(org.testng.annotations.Test) AbstractMolgenisSpringTest(org.molgenis.data.AbstractMolgenisSpringTest)

Aggregations

Entity (org.molgenis.data.Entity)448 Test (org.testng.annotations.Test)295 DynamicEntity (org.molgenis.data.support.DynamicEntity)192 AbstractMolgenisSpringTest (org.molgenis.data.AbstractMolgenisSpringTest)120 Attribute (org.molgenis.data.meta.model.Attribute)111 EntityType (org.molgenis.data.meta.model.EntityType)110 AbstractMockitoTest (org.molgenis.test.AbstractMockitoTest)37 MolgenisDataException (org.molgenis.data.MolgenisDataException)20 QueryImpl (org.molgenis.data.support.QueryImpl)20 AttributeType (org.molgenis.data.meta.AttributeType)18 UnexpectedEnumException (org.molgenis.util.UnexpectedEnumException)18 Stream (java.util.stream.Stream)17 QueryRule (org.molgenis.data.QueryRule)16 MultiAllelicResultFilter (org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter)16 RunAsSystem (org.molgenis.security.core.runas.RunAsSystem)16 Objects.requireNonNull (java.util.Objects.requireNonNull)15 DataService (org.molgenis.data.DataService)15 AttributeMapping (org.molgenis.semanticmapper.mapping.model.AttributeMapping)15 WithMockUser (org.springframework.security.test.context.support.WithMockUser)14 Instant (java.time.Instant)13