Commit a0579e22 authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 2.3.3

parent 08fe4267
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ class ResultCollector(object):

    def _run(self):
        self.onStart()

        try:
            sentinelsReceived = 0
            while sentinelsReceived < options.numWorkers:
                result = self._resultsQueue.get()
@@ -30,8 +30,14 @@ class ResultCollector(object):
                    sentinelsReceived += 1
                else:
                    self.onResult(result)

        finally:
            # Even on error, we want the files to be closed.
            # Otherwise, e.g., we could end up with empty .gz files,
            # which are invalid.
            # And for debugging, we should see the current state of output.
            # This will run even on KeyboardInterrupt.
            self.onFinish()
        logging.info("Analysis completed.")

    def run(self):
        if options.doProfiling:
@@ -80,7 +86,6 @@ class ResultCollector(object):
        self._flushContigIfCompleted(window)

    def onFinish(self):
        logging.info("Analysis completed.")
        if self.fastaWriter: self.fastaWriter.close()
        if self.fastqWriter: self.fastqWriter.close()
        if self.gffWriter:   self.gffWriter.close()
+1 −1
Original line number Diff line number Diff line
# Author: David Alexander, David Seifert
from __future__ import absolute_import, division, print_function

__VERSION__ = '2.3.2'  # don't forget to update setup.py and doc/conf.py too
__VERSION__ = '2.3.3'  # don't forget to update setup.py and doc/conf.py too
+3 −6
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ from ..ResultCollector import ResultCollectorProcess, ResultCollectorThread

from GenomicConsensus.consensus import Consensus, ArrowConsensus, join
from GenomicConsensus.windows import kSpannedIntervals, holes, subWindow
from GenomicConsensus.variants import filterVariants, annotateVariants
from GenomicConsensus.variants import annotateVariants
from GenomicConsensus.arrow import diploid
from GenomicConsensus.utils import die

@@ -99,14 +99,11 @@ def consensusAndVariantsForWindow(alnFile, refWindow, referenceContig,
                                                            options.aligner, ai=None,
                                                            diploid=arrowConfig.polishDiploid)

            filteredVars =  filterVariants(options.minCoverage,
                                           options.minConfidence,
                                           variants_)
            # Annotate?
            if options.annotateGFF:
                annotateVariants(filteredVars, clippedAlns)
                annotateVariants(variants_, clippedAlns)

            variants += filteredVars
            variants += variants_

            # The nascent consensus sequence might contain ambiguous bases, these
            # need to be removed as software in the wild cannot deal with such
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ class ArrowConfig(object):
                 computeConfidence=True,
                 readStumpinessThreshold=0.1,
                 minReadScore=0.75,
                 minHqRegionSnr=3.75,
                 minHqRegionSnr=2.5,
                 minZScore=-3.5,
                 minAccuracy=0.82,
                 maskRadius=0,
+5 −1
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ class VariantsGffWriter(object):

    def __init__(self, f, optionsDict, referenceEntries):
        self._gffWriter = GffWriter(f)
        self._minConfidence = optionsDict["minConfidence"]
        self._minCoverage = optionsDict["minCoverage"]

        self._gffWriter.writeHeader("##pacbio-variant-version 2.1")
        self._gffWriter.writeHeader("##date %s" % time.ctime())
        self._gffWriter.writeHeader("##feature-ontology %s" % self.ONTOLOGY_URL)
@@ -61,6 +64,7 @@ class VariantsGffWriter(object):

    def writeVariants(self, variants):
        for var in variants:
            if var.coverage >= self._minCoverage and var.confidence >= self._minConfidence:
                self._gffWriter.writeRecord(toGffRecord(var))

    def close(self):
Loading