Package org.openbel.framework.common.index

Examples of org.openbel.framework.common.index.ResourceLocation


        final StringBuilder bldr = new StringBuilder();

        // Load the pfam resource from the resource index.
        Index resourceIndex = ResourceIndex.INSTANCE.getIndex();
        ResourceLocation pfResource = resourceIndex.getProteinFamilyResource();

        if (pfResource == null || pfResource.getResourceLocation() == null) {
            getPhaseConfiguration().setInjectProteinFamilies(false);
            stageError("Resource location for protein family is not set in " +
                    "resource index, disabling protein family expansion.");
            markEndStage(bldr);
            return pn;
        }

        if (!withProteinFamilyInjection()) {
            bldr.append(PF_INJECTION_DISABLED);
            markEndStage(bldr);
            stageOutput(bldr.toString());
            return pn;
        }

        String pfLocation = pfResource.getResourceLocation();
        File pfamResource = null;
        final ResourceType pfamType = fromLocation(pfLocation);
        try {
            ResolvedResource resolvedResource =
                    cache.resolveResource(pfamType, pfLocation);
View Full Code Here


        final StringBuilder bldr = new StringBuilder();

        // Load the named complexes resource from the resource index.
        Index resourceIndex = ResourceIndex.INSTANCE.getIndex();
        ResourceLocation ncResource = resourceIndex.getNamedComplexesResource();

        if (ncResource == null || ncResource.getResourceLocation() == null) {
            getPhaseConfiguration().setInjectNamedComplexes(false);
            stageError("Resource location for named complexes is not set " +
                    "in resource index, disabling named complex expansion.");
            markEndStage(bldr);
            return pn;
        }

        if (!withNamedComplexInjection()) {
            bldr.append(NC_INJECTION_DISABLED);
            markEndStage(bldr);
            stageOutput(bldr.toString());
            return pn;
        }

        String ncLocation = ncResource.getResourceLocation();
        File ncFile = null;
        final ResourceType ncType = fromLocation(ncLocation);
        try {
            ResolvedResource resolvedResource = cache.resolveResource(
                    ncType, ncLocation);
View Full Code Here

        final StringBuilder bldr = new StringBuilder();

        // Load the gene scaffolding resource from the resource index.
        Index resourceIndex = ResourceIndex.INSTANCE.getIndex();
        ResourceLocation gsResource =
                resourceIndex.getGeneScaffoldingResource();

        if (gsResource == null || gsResource.getResourceLocation() == null) {
            getPhaseConfiguration().setInjectGeneScaffolding(false);
            bldr.append("Resource location for gene scaffolding is not set ");
            bldr.append("in resource index, disabling gene scaffolding ");
            bldr.append("expansion.");
            stageError(bldr.toString());
            markEndStage(bldr);
            return pn;
        }

        if (!withGeneScaffoldingInjection()) {
            bldr.append(GS_INJECTION_DISABLED);
            markEndStage(bldr);
            stageOutput(bldr.toString());
            return pn;
        }

        // TODO Timing for cache resolving.
        String gsloc = gsResource.getResourceLocation();
        File gsFile = null;
        final ResourceType gsType = fromLocation(gsloc);
        try {
            ResolvedResource resolvedResource = cache.resolveResource(gsType,
                    gsloc);
View Full Code Here

        } catch (IOException e) {
        }

        final Iterator<ResourceLocation> it = resources.iterator();

        final ResourceLocation first = it.next();
        final ProtoNetwork orthoMerge = pruneResource(pn, first);

        while (it.hasNext()) {
            final ResourceLocation resource = it.next();
            final ProtoNetwork opn = pruneResource(pn, resource);

            try {
                p3.merge(orthoMerge, opn);
            } catch (ProtoNetworkError e) {
View Full Code Here

    }

    private void runPhaseThree(final ProtoNetwork orthoPn)
            throws ProtoNetworkError {
        final Index resourceIndex = ResourceIndex.INSTANCE.getIndex();
        final ResourceLocation pfResource = resourceIndex
                .getProteinFamilyResource();

        final Document pfdoc = readResource(pfResource);
        p3.pruneFamilies(false, pfdoc, orthoPn);
        p3.inferFamilies(pfdoc, orthoPn);
        final ProtoNetwork pfpn = p3.compile(pfdoc);
        p3.merge(orthoPn, pfpn);

        final ResourceLocation ncResource = resourceIndex
                .getNamedComplexesResource();
        final Document ncdoc = readResource(ncResource);
        p3.pruneComplexes(false, ncdoc, orthoPn);
        final ProtoNetwork ncpn = p3.compile(ncdoc);
        p3.merge(orthoPn, ncpn);

        final ResourceLocation gsResource = resourceIndex
                .getGeneScaffoldingResource();
        final Document gsdoc = readResource(gsResource);
        p3.pruneGene(gsdoc, orthoPn);
        final ProtoNetwork gspn = p3.compile(gsdoc);
        p3.merge(orthoPn, gspn);
View Full Code Here

TOP

Related Classes of org.openbel.framework.common.index.ResourceLocation

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.