[med-svn] [Git][med-team/pbgenomicconsensus][upstream] New upstream version 2.3.3

Andreas Tille gitlab at salsa.debian.org
Wed Dec 18 15:55:41 GMT 2019



Andreas Tille pushed to branch upstream at Debian Med / pbgenomicconsensus


Commits:
a0579e22 by Andreas Tille at 2019-12-18T15:36:57Z
New upstream version 2.3.3
- - - - -


27 changed files:

- GenomicConsensus/ResultCollector.py
- GenomicConsensus/__init__.py
- GenomicConsensus/arrow/arrow.py
- GenomicConsensus/arrow/model.py
- GenomicConsensus/io/VariantsGffWriter.py
- GenomicConsensus/io/VariantsVcfWriter.py
- GenomicConsensus/options.py
- GenomicConsensus/poa/poa.py
- GenomicConsensus/quiver/quiver.py
- GenomicConsensus/variants.py
- LICENSES → LICENSE
- MANIFEST.in
- README.md
- bamboo_build.sh
- bin/gffToBed
- doc/conf.py
- scripts/ci/build.sh
- + scripts/ci/setup.sh
- + scripts/ci/test.sh
- − scripts/nightly/build.sh
- − scripts/nightly/test.sh
- setup.py
- tests/cram/arrow-all4mer-diploid.t
- tests/cram/internal/quiver-ecoli.t
- tests/cram/quiver-noqvs-test.t
- tests/cram/version.t
- tests/unit/test_summarize_consensus.py


Changes:

=====================================
GenomicConsensus/ResultCollector.py
=====================================
@@ -22,16 +22,22 @@ class ResultCollector(object):
 
     def _run(self):
         self.onStart()
-
-        sentinelsReceived = 0
-        while sentinelsReceived < options.numWorkers:
-            result = self._resultsQueue.get()
-            if result is None:
-                sentinelsReceived += 1
-            else:
-                self.onResult(result)
-
-        self.onFinish()
+        try:
+            sentinelsReceived = 0
+            while sentinelsReceived < options.numWorkers:
+                result = self._resultsQueue.get()
+                if result is None:
+                    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()


=====================================
GenomicConsensus/__init__.py
=====================================
@@ -1,4 +1,4 @@
 # 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


=====================================
GenomicConsensus/arrow/arrow.py
=====================================
@@ -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


=====================================
GenomicConsensus/arrow/model.py
=====================================
@@ -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,


=====================================
GenomicConsensus/io/VariantsGffWriter.py
=====================================
@@ -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,7 +64,8 @@ class VariantsGffWriter(object):
 
     def writeVariants(self, variants):
         for var in variants:
-            self._gffWriter.writeRecord(toGffRecord(var))
+            if var.coverage >= self._minCoverage and var.confidence >= self._minConfidence:
+                self._gffWriter.writeRecord(toGffRecord(var))
 
     def close(self):
         self._gffWriter.close()


=====================================
GenomicConsensus/io/VariantsVcfWriter.py
=====================================
@@ -21,8 +21,11 @@ class VariantsVcfWriter(object):
 
     def __init__(self, f, optionsDict, referenceEntries):
         self._vcfFile = open(f, "w")
+        self._minConfidence = optionsDict["minConfidence"]
+        self._minCoverage = optionsDict["minCoverage"]
+
         print(dedent('''\
-            ##fileformat=VCFv4.3
+            ##fileformat=VCFv4.2
             ##fileDate={date}
             ##source=GenomicConsensusV{version}
             ##reference={reference}''').format(
@@ -37,6 +40,26 @@ class VariantsVcfWriter(object):
                 length=entry.length
                 # TODO(lhepler): evaluate adding md5 hexdigest here on large genomes
                 ), file=self._vcfFile)
