Search in sources :

Example 1 with ClinvarMultiAllelicResultFilter

use of org.molgenis.data.annotation.core.filter.ClinvarMultiAllelicResultFilter in project molgenis by molgenis.

the class ClinvarAnnotator method init.

@Override
public void init() {
    List<Attribute> attributes = createClinvarOutputAttributes();
    AnnotatorInfo clinvarInfo = AnnotatorInfo.create(Status.READY, AnnotatorInfo.Type.PATHOGENICITY_ESTIMATE, NAME, " ClinVar is a freely accessible, public archive of reports of the relationships" + " among human variations and phenotypes, with supporting evidence. ClinVar thus facilitates" + " access to and communication about the relationships asserted between human variation and " + "observed health status, and the history of that interpretation. ClinVar collects reports " + "of variants found in patient samples, assertions made regarding their clinical significance, " + "information about the submitter, and other supporting data. The alleles described in submissions " + "are mapped to reference sequences, and reported according to the HGVS standard. ClinVar then " + "presents the data for interactive users as well as those wishing to use ClinVar in daily " + "workflows and other local applications. ClinVar works in collaboration with interested " + "organizations to meet the needs of the medical genetics community as efficiently and effectively " + "as possible. Information about using ClinVar is available at: http://www.ncbi.nlm.nih.gov/clinvar/docs/help/.", attributes);
    LocusQueryCreator locusQueryCreator = new LocusQueryCreator(vcfAttributes);
    ClinvarMultiAllelicResultFilter clinvarMultiAllelicResultFilter = new ClinvarMultiAllelicResultFilter(vcfAttributes);
    EntityAnnotator entityAnnotator = new AbstractAnnotator(CLINVAR_TABIX_RESOURCE, clinvarInfo, locusQueryCreator, clinvarMultiAllelicResultFilter, dataService, resources, new SingleFileLocationCmdLineAnnotatorSettingsConfigurer(CLINVAR_LOCATION, clinvarAnnotatorSettings)) {

        @Override
        public List<Attribute> createAnnotatorAttributes(AttributeFactory attributeFactory) {
            return createClinvarOutputAttributes();
        }

        @Override
        protected Object getResourceAttributeValue(Attribute attr, Entity sourceEntity) {
            String attrName;
            if (CLINVAR_CLNSIG.equals(attr.getName())) {
                attrName = CLINVAR_CLNSIG_ResourceAttributeName;
            } else if (CLINVAR_CLNALLE.equals(attr.getName())) {
                attrName = CLINVAR_CLINALL_ResourceAttributeName;
            } else {
                attrName = attr.getName();
            }
            return sourceEntity.get(attrName);
        }
    };
    annotator.init(entityAnnotator);
}
Also used : LocusQueryCreator(org.molgenis.data.annotation.core.query.LocusQueryCreator) Entity(org.molgenis.data.Entity) Attribute(org.molgenis.data.meta.model.Attribute) EntityAnnotator(org.molgenis.data.annotation.core.entity.EntityAnnotator) ClinvarMultiAllelicResultFilter(org.molgenis.data.annotation.core.filter.ClinvarMultiAllelicResultFilter) AbstractAnnotator(org.molgenis.data.annotation.core.entity.impl.framework.AbstractAnnotator) AnnotatorInfo(org.molgenis.data.annotation.core.entity.AnnotatorInfo) AttributeFactory(org.molgenis.data.meta.model.AttributeFactory) SingleFileLocationCmdLineAnnotatorSettingsConfigurer(org.molgenis.data.annotation.web.settings.SingleFileLocationCmdLineAnnotatorSettingsConfigurer)

Aggregations

Entity (org.molgenis.data.Entity)1 AnnotatorInfo (org.molgenis.data.annotation.core.entity.AnnotatorInfo)1 EntityAnnotator (org.molgenis.data.annotation.core.entity.EntityAnnotator)1 AbstractAnnotator (org.molgenis.data.annotation.core.entity.impl.framework.AbstractAnnotator)1 ClinvarMultiAllelicResultFilter (org.molgenis.data.annotation.core.filter.ClinvarMultiAllelicResultFilter)1 LocusQueryCreator (org.molgenis.data.annotation.core.query.LocusQueryCreator)1 SingleFileLocationCmdLineAnnotatorSettingsConfigurer (org.molgenis.data.annotation.web.settings.SingleFileLocationCmdLineAnnotatorSettingsConfigurer)1 Attribute (org.molgenis.data.meta.model.Attribute)1 AttributeFactory (org.molgenis.data.meta.model.AttributeFactory)1