[med-svn] [sga] 01/04: Imported Upstream version 0.10.15

Afif Elghraoui afif at moszumanska.debian.org
Mon Aug 22 07:44:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

afif pushed a commit to branch debian/unstable
in repository sga.

commit 77a121acc44fbdb2156c343618aec364f87f39ef
Author: Afif Elghraoui <afif at ghraoui.name>
Date:   Mon Aug 22 00:15:31 2016 -0700

    Imported Upstream version 0.10.15
---
 Dockerfile                      | 74 +++++++++++++++++++++++++++++++++++++++++
 Dockerfile.testing              | 63 +++++++++++++++++++++++++++++++++++
 src/Bigraph/Bigraph.cpp         |  2 +-
 src/Bigraph/Vertex.h            |  3 +-
 src/SGA/kmer-count.cpp          |  2 +-
 src/SGA/overlap-long.cpp        |  5 +--
 src/SGA/preqc.cpp               |  2 +-
 src/SuffixTools/STCommon.h      |  2 +-
 src/bin/sga-bam2de.pl           |  2 +-
 src/bin/sga-preqc-report.py     |  2 +-
 src/configure.ac                |  6 ++--
 src/examples/sga-ecoli-miseq.sh |  3 +-
 12 files changed, 152 insertions(+), 14 deletions(-)

diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..f78504e
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,74 @@
+# SGA docker
+# Version 0.1
+# Runs SGA ( http://github.com/jts/sga ) 
+#
+# Creates SGA-in-a-docker, such that you can run the dockerized SGA
+# much as you would run the local SGA executable.
+# 
+# To build:
+#    docker build -t sga-docker [path containing DOCKERFILE]
+# if the Dockerfile is local, otherwise:
+#    docker build -t sga-docker github.com/jts/sga
+#    
+# Once built, you can invoke sga-docker as you would sga, eg:
+#    docker run -v /path/to/local/data/data/:/data/ \
+#       sga-docker somatic-variant-filters --annotate-only --threads=2 \
+#        --tumor-bam=/data/tumor.bam --normal-bam=/data/normal.bam \
+#        --reference=/data/reference.fa /data/input.vcf
+#
+# You can also invoke other sga scripts, such as sga-preqc-report:
+#   docker run -v /path/of/sga/repo:/data/ \
+#       --entrypoint /src/sga-0.10.14/src/bin/sga-preqc-report.py \
+#       sga-docker /data/src/examples/preqc/{bird,fish,human,oyster,snake,yeast}.preqc
+#
+FROM ubuntu:14.04
+MAINTAINER Jonathan Dursi <Jonathan.Dursi at oicr.on.ca> 
+LABEL Description="Runs SGA variant annotation on candidate indels against tumour and normal bams" Vendor="OICR" Version="0.1"
+VOLUME /data
+WORKDIR /data
+
+# get ubuntu packages
+# incl python matplotlib for preqc
+RUN apt-get update && \
+    apt-get install -y \
+        automake \
+        autotools-dev \
+        build-essential \
+        cmake \
+        libhts-dev \
+        libhts0 \
+        libjemalloc-dev \
+        libsparsehash-dev \
+        libz-dev \
+        python-matplotlib \
+        wget \
+        zlib1g-dev 
+
+# build remaining dependencies:
+# bamtools
+RUN mkdir -p /deps && \
+    cd /deps && \
+    wget https://github.com/pezmaster31/bamtools/archive/v2.4.0.tar.gz && \
+    tar -xzvf v2.4.0.tar.gz && \
+    rm v2.4.0.tar.gz && \
+    cd bamtools-2.4.0 && \
+    mkdir build && \
+    cd build && \
+    cmake .. && \
+    make
+
+# build SGA
+RUN mkdir -p /src && \
+    cd /src && \
+    wget https://github.com/jts/sga/archive/v0.10.14.tar.gz && \
+    tar -xzvf v0.10.14.tar.gz && \
+    rm v0.10.14.tar.gz && \
+    cd sga-0.10.14/src && \
+    ./autogen.sh && \
+    ./configure --with-bamtools=/deps/bamtools-2.4.0 --with-jemalloc=/usr --prefix=/usr/local && \
+    make && \
+    make install
+
+
+ENTRYPOINT ["/usr/local/bin/sga"]
+CMD ["--help"]
diff --git a/Dockerfile.testing b/Dockerfile.testing
new file mode 100644
index 0000000..20bf966
--- /dev/null
+++ b/Dockerfile.testing
@@ -0,0 +1,63 @@
+#
+# Dockerfile meant for build testing only.
+#
+# Synopsis:
+# - install prerequisites from debian:stable
+# - install gcc-6 from debian:testing
+# - clone bamtools (NOTE: fix for gcc-6 not included in currently latest tag 2.4.0)
+# - build bamtools
+# - install bamtools in /usr/local
+# - copy (sga/) src from Dockerfile context
+# - build sga
+# - install sga in /usr/local
+#
+FROM debian:stable
+MAINTAINER Matei David <matei.david.at.oicr.on.ca>
+ARG DEBIAN_FRONTEND=noninteractive
+LABEL Description="Dockerfile meant for build testing only."
+WORKDIR /tmp
+
+# enable debian:testing
+RUN echo 'APT::Default-Release "stable";' >/etc/apt/apt.conf.d/99defaultrelease && \
+    mv /etc/apt/sources.list /etc/apt/sources.list.d/stable.list && \
+    sed 's/stable/testing/g' </etc/apt/sources.list.d/stable.list >/etc/apt/sources.list.d/testing.list
+
+# install prerequisites from stable
+RUN apt-get update -y && \
+    apt-get install -y \
+        automake \
+        autotools-dev \
+        build-essential \
+        cmake \
+        git \
+        libjemalloc-dev \
+        libsparsehash-dev \
+        libz-dev \
+        wget
+
+# install gcc-6 from testing
+RUN apt-get install -y -t testing \
+    g++-6
+ENV CC=gcc-6
+ENV CXX=g++-6
+
+# build bamtools
+RUN git clone --depth 1 https://github.com/pezmaster31/bamtools.git && \
+    cd bamtools && \
+    mkdir build && \
+    cd build && \
+    cmake .. && \
+    make && \
+    make install
+
+ADD src /tmp/sga/src/
+RUN cd /tmp/sga/src && \
+    ./autogen.sh && \
+    ./configure --with-bamtools=/usr/local --with-jemalloc=/usr && \
+    make && \
+    make install
+
+VOLUME /data
+WORKDIR /data
+ENTRYPOINT ["/usr/local/bin/sga"]
+CMD ["--help"]
diff --git a/src/Bigraph/Bigraph.cpp b/src/Bigraph/Bigraph.cpp
index 7931d16..2c873b4 100644
--- a/src/Bigraph/Bigraph.cpp
+++ b/src/Bigraph/Bigraph.cpp
@@ -144,7 +144,7 @@ void Bigraph::mergeVertices(VertexID id1, VertexID id2)
 
     if(edgesTo.size() > 1)
     {
-        std::cerr << "mergeVertces: cannot merge because of ambigious edges\n";
+        std::cerr << "mergeVertces: cannot merge because of ambiguous edges\n";
         return;
     }
 
