Package org.openbel.framework.common.index

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


                indexFile = resolvedResource.getCacheResourceCopy();
            }

            final ResourceIndex ri = ResourceIndex.INSTANCE;
            ri.loadIndex(indexFile);
            final Index index = ri.getIndex();


            final List<ResourceLocation> nsr = index.getNamespaceResources();
            final Map<String, NamespaceHeader> hvals;
            if (hasItems(nsr)) {
                hvals = new LinkedHashMap<String, NamespaceHeader>(index
                        .getNamespaceResources().size());
                for (ResourceLocation rl : index.getNamespaceResources()) {
                    String loc = rl.getResourceLocation();
                    ResolvedResource nsResource = c.resolveResource(
                            ResourceType.NAMESPACES, loc);
                    NamespaceHeader header = p.parseNamespace(loc,
                            nsResource.getCacheResourceCopy());
View Full Code Here


            reportable.error("Unable to load index");
            reportable.error("Reason: " + e.getMessage());
            bail(GENERAL_FAILURE);
        }

        Index index = ResourceIndex.INSTANCE.getIndex();
        cacheMgrService.updateResourceIndexInCache(index);
    }
View Full Code Here

        beginStage(PHASE3_STAGE1_HDR, "1", NUM_PHASES);

        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.");
View Full Code Here

        beginStage(PHASE3_STAGE2_HDR, "2", NUM_PHASES);

        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.");
View Full Code Here

        beginStage(PHASE3_STAGE3_HDR, "3", NUM_PHASES);

        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 ");
View Full Code Here

        }

        // create output directory for orthologized proto network
        artifactPath = createDirectoryArtifact(outputDirectory, DIR_ARTIFACT);

        final Index index = ResourceIndex.INSTANCE.getIndex();
        final Set<ResourceLocation> resources = index.getOrthologyResources();
        if (noItems(resources)) {
            final StringBuilder bldr = new StringBuilder();
            bldr.append("No orthology documents included.");
            markEndStage(bldr);
            stageOutput(bldr.toString());
View Full Code Here

        return pn;
    }

    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

            throws EquivalenceMapResolutionFailure {

        Set<EquivalenceDataIndex> equivalenceDataIndexSet =
                new HashSet<EquivalenceDataIndex>();

        Index resourceIndex = ResourceIndex.INSTANCE.getIndex();

        if (hasItems(resourceIndex.getEquivalenceResources())) {
            for (Equivalence eqResource : resourceIndex
                    .getEquivalenceResources()) {
                String eqLocation = eqResource.getResourceLocation();
                try {
                    ResolvedResource resolved = cache.resolveResource(
                            ResourceType.EQUIVALENCES,
View Full Code Here

TOP

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

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.