Search in sources :

Example 1 with RepeatScan

use of ubic.gemma.core.analysis.sequence.RepeatScan in project Gemma by PavlidisLab.

the class ArrayDesignRepeatScanCli method processArrayDesign.

private void processArrayDesign(ArrayDesign design) {
    ArrayDesign thawed = this.thaw(design);
    // no taxon is passed to this method so all sequences will be retrieved even for multi taxon arrays
    Collection<BioSequence> sequences = ArrayDesignSequenceAlignmentServiceImpl.getSequences(thawed);
    RepeatScan scanner = new RepeatScan();
    Collection<BioSequence> altered;
    if (this.inputFileName != null) {
        altered = scanner.processRepeatMaskerOutput(sequences, inputFileName);
    } else {
        altered = scanner.repeatScan(sequences);
    }
    AbstractCLI.log.info("Saving...");
    bsService.update(altered);
    if (this.inputFileName != null) {
        this.audit(thawed, "Repeat scan data from file: " + inputFileName + ", updated " + altered.size() + " sequences.");
    } else {
        this.audit(thawed, "Repeat scan done, updated " + altered.size() + " sequences.");
    }
    AbstractCLI.log.info("Done with " + thawed);
}
Also used : BioSequence(ubic.gemma.model.genome.biosequence.BioSequence) ArrayDesign(ubic.gemma.model.expression.arrayDesign.ArrayDesign) RepeatScan(ubic.gemma.core.analysis.sequence.RepeatScan)

Example 2 with RepeatScan

use of ubic.gemma.core.analysis.sequence.RepeatScan in project Gemma by PavlidisLab.

the class ArrayDesignRepeatScanTaskImpl method execute.

@Override
public TaskResult execute() {
    ArrayDesign ad = taskCommand.getArrayDesign();
    ad = arrayDesignService.thaw(ad);
    Collection<BioSequence> sequences = ArrayDesignSequenceAlignmentServiceImpl.getSequences(ad);
    RepeatScan scanner = new RepeatScan();
    scanner.repeatScan(sequences);
    return new TaskResult(taskCommand, new ModelAndView(new RedirectView("/", true)));
}
Also used : BioSequence(ubic.gemma.model.genome.biosequence.BioSequence) ArrayDesign(ubic.gemma.model.expression.arrayDesign.ArrayDesign) RepeatScan(ubic.gemma.core.analysis.sequence.RepeatScan) ModelAndView(org.springframework.web.servlet.ModelAndView) RedirectView(org.springframework.web.servlet.view.RedirectView) TaskResult(ubic.gemma.core.job.TaskResult)

Aggregations

RepeatScan (ubic.gemma.core.analysis.sequence.RepeatScan)2 ArrayDesign (ubic.gemma.model.expression.arrayDesign.ArrayDesign)2 BioSequence (ubic.gemma.model.genome.biosequence.BioSequence)2 ModelAndView (org.springframework.web.servlet.ModelAndView)1 RedirectView (org.springframework.web.servlet.view.RedirectView)1 TaskResult (ubic.gemma.core.job.TaskResult)1