diff --git a/src/Bigraph/Vertex.h b/src/Bigraph/Vertex.h
index 4720eb0..41742c4 100644
--- a/src/Bigraph/Vertex.h
+++ b/src/Bigraph/Vertex.h
@@ -61,7 +61,8 @@ class Vertex
                                                     m_seq(s), 
                                                     m_color(GC_WHITE),
                                                     m_coverage(1),
-                                                    m_isContained(false) {}
+                                                    m_isContained(false),
+                                                    m_isSuperRepeat(false) {}
         ~Vertex();
 
         // High-level modification functions
diff --git a/src/SGA/kmer-count.cpp b/src/SGA/kmer-count.cpp
index b6de14d..ffaa03b 100644
--- a/src/SGA/kmer-count.cpp
+++ b/src/SGA/kmer-count.cpp
@@ -24,7 +24,7 @@
 static const char *KMERCOUNT_VERSION_MESSAGE = SUBPROGRAM " Version " PACKAGE_VERSION "\n";
 static const char *KMERCOUNT_USAGE_MESSAGE =
 "Usage: " PACKAGE_NAME " " SUBPROGRAM " [OPTION] src.{bwt,fa,fq} [test1.bwt] [test2.bwt]\n"
-"Generate a table of the k-mers in src.{bwt,fa,fq}, and optionaly count the number of time they appears in testX.bwt.\n"
+"Generate a table of the k-mers in src.{bwt,fa,fq}, and optionally count the number of time they appears in testX.bwt.\n"
 "Output on stdout the canonical kmers and their counts on forward and reverse strand if input is .bwt\n"
 "If src is a sequence file output forward and reverse counts for each kmer in the file\n"
 "\n"
diff --git a/src/SGA/overlap-long.cpp b/src/SGA/overlap-long.cpp
index 81c9652..6583eb6 100644
--- a/src/SGA/overlap-long.cpp
+++ b/src/SGA/overlap-long.cpp
@@ -199,9 +199,10 @@ int overlapLongMain(int argc, char** argv)
     // Make a prefix for the temporary hits files
     size_t n_reads = reads.getCount();
 
+#if HAVE_OPENMP
     omp_set_num_threads(opt::numThreads);
