Search in sources :

Example 1 with ArrayDesignProbeMapperService

use of ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignProbeMapperService in project Gemma by PavlidisLab.

the class CompositeSequenceGeneMapperServiceTest method blatCollapsedSequences.

private void blatCollapsedSequences() throws IOException {
    Taxon taxon = taxonService.findByScientificName("Homo sapiens");
    ArrayDesignSequenceAlignmentService aligner = this.getBean(ArrayDesignSequenceAlignmentService.class);
    InputStream blatResultInputStream = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/genome/gpl96.blatresults.psl.gz"));
    Collection<BlatResult> results = blat.processPsl(blatResultInputStream, taxon);
    aligner.processArrayDesign(ad, taxon, results);
    // real stuff.
    ArrayDesignProbeMapperService arrayDesignProbeMapperService = this.getBean(ArrayDesignProbeMapperService.class);
    arrayDesignProbeMapperService.processArrayDesign(ad);
}
Also used : GZIPInputStream(java.util.zip.GZIPInputStream) ArrayDesignSequenceAlignmentService(ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignSequenceAlignmentService) GZIPInputStream(java.util.zip.GZIPInputStream) InputStream(java.io.InputStream) Taxon(ubic.gemma.model.genome.Taxon) ArrayDesignProbeMapperService(ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignProbeMapperService) BlatResult(ubic.gemma.model.genome.sequenceAnalysis.BlatResult)

Example 2 with ArrayDesignProbeMapperService

use of ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignProbeMapperService in project Gemma by PavlidisLab.

the class ArrayDesignProbeMapperCli method processOptions.

/**
 * See 'configure' for how the other options are handled. (non-Javadoc)
 *
 * @see ArrayDesignSequenceManipulatingCli#processOptions()
 */
@Override
protected void processOptions() {
    super.processOptions();
    arrayDesignProbeMapperService = this.getBean(ArrayDesignProbeMapperService.class);
    TaxonService taxonService = this.getBean(TaxonService.class);
    if (this.hasOption(AbstractCLI.THREADS_OPTION)) {
        this.numThreads = this.getIntegerOptionValue("threads");
    }
    if (this.hasOption("import")) {
        if (!this.hasOption('t')) {
            throw new IllegalArgumentException("You must provide the taxon when using the import option");
        }
        if (!this.hasOption("source")) {
            throw new IllegalArgumentException("You must provide source database name when using the import option");
        }
        String sourceDBName = this.getOptionValue("source");
        ExternalDatabaseService eds = this.getBean(ExternalDatabaseService.class);
        this.sourceDatabase = eds.findByName(sourceDBName);
        this.directAnnotationInputFileName = this.getOptionValue("import");
        if (this.hasOption("ncbi")) {
            this.ncbiIds = true;
        }
    }
    if (this.hasOption('t')) {
        this.taxon = this.setTaxonByName(taxonService);
    }
    if (this.hasOption("nodb")) {
        this.useDB = false;
    }
    if (this.hasOption("probes")) {
        if (this.arrayDesignsToProcess == null || this.arrayDesignsToProcess.size() > 1) {
            throw new IllegalArgumentException("With '-probes' you must provide exactly one platform");
        }
        this.useDB = false;
        probeNames = this.getOptionValue("probes").split(",");
        if (probeNames.length == 0) {
            throw new IllegalArgumentException("You must provide at least one probe name when using '-probes'");
        }
    }
}
Also used : ExternalDatabaseService(ubic.gemma.persistence.service.common.description.ExternalDatabaseService) TaxonService(ubic.gemma.persistence.service.genome.taxon.TaxonService) ArrayDesignProbeMapperService(ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignProbeMapperService)

Aggregations

ArrayDesignProbeMapperService (ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignProbeMapperService)2 InputStream (java.io.InputStream)1 GZIPInputStream (java.util.zip.GZIPInputStream)1 ArrayDesignSequenceAlignmentService (ubic.gemma.core.loader.expression.arrayDesign.ArrayDesignSequenceAlignmentService)1 Taxon (ubic.gemma.model.genome.Taxon)1 BlatResult (ubic.gemma.model.genome.sequenceAnalysis.BlatResult)1 ExternalDatabaseService (ubic.gemma.persistence.service.common.description.ExternalDatabaseService)1 TaxonService (ubic.gemma.persistence.service.genome.taxon.TaxonService)1