use of org.molgenis.data.support.DynamicEntity in project molgenis by molgenis.
the class GoNLAnnotatorTest method testAnnotate3.
@Test
public void testAnnotate3() {
Entity entity3 = new DynamicEntity(emd);
entity3.set(VcfAttributes.CHROM, "1");
entity3.set(VcfAttributes.POS, 78383467);
entity3.set(VcfAttributes.REF, "G");
entity3.set(VcfAttributes.ALT, "A");
Iterator<Entity> results = annotator.annotate(Collections.singletonList(entity3));
assertTrue(results.hasNext());
Entity resultEntity = results.next();
assertFalse(results.hasNext());
assertEquals(resultEntity.get(GONL_GENOME_AF), "0.8674698795180723");
assertEquals(resultEntity.get(GONL_GENOME_GTC), "6|120|372");
}
use of org.molgenis.data.support.DynamicEntity in project molgenis by molgenis.
the class GoNLAnnotatorTest method testAnnotate7.
@Test
public void testAnnotate7() {
Entity entity7 = new DynamicEntity(emd);
entity7.set(VcfAttributes.CHROM, "15");
entity7.set(VcfAttributes.POS, 66641732);
entity7.set(VcfAttributes.REF, "G");
entity7.set(VcfAttributes.ALT, "A,C,T");
Iterator<Entity> results = annotator.annotate(Collections.singletonList(entity7));
assertTrue(results.hasNext());
Entity resultEntity = results.next();
assertFalse(results.hasNext());
assertEquals(resultEntity.get(GONL_GENOME_AF), ".,0.09538152610441768,.");
assertEquals(resultEntity.get(GONL_GENOME_GTC), ".,412|77|9,.");
}
use of org.molgenis.data.support.DynamicEntity in project molgenis by molgenis.
the class GoNLAnnotatorTest method testAnnotate12.
@Test
public void testAnnotate12() {
Entity entity12 = new DynamicEntity(emd);
entity12.set(VcfAttributes.CHROM, "2");
entity12.set(VcfAttributes.POS, 219142023);
entity12.set(VcfAttributes.REF, "G");
entity12.set(VcfAttributes.ALT, "A");
Iterator<Entity> results = annotator.annotate(Collections.singletonList(entity12));
assertTrue(results.hasNext());
Entity resultEntity = results.next();
assertFalse(results.hasNext());
assertEquals(resultEntity.get(GONL_GENOME_AF), "0.9969879518072289");
assertEquals(resultEntity.get(GONL_GENOME_GTC), "0|3|495");
}
use of org.molgenis.data.support.DynamicEntity in project molgenis by molgenis.
the class GoNLAnnotatorTest method testAnnotate15.
/**
* Test for bugfix where alt allele in resource was trimmed too much causing index out of bounds.
*/
@Test
public void testAnnotate15() {
Entity entity14 = new DynamicEntity(emd);
entity14.set(VcfAttributes.CHROM, "1");
entity14.set(VcfAttributes.POS, 28227207);
entity14.set(VcfAttributes.REF, "A");
entity14.set(VcfAttributes.ALT, "G");
Iterator<Entity> results = annotator.annotate(Collections.singletonList(entity14));
assertTrue(results.hasNext());
Entity resultEntity = results.next();
assertFalse(results.hasNext());
assertNull(resultEntity.get(GONL_GENOME_AF));
assertNull(resultEntity.get(GONL_GENOME_GTC));
}
use of org.molgenis.data.support.DynamicEntity in project molgenis by molgenis.
the class GoNLAnnotatorTest method testAnnotate9.
@Test
public void testAnnotate9() {
Entity entity9 = new DynamicEntity(emd);
entity9.set(VcfAttributes.CHROM, "X");
entity9.set(VcfAttributes.POS, 79943569);
entity9.set(VcfAttributes.REF, "T");
entity9.set(VcfAttributes.ALT, "C");
Iterator<Entity> results = annotator.annotate(Collections.singletonList(entity9));
assertTrue(results.hasNext());
Entity resultEntity = results.next();
assertFalse(results.hasNext());
assertEquals(resultEntity.get(GONL_GENOME_AF), "0.9989939637826962");
assertEquals(resultEntity.get(GONL_GENOME_GTC), "0|1|496");
}
Aggregations