use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsMergeMultilineMismatchChrom.
@Test
public void filterResultsMergeMultilineMismatchChrom() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), true, vcfAttributes);
try {
filter.filterResults(Arrays.asList(resultEntity10, entityMismatchChrom), entity10, false);
Assert.fail("Should throw exception for mismatching chromosomes");
} catch (MolgenisDataException actual) {
assertEquals(actual.getMessage(), "Mismatch in location! Location{chrom=1, pos=100} vs Location{chrom=2, pos=100}");
}
}
use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsTest2.
@Test
public void filterResultsTest2() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), vcfAttributes);
Optional<Entity> result2 = filter.filterResults(Collections.singletonList(resultEntity2), entity1, false);
Assert.assertTrue(Lists.newArrayList(result2.asSet()).size() == 0);
}
use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsTest4.
@Test
public void filterResultsTest4() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), vcfAttributes);
Optional<Entity> result4 = filter.filterResults(Collections.singletonList(resultEntity4), entity2, false);
assertEquals(Lists.newArrayList(result4.asSet()).get(0).getString("annotation"), "6,5");
}
use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class MultiAllelicResultFilterTest method filterResultsTest3.
@Test
public void filterResultsTest3() {
MultiAllelicResultFilter filter = new MultiAllelicResultFilter(Collections.singletonList(attributeFactory.create().setName("annotation").setDataType(STRING)), vcfAttributes);
Optional<Entity> result3 = filter.filterResults(Collections.singletonList(resultEntity3), entity2, false);
assertEquals(Lists.newArrayList(result3.asSet()).get(0).getString("annotation"), "3,4");
}
use of org.molgenis.data.annotation.core.filter.MultiAllelicResultFilter in project molgenis by molgenis.
the class DannAnnotator method init.
@Override
public void init() {
List<Attribute> attributes = createDannOutputAttributes();
AnnotatorInfo dannInfo = AnnotatorInfo.create(AnnotatorInfo.Status.READY, AnnotatorInfo.Type.PATHOGENICITY_ESTIMATE, NAME, "Annotating genetic variants, especially non-coding variants, " + "for the purpose of identifying pathogenic variants remains a challenge." + " Combined annotation-dependent depletion (CADD) is an al- gorithm designed " + "to annotate both coding and non-coding variants, and has been shown to outper- form " + "other annotation algorithms. CADD trains a linear kernel support vector machine (SVM) " + "to dif- ferentiate evolutionarily derived, likely benign, alleles from simulated, " + "likely deleterious, variants. However, SVMs cannot capture non-linear relationships" + " among the features, which can limit performance. To address this issue, we have" + " developed DANN. DANN uses the same feature set and training data as CADD to train" + " a deep neural network (DNN). DNNs can capture non-linear relation- ships among " + "features and are better suited than SVMs for problems with a large number of samples " + "and features. We exploit Compute Unified Device Architecture-compatible " + "graphics processing units and deep learning techniques such as dropout and momentum " + "training to accelerate the DNN training. DANN achieves about a 19%relative reduction " + "in the error rate and about a 14%relative increase in the area under the curve (AUC) metric " + "over CADD’s SVM methodology. " + "All data and source code are available at https://cbcl.ics.uci.edu/ public_data/DANN/.", attributes);
EntityAnnotator entityAnnotator = new AbstractAnnotator(DANN_TABIX_RESOURCE, dannInfo, new LocusQueryCreator(vcfAttributes), new MultiAllelicResultFilter(attributes, vcfAttributes), dataService, resources, new SingleFileLocationCmdLineAnnotatorSettingsConfigurer(DANN_LOCATION, dannAnnotatorSettings)) {
@Override
public List<Attribute> createAnnotatorAttributes(AttributeFactory attributeFactory) {
return createDannOutputAttributes();
}
};
annotator.init(entityAnnotator);
}
Aggregations