+        print('##INFO=<ID=DP,Number=1,Type=Integer,Description="Approximate read depth; some reads may have been filtered">',
+              file=self._vcfFile)
+        if optionsDict["diploid"]:
+            print('##INFO=<ID=AF,Number=A,Type=Float,Description="Allele Frequency">',
+                  file=self._vcfFile)
+
+        # filters
+        self._minConfidenceFilterID = 'q{}'.format(self._minConfidence)
+        if self._minConfidence > 0:
+            print('##FILTER=<ID={id},Description="Quality below {confidence}">'.format(
+                id=self._minConfidenceFilterID,
+                confidence=self._minConfidence
+                ), file=self._vcfFile)
+        self._minCoverageFilterID = 'c{}'.format(self._minCoverage)
+        if self._minCoverage > 0:
+            print('##FILTER=<ID={id},Description="Coverage below {coverage}">'.format(
+                id=self._minCoverageFilterID,
+                coverage=self._minCoverage
+                ), file=self._vcfFile)
+
         print("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO", file=self._vcfFile)
 
     def writeVariants(self, variants):
@@ -79,6 +102,15 @@ class VariantsVcfWriter(object):
             info = "DP={0}".format(var.coverage)
             if freq:
                 info = info + ";" + freq
+
+            # failed filters
+            failedFilters = []
+            if var.confidence < self._minConfidence:
+                failedFilters.append(self._minConfidenceFilterID)
+            if var.coverage < self._minCoverage:
+                failedFilters.append(self._minCoverageFilterID)
+            filterText = ";".join(failedFilters) if failedFilters else "PASS"
+
             print("{chrom}\t{pos}\t{id}\t{ref}\t{alt}\t{qual}\t{filter}\t{info}".format(
                 chrom=reference.idToFullName(var.refId),
                 pos=pos,
@@ -86,7 +118,7 @@ class VariantsVcfWriter(object):
                 ref=ref,
                 alt=alt,
                 qual=var.confidence,
-                filter="PASS",
+                filter=filterText,
                 info=info), file=self._vcfFile)
 
     def close(self):


=====================================
GenomicConsensus/options.py
=====================================
@@ -59,7 +59,7 @@ class Constants(object):
     DEFAULT_MAX_COVERAGE = 100
     DEFAULT_MIN_MAPQV = 10
     DEFAULT_MIN_READSCORE = 0.65
-    DEFAULT_MIN_HQREGIONSNR = 3.75
+    DEFAULT_MIN_HQREGIONSNR = 2.5
     DEFAULT_MIN_ZSCORE = -3.5
     DEFAULT_MIN_ACCURACY = 0.82
     DEFAULT_MASK_RADIUS = 3


=====================================
GenomicConsensus/poa/poa.py
=====================================
@@ -11,7 +11,7 @@ from .. import reference
 from ..options import options
 from ..consensus import Consensus, join
 from ..windows import kSpannedIntervals, holes, subWindow
-from ..variants import Variant, filterVariants, annotateVariants
+from ..variants import Variant, annotateVariants
 from ..Worker import WorkerProcess, WorkerThread
 from ..ResultCollector import ResultCollectorProcess, ResultCollectorThread
 from ..arrow.utils import variantsFromAlignment
@@ -32,7 +32,7 @@ class PoaConfig(object):
                  noEvidenceConsensus="nocall",
                  readStumpinessThreshold=0.1,
                  minReadScore=0.75,
-                 minHqRegionSnr=3.75):
+                 minHqRegionSnr=2.5):
         self.aligner                    = aligner
         self.minMapQV                   = minMapQV
         self.minPoaCoverage             = minPoaCoverage