-
-#pragma omp parallel for
+    #pragma omp parallel for
+#endif
     for(size_t read_idx = 0; read_idx < n_reads; ++read_idx)
     {
         const SeqItem& curr_read = reads.getRead(read_idx);
diff --git a/src/SGA/preqc.cpp b/src/SGA/preqc.cpp
index 4c39e4a..0ba0f6d 100644
--- a/src/SGA/preqc.cpp
+++ b/src/SGA/preqc.cpp
@@ -754,7 +754,7 @@ void generate_errors_per_base(JSONWriter* pWriter, const BWTIndexSet& index_set)
 
     double max_error_rate = 0.95;
     size_t min_overlap = 50;
-    
+
     std::vector<size_t> position_count;
     std::vector<size_t> error_count;
 
diff --git a/src/SuffixTools/STCommon.h b/src/SuffixTools/STCommon.h
index 13e0769..38d2be5 100644
--- a/src/SuffixTools/STCommon.h
+++ b/src/SuffixTools/STCommon.h
@@ -96,7 +96,7 @@ struct SAElem
         // Masks
         static const uint8_t ID_BITS = 36; // Allows up to 68 billion IDs
         static const uint8_t POS_BITS = 64 - ID_BITS;
-        static const uint64_t HIGH_MASK = ~0 << POS_BITS;
+        static const uint64_t HIGH_MASK = ~0llu << POS_BITS;
         static const uint64_t LOW_MASK = ~HIGH_MASK;
 };
 
diff --git a/src/bin/sga-bam2de.pl b/src/bin/sga-bam2de.pl
index 68c7649..569ab16 100755
--- a/src/bin/sga-bam2de.pl
+++ b/src/bin/sga-bam2de.pl
@@ -62,7 +62,7 @@ runCmd($cmd);
 runCmd("awk \'\$2 >= $hist_min\' $prefix.tmp.hist > $prefix.hist");
 
 # sort 
-$cmd = "samtools sort $prefix.diffcontigs.bam $prefix.diffcontigs.sorted";
+$cmd = "samtools sort -\@$numThreads $prefix.diffcontigs.bam -o $prefix.diffcontigs.sorted.bam";
 runCmd($cmd);
 
 # distance est
diff --git a/src/bin/sga-preqc-report.py b/src/bin/sga-preqc-report.py
index 4d45472..a939af3 100755
--- a/src/bin/sga-preqc-report.py
+++ b/src/bin/sga-preqc-report.py
@@ -330,7 +330,7 @@ def plot_legend(ax, data):
                 linestyle='-', marker=d['plot_marker'],
                 color=d['plot_color']))
         names.append(d['name'])
-    ax.legend(proxy_arts, names, 2, bbox_to_anchor=(0,1), borderaxespad=0.)
+    ax.legend(proxy_arts, names, loc=2, bbox_to_anchor=(0,1), borderaxespad=0.)
     ax.set_frame_on(False)
     ax.tick_params(axis='x', which='both', bottom='off', top='off', labelbottom='off')
     ax.tick_params(axis='y', which='both', left='off', right='off', labelleft='off')
diff --git a/src/configure.ac b/src/configure.ac
index f774efc..cf6c789 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -1,7 +1,7 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)
-AC_INIT(sga, 0.10.14, js18 at sanger.ac.uk)
+AC_INIT(sga, 0.10.15, js18 at sanger.ac.uk)
 AM_INIT_AUTOMAKE(foreign)
 AC_CONFIG_SRCDIR([SGA/sga.cpp])
 AC_CONFIG_HEADER([config.h])
@@ -92,8 +92,8 @@ fi
 
 # Set compiler flags.
 AC_SUBST(AM_CXXFLAGS, "-Wall -Wextra $fail_on_warning -Wno-unknown-pragmas")
-AC_SUBST(CXXFLAGS, "-O3")
-AC_SUBST(CFLAGS, "-O3")
+AC_SUBST(CXXFLAGS, "-std=c++98 -O3")
+AC_SUBST(CFLAGS, "-std=gnu99 -O3")
 AC_SUBST(CPPFLAGS, "$CPPFLAGS $openmp_cppflags $sparsehash_include $bamtools_include")
 AC_SUBST(LDFLAGS, "$openmp_cppflags $external_malloc_ldflags $bamtools_ldflags $LDFLAGS")
 
diff --git a/src/examples/sga-ecoli-miseq.sh b/src/examples/sga-ecoli-miseq.sh
index 9f16fe5..160aa54 100755
--- a/src/examples/sga-ecoli-miseq.sh
+++ b/src/examples/sga-ecoli-miseq.sh
@@ -21,7 +21,6 @@ BWA_BIN=bwa
 SAMTOOLS_BIN=samtools
 BAM2DE_BIN=sga-bam2de.pl
 ASTAT_BIN=sga-astat.py
-DISTANCE_EST=DistanceEst
 
 # The number of threads to use
 CPU=8
@@ -50,7 +49,7 @@ MIN_PAIRS=10
 #
 
 # Check the required programs are installed and executable
-prog_list="$SGA_BIN $BWA_BIN $SAMTOOLS_BIN $BAM2DE_BIN $DISTANCE_EST $ASTAT_BIN"
+prog_list="$SGA_BIN $BWA_BIN $SAMTOOLS_BIN $BAM2DE_BIN $ASTAT_BIN"
 for prog in $prog_list; do
     hash $prog 2>/dev/null || { echo "Error $prog not found. Please place $prog on your PATH or update the *_BIN variables in this script"; exit 1; }
 done 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/sga.git



More information about the debian-med-commit mailing list