use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsTest9.
@Test
public void filterResultsTest9() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), vcfAttributes);
Optional<Entity> result = filter.filterResults(Collections.singletonList(resultEntity7), entity7, false);
assertEquals(Lists.newArrayList(result.asSet()).get(0).getString("annotation"), "13");
}
use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsTest10.
@Test
public void filterResultsTest10() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), vcfAttributes);
Optional<Entity> result = filter.filterResults(Collections.singletonList(resultEntity8), entity8, false);
assertEquals(Lists.newArrayList(result.asSet()).get(0).getString("annotation"), "15");
}
use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsTest6.
@Test
public void filterResultsTest6() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), vcfAttributes);
Optional<Entity> result6 = filter.filterResults(Collections.singletonList(resultEntity2), entity2, false);
assertEquals(Lists.newArrayList(result6.asSet()).get(0).getString("annotation"), ".,2");
}
use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsMergeMultilineMismatchPos.
@Test
public void filterResultsMergeMultilineMismatchPos() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), true, vcfAttributes);
try {
filter.filterResults(Arrays.asList(entityMismatchPos, resultEntity10), entity10, false);
Assert.fail("Should throw exception for mismatching positions");
} catch (MolgenisDataException actual) {
assertEquals(actual.getMessage(), "Mismatch in location! Location{chrom=1, pos=101} vs Location{chrom=1, pos=100}");
}
}
use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsTest5.
@Test
public void filterResultsTest5() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), vcfAttributes);
Optional<Entity> result5 = filter.filterResults(Collections.singletonList(resultEntity5), entity3, false);
assertEquals(Lists.newArrayList(result5.asSet()).get(0).getString("annotation"), "8,9,7");
}
Aggregations