@@ -191,14 +191,11 @@ def poaConsensusAndVariants(alnFile, refWindow, referenceContig,
                     consensusAndVariantsForAlignments(subWin, intRefSeq,
                                                       clippedAlns, poaConfig)
 
-            filteredVars =  filterVariants(options.minCoverage,
-                                           options.minConfidence,
-                                           variants_)
             # Annotate?
             if options.annotateGFF:
-                annotateVariants(filteredVars, clippedAlns)
+                annotateVariants(variants_, clippedAlns)
 
-            variants += filteredVars
+            variants += variants_
         else:
             css = Consensus.noCallConsensus(poaConfig.noEvidenceConsensus,
                                             subWin, intRefSeq)


=====================================
GenomicConsensus/quiver/quiver.py
=====================================
@@ -11,7 +11,7 @@ from ..ResultCollector import ResultCollectorProcess, ResultCollectorThread
 
 from GenomicConsensus.consensus import Consensus, QuiverConsensus, join
 from GenomicConsensus.windows import kSpannedIntervals, holes, subWindow
-from GenomicConsensus.variants import filterVariants, annotateVariants
+from GenomicConsensus.variants import annotateVariants
 from GenomicConsensus.quiver import diploid
 
 import GenomicConsensus.quiver.model as M
@@ -99,14 +99,11 @@ def consensusAndVariantsForWindow(cmpH5, refWindow, referenceContig,
                                                     options.aligner,
                                                     mms=None)
 
-            filteredVars =  filterVariants(options.minCoverage,
-                                           options.minConfidence,
-                                           variants_)
             # Annotate?
             if options.annotateGFF:
-                annotateVariants(filteredVars, clippedAlns)
+                annotateVariants(variants_, clippedAlns)
 
-            variants += filteredVars
+            variants += variants_
         else:
             css = QuiverConsensus.noCallConsensus(quiverConfig.noEvidenceConsensus,
                                                   subWin, intRefSeq)


=====================================
GenomicConsensus/variants.py
=====================================
@@ -88,11 +88,6 @@ class Variant(CommonEqualityMixin):
         self.annotations.append((key, value))
 
 
-def filterVariants(minCoverage, minConfidence, variants):
-    return [ v for v in variants
-             if ((v.coverage >= minCoverage) and
-                 (v.confidence >= minConfidence)) ]
-
 def annotateVariants(variants, alns):
     # Operates in place
     for v in variants:


=====================================
LICENSES → LICENSE
=====================================


=====================================
MANIFEST.in
=====================================
@@ -1,4 +1,4 @@
-include LICENSES
+include LICENSE
 
 # Quiver model definitions
 graft GenomicConsensus/quiver/resources


=====================================
README.md
=====================================
@@ -1,12 +1,20 @@
-GenomicConsensus (quiver, arrow) [![Circle CI](https://circleci.com/gh/PacificBiosciences/GenomicConsensus.svg?style=svg)](https://circleci.com/gh/PacificBiosciences/GenomicConsensus)
--------------------------
+<h1 align="center"><img src="http://www.pacb.com/wp-content/themes/pacific-biosciences/img/pacific-biosciences-logo-mobile.svg"/></h1>
+<h1 align="center">GenomicConsensus</h1>
+<p align="center">Genome polishing and variant calling.</p>
+
+***
 
 The ``GenomicConsensus`` package provides the ``variantCaller`` tool,
 which allows you to apply the Quiver or Arrow algorithm to mapped
 PacBio reads to get consensus and variant calls.
 
-Background on Quiver and Arrow
-------------------------------
+## Availability
+Latest version can be installed via bioconda package `genomicconsensus`.
+
+Please refer to our [official pbbioconda page](https://github.com/PacificBiosciences/pbbioconda)
+for information on Installation, Support, License, Copyright, and Disclaimer.
+
+## Background on Quiver and Arrow
 
 *Quiver* is the legacy consensus model based on a conditional random
 field approach.  Quiver enables consensus accuracies on genome
@@ -24,13 +32,7 @@ Quiver is supported for PacBio RS data.  Arrow is supported for PacBio
 Sequel data and RS data with the P6-C4 chemistry.
 
 
-Getting GenomicConsensus
-------------------------
-Casual users should get ``GenomicConsensus`` from the
-[SMRTanalysis software bundle](http://www.pacb.com/support/software-downloads/).
-
-
-Running
+## Running
 -------
 Basic usage is as follows:
 
@@ -56,8 +58,7 @@ FASTQ file.
  release of SMRTanalysis 3.0 or build from GitHub sources.*
 
 
-More documentation
-------------------
+## More documentation
 
 - [More detailed installation and running instructions](./doc/HowTo.rst)
 - [FAQ](./doc/FAQ.rst)


=====================================
bamboo_build.sh
=====================================
@@ -1,3 +1,44 @@
-#!/bin/bash
+#!/usr/bin/env bash
 set -vex
-bash -vex scripts/ci/build.sh $@
+
+################
+# DEPENDENCIES #
+################
+
+## Load modules
+type module >& /dev/null || . /mnt/software/Modules/current/init/bash
+
+module purge
+
+# python deps
+module load python/2
+module load cram
+module load swig
+
+# One fairly fast cram-test,
+#   quiver-tinyLambda-coverage-islands.t,
+# was moved from cram/internal. It needs some GNU modules.
+# If that becomes a problem, just move it back to cram/internal.
+module load mummer
+module load blasr/2.3.0
+module load exonerate/2.0.0
+module load gfftools/dalexander
+
+case "${bamboo_planRepository_branchName}" in
+  master)
+    module load ConsensusCore/master
+    module load unanimity/master
+    ;;
+  *)
+    module load ConsensusCore/develop
+    module load unanimity/develop
+    ;;
+esac
+
+## Use PYTHONUSERBASE in lieu of virtualenv
+export PYTHONUSERBASE="${PWD}/build"
+export PATH="${PYTHONUSERBASE}/bin:${PATH}"
+
+source scripts/ci/setup.sh
+source scripts/ci/build.sh
+source scripts/ci/test.sh


=====================================
bin/gffToBed
=====================================
@@ -57,7 +57,20 @@ class CoverageBedRecord(BedRecord):
         bed.chromStart = gff.start - 1
         bed.chromEnd = gff.end
         bed.name = 'meanCov'
-        bed.score = float(gff.cov2.split(',')[0])
+
+        # 'coverage' field output by variantCaller nowadays
+        score = getattr(gff, 'coverage', None)
+        if score is None:
+            # backwards compatible field from quiver days
+            score = getattr(gff, 'cov2', None)
+            if score is None:
+                logging.error('Could not determine coverage from input GFF')
+                sys.exit(-1)
+            else:
+                bed.score = float(score.split(',')[0])
+        else:
+            bed.score = float(score)
+
         bed.strand = gff.strand
         return bed
 


=====================================
doc/conf.py
=====================================
@@ -16,7 +16,7 @@ from __future__ import absolute_import, division, print_function
 import sys, os
 from os.path import dirname, join
 
-__VERSION__ = '2.3.2' # don't forget to update setup.py and GenomicConsensus/__init__.py too
+__VERSION__ = '2.3.3' # don't forget to update setup.py and GenomicConsensus/__init__.py too
 
 
 # If extensions (or modules to document with autodoc) are in another directory,


=====================================
scripts/ci/build.sh
=====================================
@@ -1,110 +1,13 @@
-#!/bin/bash
-set -euo pipefail
+#!/usr/bin/env bash
+set -vex
 
-echo "# DEPENDENCIES"
-echo "## Load modules"
-type module >& /dev/null || . /mnt/software/Modules/current/init/bash
-module load git
-module load gcc
-module load cmake ninja
-module load cram
-module load swig ccache boost
-CXX="$CXX -static-libstdc++"
-GXX="$CXX"
-export CXX GXX
-if [[ $USER == "bamboo" ]]; then
-  export CCACHE_DIR=/mnt/secondary/Share/tmp/bamboo.mobs.ccachedir
-  export CCACHE_TEMPDIR=/scratch/bamboo.ccache_tempdir
-fi
-export CCACHE_COMPILERCHECK='%compiler% -dumpversion'
-export CCACHE_BASEDIR=$PWD
+#########
+# BUILD #
+#########
 
-echo "## Use PYTHONUSERBASE in lieu of virtualenv"
-export PATH=$PWD/build/bin:/mnt/software/a/anaconda2/4.2.0/bin:$PATH
-export PYTHONUSERBASE=$PWD/build
-# pip 9 create some problem with egg style install so don't upgrade pip
-PIP="pip --cache-dir=$PWD/.pip --disable-pip-version-check"
+# install
+WHEELHOUSE="/mnt/software/p/python/wheelhouse/develop/"
+pip install --user --find-links=${WHEELHOUSE} -e .
 
-echo "## Install pip modules"
-NX3PBASEURL=http://nexus/repository/unsupported/pitchfork/gcc-6.4.0
-NXSABASEURL=http://nexus/repository/maven-snapshots/pacbio/sat
-$PIP install --user \
-  $NX3PBASEURL/pythonpkgs/pysam-0.13-cp27-cp27mu-linux_x86_64.whl \
-  $NX3PBASEURL/pythonpkgs/xmlbuilder-1.0-cp27-none-any.whl \
-  $NX3PBASEURL/pythonpkgs/avro-1.7.7-cp27-none-any.whl \
-  iso8601 \
-  $NX3PBASEURL/pythonpkgs/tabulate-0.7.5-cp27-none-any.whl \
-  coverage
-ln -sfn ../data _deps/pacbiotestdata/pbtestdata/data
-$PIP install --user -e _deps/pacbiotestdata
-$PIP install --user -e _deps/pbcore
-$PIP install --user -e _deps/pbcommand
-
-echo "## Get external dependencies"
-curl -s -L $NX3PBASEURL/zlib-1.2.8.tgz                 | tar zxf - -C build
-curl -s -L $NXSABASEURL/htslib/htslib-1.1-SNAPSHOT.tgz | tar zxf - -C build
-
-echo "## Fetch unanimity \"submodules\""
-( cd _deps/unanimity \
-  && git checkout . \
-  && git clean -xdf \
-  && rm -rf third-party/pbbam third-party/pbcopper \
-  && ln -sfn $PWD/../pbbam    third-party/pbbam \
-  && ln -sfn $PWD/../pbcopper third-party/pbcopper )
-# the reason to use $PWD/.. full path is that pip will copy it to /tmp
-
-echo "# BUILD"
-echo "## install ConsensusCore"
-( cd _deps/ConsensusCore \
-  && python setup.py bdist_wheel --boost=$BOOST_ROOT \
-  && echo dist/ConsensusCore-*.whl | \
-     xargs $PIP install --user --verbose )
-
-echo "## pip install CC2"
-( cd _deps/unanimity \
-  && CMAKE_BUILD_TYPE=ReleaseWithAssert \
-     CMAKE_COMMAND=cmake \
-     ZLIB_INCLUDE_DIR=$PWD/../../build/include \
-     ZLIB_LIBRARY=$PWD/../../build/lib/libz.so \
-     VERBOSE=1 $PIP wheel --verbose . \
-     && $PIP install --user --verbose ConsensusCore2-*.whl )
-
-echo "## install GC"
+# produce wheel
 python setup.py bdist_wheel
-$PIP install --user --verbose dist/GenomicConsensus-*.whl
-
-echo "# TEST"
-echo "## CC2 version test"
-python -c "import ConsensusCore2 ; print ConsensusCore2.__version__"
-
-echo "## test CC2 via GC"
-coverage run --source GenomicConsensus -m py.test --verbose --junit-xml=nosetests.xml tests/unit
-
-# One fairly fast cram-test,
-#   quiver-tinyLambda-coverage-islands.t,
-# was moved from cram/internal. It needs some GNU modules.
-# If that becomes a problem, just move it back to cram/internal.
-module load mummer
-module load exonerate/2.0.0
-
-# Run fairly fast cram tests.
-make basic-tests
-
-coverage xml -o coverage.xml
-sed -i -e 's at filename="@filename="./@g' coverage.xml
-
-ConsensusCore_VERSION=`$PIP freeze|grep 'ConsensusCore=='|awk -F '==' '{print $2}'`
-ConsensusCore2_VERSION=`$PIP freeze|grep 'ConsensusCore2=='|awk -F '==' '{print $2}'`
-GenomicConsensus_VERSION=`$PIP freeze|grep 'GenomicConsensus=='|awk -F '==' '{print $2}'`
-if [[ "_$bamboo_planRepository_1_branch" == "_develop" ]]; then
-  NEXUS_BASEURL=http://ossnexus.pacificbiosciences.com/repository
-  NEXUS_URL=$NEXUS_BASEURL/unsupported/gcc-6.4.0
-  curl -v -n --upload-file _deps/ConsensusCore/dist/ConsensusCore-*.whl $NEXUS_URL/pythonpkgs/ConsensusCore-${ConsensusCore_VERSION}-cp27-cp27mu-linux_x86_64.whl
-  curl -v -n --upload-file _deps/unanimity/ConsensusCore2-*.whl         $NEXUS_URL/pythonpkgs/ConsensusCore2-${ConsensusCore2_VERSION}-cp27-cp27mu-linux_x86_64.whl
-  curl -v -n --upload-file dist/GenomicConsensus-*.whl                  $NEXUS_URL/pythonpkgs/GenomicConsensus-${GenomicConsensus_VERSION}-cp27-cp27mu-linux_x86_64.whl
-  rm -rf bamboo_artifacts
-  mkdir -p bamboo_artifacts/gcc-6.4.0/wheelhouse
-  mv _deps/ConsensusCore/dist/ConsensusCore-*.whl bamboo_artifacts/gcc-6.4.0/wheelhouse/ConsensusCore-${ConsensusCore_VERSION}-cp27-cp27mu-linux_x86_64.whl
-  mv _deps/unanimity/ConsensusCore2-*.whl         bamboo_artifacts/gcc-6.4.0/wheelhouse/ConsensusCore2-${ConsensusCore2_VERSION}-cp27-cp27mu-linux_x86_64.whl
-  mv dist/GenomicConsensus-*.whl                  bamboo_artifacts/gcc-6.4.0/wheelhouse/GenomicConsensus-${GenomicConsensus_VERSION}-cp27-cp27mu-linux_x86_64.whl
-fi


=====================================
scripts/ci/setup.sh
=====================================
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+set -vex
+
+#########
+# SETUP #
+#########
+
+WHEELHOUSE="/mnt/software/p/python/wheelhouse/develop/"
+pip install --user --find-links=${WHEELHOUSE} coverage 'h5py<2.9' nose numpy
+
+pip install --user --find-links=${WHEELHOUSE} -e _deps/pbcommand
+pip install --user --find-links=${WHEELHOUSE} -e _deps/pbcore
+pip install --user --find-links=${WHEELHOUSE} -e _deps/pbtestdata


=====================================
scripts/ci/test.sh
=====================================
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+set -vex
+
+########
+# TEST #
+########
+
+## CC1 version test
+python -c 'import ConsensusCore; print ConsensusCore.Version.VersionString()'
+
+## CC2 version test
+python -c 'import ConsensusCore2; print ConsensusCore2.__version__'
+
+## test CC2 via GC
+coverage run --source GenomicConsensus -m py.test --verbose --junit-xml=nosetests.xml tests/unit
+
+## Run fairly fast cram tests
+make basic-tests
+
+if [[ ${bamboo_shortPlanName} == GenomicConsensus-nightly ]]; then
+	## test GC
+	make unit-tests
+
+	## test GC cram
+	make basic-tests
+
+	## test GC extra
+	make extra-tests
+
+	## test GC internal
+	make internal-tests
+fi


=====================================
scripts/nightly/build.sh deleted
=====================================
@@ -1,61 +0,0 @@
-#!/bin/bash -e
-echo "# DEPENDENCIES"
-echo "## Load modules"
-source /mnt/software/Modules/current/init/bash
-module load git
-module load gcc
-module load python/2
-module load zlib
-module load cmake ninja
-module load swig ccache boost cram
-
-echo "## Get into virtualenv"
-if [ ! -d venv ]
-then
-    virtualenv venv
-fi
-
-source venv/bin/activate
-
-set -vxeuo pipefail
-
-
-## Install pip modules
-pip install --upgrade pip
-
-pip install cython pysam cram pytest coverage jsonschema avro nose numpy==1.14.5
-pip install --no-deps http://bitbucket:7990/rest/api/latest/projects/SL/repos/pbcommand/archive?format=zip
-pip install --no-deps http://bitbucket:7990/rest/api/latest/projects/SAT/repos/pbcore/archive?format=zip
-
-### Get PacBioTestData
-if [ ! -d ../PacBioTestData ]
-then
-    ( cd ..                                                            &&\
-    git clone https://github.com/PacificBiosciences/PacBioTestData.git )
-fi
-( cd ../PacBioTestData                                                    &&\
-    git lfs pull                                                       &&\
-    make python )
-
-## Fetch unanimity submodules
-# Bamboo's checkout of unanimity doesn't set the "origin" remote to
-# something meaningful, which means we can't resolve the relative
-# submodules.  Override the remote here.
-( cd ../unanimity &&
-  git remote set-url origin ssh://git@bitbucket:7999/sat/unanimity.git &&
-  git submodule update --init --remote )
-
-# BUILD
-
-## pip install CC2
-( cd ../unanimity && CMAKE_BUILD_TYPE=ReleaseWithAssert CMAKE_COMMAND=cmake ZLIB_INCLUDE_DIR=/mnt/software/z/zlib/1.2.5/include ZLIB_LIBRARY=/mnt/software/z/zlib/1.2.5/lib/libz.so VERBOSE=1 pip install --verbose --upgrade --no-deps . )
-
-## install ConsensusCore
-( cd ../ConsensusCore && python setup.py install --boost=$BOOST_ROOT )
-
-## install GC
-( pip install --upgrade --no-deps --verbose . )
-
-set +u
-deactivate
-set -u


=====================================
scripts/nightly/test.sh deleted
=====================================
@@ -1,43 +0,0 @@
-#!/bin/bash -e
-echo "# DEPENDENCIES"
-echo "## Load modules"
-source /mnt/software/Modules/current/init/bash
-module load git
-module load gcc
-module load python/2
-module load zlib
-module load cmake ninja
-module load swig ccache boost cram
-module load cram
-module load mummer
-module load exonerate/2.0.0
-module load blasr/2.3.0
-module load gfftools/dalexander
-
-source venv/bin/activate
-
-set -vxeuo pipefail
-
-# TEST
-
-## CC2 version test
-python -c "import ConsensusCore2 ; print ConsensusCore2.__version__"
-
-## To use .cmp.h5, pbcore needs h5py.
-pip install h5py
-
-## test GC
-make unit-tests
-
-## test GC cram
-make basic-tests
-
-## test GC extra
-make extra-tests
-
-## test GC internal
-make internal-tests
-
-set +u
-deactivate
-set -u


=====================================
setup.py
=====================================
@@ -11,10 +11,10 @@ from os.path import join, dirname
 
 setup(
     name='GenomicConsensus',
-    version='2.3.2',  # don't forget to update GenomicConsensus/__init__.py and doc/conf.py too
+    version='2.3.3',  # don't forget to update GenomicConsensus/__init__.py and doc/conf.py too
     author='Pacific Biosciences',
     author_email='devnet at pacificbiosciences.com',
-    license=open('LICENSES').read(),
+    license=open('LICENSE').read(),
     scripts=[
         'bin/variantCaller',
         'bin/summarizeConsensus',


=====================================
tests/cram/arrow-all4mer-diploid.t
=====================================
@@ -6,7 +6,7 @@ Test Arrow diploid polishing
 
 Run arrow
 
-  $ arrow $INPUT -r $REFERENCE --diploid -o dipl.vcf -o cons.fasta
+  $ arrow $INPUT -r $REFERENCE --diploid -o dipl.vcf -o dipl.gff -o cons.fasta
 
 Perfect diploid polishing, found all variants
 
@@ -28,3 +28,13 @@ Ambiguous-free consensus sequence
   AGTAGGTGCTGTCGAGCGGCAGCTAGCGGTCAATTCTATGACCTCGTTGCGTACTCCGAA
   TCATTGAGCAACCGTCTTTGGTAAATACGAGTTCAGGCAAGCTTGCTGAGGACTAGTAGC
   T
+
+TAG-3610: test that `gffToBed` actually works
+
+  $ gffToBed coverage dipl.gff
+  track name=variants description="PacBio: snps, insertions, and deletions derived from consensus calls against reference" useScore=0
+  all4merDipl	27	28	meanCov	100.000	.
+  all4merDipl	70	71	meanCov	100.000	.
+  all4merDipl	127	128	meanCov	100.000	.
+  all4merDipl	193	194	meanCov	100.000	.
+  all4merDipl	247	248	meanCov	100.000	.


=====================================
tests/cram/internal/quiver-ecoli.t
=====================================
@@ -35,11 +35,14 @@ since I built the new reference.
   ecoliK12_pbi_March2013 . insertion 1536 1536 . . . reference=.;variantSeq=C;coverage=91;confidence=47
 
   $ cat variants.vcf | untabify
-  ##fileformat=VCFv4.3
+  ##fileformat=VCFv4.2
   ##fileDate=* (glob)
   ##source=GenomicConsensusV* (glob)
   ##reference=file://* (glob)
   ##contig=<ID=ecoliK12_pbi_March2013,length=4642522>
+  ##INFO=<ID=DP,Number=1,Type=Integer,Description="Approximate read depth; some reads may have been filtered">
+  ##FILTER=<ID=q40,Description="Quality below 40">
+  ##FILTER=<ID=c5,Description="Coverage below 5">
   #CHROM POS ID REF ALT QUAL FILTER INFO
   ecoliK12_pbi_March2013 84 . TG T 48 PASS DP=53
   ecoliK12_pbi_March2013 218 . GA G 47 PASS DP=58


=====================================
tests/cram/quiver-noqvs-test.t
=====================================
@@ -26,12 +26,13 @@ I'm not all that surprised.
   3primeEnd . deletion 369 369 . . . reference=G;variantSeq=.;coverage=83;confidence=6
 
   $ cat v.vcf | tr '\t' ' '
-  ##fileformat=VCFv4.3
+  ##fileformat=VCFv4.2
   ##fileDate=* (glob)
   ##source=GenomicConsensusV* (glob)
   ##reference=file://* (glob)
   ##contig=<ID=5primeEnd,length=156>
   ##contig=<ID=3primeEnd,length=386>
+  ##INFO=<ID=DP,Number=1,Type=Integer,Description="Approximate read depth; some reads may have been filtered">
   #CHROM POS ID REF ALT QUAL FILTER INFO
   3primeEnd 295 . TG T 4 PASS DP=92
   3primeEnd 368 . AG A 6 PASS DP=83


=====================================
tests/cram/version.t
=====================================
@@ -2,7 +2,7 @@ This actually failed once because of a missing import, so we might as
 well test it.
 
   $ variantCaller --version
-  2.3.2
+  2.3.3
 
 This will break if the parser setup is messed up.
 


=====================================
tests/unit/test_summarize_consensus.py
=====================================
@@ -31,7 +31,7 @@ chr2\t.\tregion\t10000\t23469\t0.00\t+\t.\tcov=0,48,89;cov2=47.303,12.036;gaps=1
 chr3\t.\tregion\t1\t7000\t0.00\t+\t.\tcov=0,48,89;cov2=47.303,12.036;gaps=1,24"""
 
 EXPECTED = """\
-##source GenomicConsensus 2.3.2
+##source GenomicConsensus 2.3.3
 ##pacbio-alignment-summary-version 0.6
 ##source-commandline this line will be skipped in the comparison
 chr1\t.\tregion\t1\t5000\t0.00\t+\t.\tcov=4,23,28;cov2=20.162,5.851;gaps=0,0;cQv=20,20,20;del=0;ins=0;sub=1



View it on GitLab: https://salsa.debian.org/med-team/pbgenomicconsensus/commit/a0579e221faf1669906b71b777d7e68fa5d8c258

-- 
View it on GitLab: https://salsa.debian.org/med-team/pbgenomicconsensus/commit/a0579e221faf1669906b71b777d7e68fa5d8c258
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20191218/bc67a509/attachment-0001.html>


More information about the debian-med-commit mailing list