Search in sources :

Example 1 with StringProteinInteractionLoader

use of ubic.gemma.core.loader.protein.StringProteinInteractionLoader in project Gemma by PavlidisLab.

the class StringProteinLoadCli method loadProteinProteinInteractions.

/**
 * Method to wrap call to loader. Ensures that all spring beans are configured.
 *
 * @throws IOException IO problems
 */
// Possible external use
@SuppressWarnings({ "unused", "WeakerAccess" })
public void loadProteinProteinInteractions() throws IOException {
    StringProteinInteractionLoader loader = new StringProteinInteractionLoader();
    GeneService geneService = this.getBean(GeneService.class);
    ExternalDatabaseService externalDatabaseService = this.getBean(ExternalDatabaseService.class);
    // set all the loaders
    if (this.getPersisterHelper() == null || geneService == null || externalDatabaseService == null) {
        throw new RuntimeException("Spring configuration problem");
    }
    loader.setPersisterHelper(this.getPersisterHelper());
    loader.setGeneService(geneService);
    loader.setExternalDatabaseService(externalDatabaseService);
    Collection<Taxon> taxa = this.getValidTaxon();
    // some of these parameters can be null
    loader.load(stringProteinProteinFileNameLocal, stringProteinProteinFileNameRemote, biomartFileName, taxa);
}
Also used : GeneService(ubic.gemma.core.genome.gene.service.GeneService) ExternalDatabaseService(ubic.gemma.persistence.service.common.description.ExternalDatabaseService) StringProteinInteractionLoader(ubic.gemma.core.loader.protein.StringProteinInteractionLoader) Taxon(ubic.gemma.model.genome.Taxon)

Aggregations

GeneService (ubic.gemma.core.genome.gene.service.GeneService)1 StringProteinInteractionLoader (ubic.gemma.core.loader.protein.StringProteinInteractionLoader)1 Taxon (ubic.gemma.model.genome.Taxon)1 ExternalDatabaseService (ubic.gemma.persistence.service.common.description.ExternalDatabaseService)1