Search in sources :

Example 1 with BasePairQuantitation

use of uk.ac.babraham.SeqMonk.Quantitation.BasePairQuantitation in project SeqMonk by s-andrews.

the class WigglePipeline method startPipeline.

protected void startPipeline() {
    // We first need to generate probes over all of the features listed in
    // the feature types.  The probes should cover the whole area of the
    // feature regardless of where it splices.
    boolean logTransform = optionsPanel.logTransform();
    boolean correctTotal = optionsPanel.correctTotal();
    int probeSize = optionsPanel.probeSize();
    int stepSize = optionsPanel.stepSize();
    super.progressUpdated("Making probes", 0, 1);
    Probe[] probes = null;
    String region = optionsPanel.getRegion();
    try {
        if (region.equals("Whole Genome")) {
            probes = makeGenomeProbes(probeSize, stepSize);
        } else if (region.equals("Current Chromosome")) {
            probes = makeChromosomeProbes(DisplayPreferences.getInstance().getCurrentChromosome(), probeSize, stepSize);
        } else if (region.equals("Currently Visible Region")) {
            probes = makeVisibleProbes(DisplayPreferences.getInstance().getCurrentChromosome(), SequenceRead.start(DisplayPreferences.getInstance().getCurrentLocation()), SequenceRead.end(DisplayPreferences.getInstance().getCurrentLocation()), probeSize, stepSize);
        }
    } catch (SeqMonkException sme) {
        progressExceptionReceived(sme);
        return;
    }
    collection().setProbeSet(new ProbeSet("Wiggle probes", probes));
    // method from inside the pipeline rather than doing this again ourselves.
    if (cancel) {
        progressCancelled();
        return;
    }
    bpq = new BasePairQuantitation(application);
    bpq.addProgressListener(this);
    bpq.quantitate(collection(), data, QuantitationStrandType.getTypeOptions()[0], correctTotal, false, false, false, logTransform, false);
}
Also used : ProbeSet(uk.ac.babraham.SeqMonk.DataTypes.Probes.ProbeSet) BasePairQuantitation(uk.ac.babraham.SeqMonk.Quantitation.BasePairQuantitation) SeqMonkException(uk.ac.babraham.SeqMonk.SeqMonkException) Probe(uk.ac.babraham.SeqMonk.DataTypes.Probes.Probe)

Aggregations

Probe (uk.ac.babraham.SeqMonk.DataTypes.Probes.Probe)1 ProbeSet (uk.ac.babraham.SeqMonk.DataTypes.Probes.ProbeSet)1 BasePairQuantitation (uk.ac.babraham.SeqMonk.Quantitation.BasePairQuantitation)1 SeqMonkException (uk.ac.babraham.SeqMonk.SeqMonkException)1