[med-svn] [Git][med-team/delly][master] 10 commits: routine-update: New upstream version

Andreas Tille (@tille) gitlab at salsa.debian.org
Sun Jan 16 15:41:58 GMT 2022



Andreas Tille pushed to branch master at Debian Med / delly


Commits:
70063845 by Andreas Tille at 2022-01-16T16:19:35+01:00
routine-update: New upstream version

- - - - -
769eb04b by Andreas Tille at 2022-01-16T16:19:35+01:00
New upstream version 0.9.1
- - - - -
76045422 by Andreas Tille at 2022-01-16T16:19:36+01:00
Update upstream source from tag 'upstream/0.9.1'

Update to upstream version '0.9.1'
with Debian dir d53542438baa46f4b72aecede1c380f717e5bf23
- - - - -
86a30d9b by Andreas Tille at 2022-01-16T16:19:36+01:00
routine-update: Standards-Version: 4.6.0

- - - - -
7f73a4d2 by Andreas Tille at 2022-01-16T16:19:44+01:00
Add missing build dependency on dh addon.

Changes-By: lintian-brush
Fixes: lintian: missing-build-dependency-for-dh_-command
See-also: https://lintian.debian.org/tags/missing-build-dependency-for-dh_-command.html

- - - - -
e8660b77 by Andreas Tille at 2022-01-16T16:19:47+01:00
Avoid explicitly specifying -Wl,--as-needed linker flag.

Changes-By: lintian-brush
Fixes: lintian: debian-rules-uses-as-needed-linker-flag
See-also: https://lintian.debian.org/tags/debian-rules-uses-as-needed-linker-flag.html

- - - - -
4a94ff89 by Andreas Tille at 2022-01-16T16:31:18+01:00
No need to repack source any more

- - - - -
01a6e30f by Andreas Tille at 2022-01-16T16:32:12+01:00
New upstream version 0.9.1
- - - - -
2b094efd by Andreas Tille at 2022-01-16T16:32:13+01:00
Update upstream source from tag 'upstream/0.9.1'

Update to upstream version '0.9.1'
with Debian dir 721a58be7216af934d67cfa575e560125f0d4728
- - - - -
9b597088 by Andreas Tille at 2022-01-16T16:34:52+01:00
Upload to unstable

- - - - -


22 changed files:

- .github/workflows/c-cpp.yml
- .github/workflows/docker.yml
- − .travis.yml
- + Dockerfile.parallel
- LICENSE
- R/cnv.R
- README.md
- debian/changelog
- debian/control
- debian/copyright
- debian/rules
- src/assemble.h
- src/classify.h
- src/cnv.h
- src/coral.h
- src/coverage.h
- src/scan.h
- src/split.h
- src/tags.h
- src/tegua.h
- src/util.h
- src/version.h


Changes:

=====================================
.github/workflows/c-cpp.yml
=====================================
@@ -2,9 +2,9 @@ name: C/C++ CI
 
 on:
   push:
-    branches: [ master ]
+    branches: [ main ]
   pull_request:
-    branches: [ master ]
+    branches: [ main ]
 
 jobs:
   build:
@@ -15,5 +15,5 @@ jobs:
     - name: make
       run: |
         sudo apt-get update
-        sudo apt-get install -y libcurl4-gnutls-dev libhts-dev libhts2 libboost-date-time-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-iostreams-dev
+        sudo apt-get install -y libcurl4-gnutls-dev libhts-dev libboost-date-time-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-iostreams-dev
         make


=====================================
.github/workflows/docker.yml
=====================================
@@ -2,7 +2,7 @@ name: Docker CI
 
 on:
   push:
-    branches: master
+    branches: main
 
 jobs:
   main:


=====================================
.travis.yml deleted
=====================================
@@ -1,73 +0,0 @@
-# Delly build script
-
-language: cpp
-
-matrix:
-  include:
-    - env: MYCC="gcc-4.8" MYCXX="g++-4.8"
-      os: linux
-      addons: &gcc48
-        apt:
-          sources:
-            - ubuntu-toolchain-r-test
-          packages:
-            - g++-4.8
-
-    - env: MYCC="gcc-5" MYCXX="g++-5"
-      os: linux
-      addons: &gcc5
-        apt:
-          sources:
-            - ubuntu-toolchain-r-test
-          packages:
-            - g++-5
-
-    - env: MYCC="gcc-6" MYCXX="g++-6"
-      os: linux
-      addons: &gcc6
-        apt:
-          sources:
-            - ubuntu-toolchain-r-test
-          packages:
-            - g++-6
-    - env: MYCC="gcc-7" MYCXX="g++-7"
-      os: linux
-      addons: &gcc7
-        apt:
-          sources:
-            - ubuntu-toolchain-r-test
-          packages:
-            - g++-7
-    - env: MYCC="gcc-8" MYCXX="g++-8"
-      os: linux
-      addons: &gcc8
-        apt:
-          sources:
-            - ubuntu-toolchain-r-test
-          packages:
-            - g++-8
-    - env: MYCC="gcc-9" MYCXX="g++-9"
-      os: linux
-      addons: &gcc9
-        apt:
-          sources:
-            - ubuntu-toolchain-r-test
-          packages:
-            - g++-9
-    - env: MYCC="gcc" MYCXX="g++"
-      os: osx
-      osx_image: xcode11.3
-
-before_install:
-  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi
-  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq liblzma-dev libbz2-dev libboost-dev libboost-date-time-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-iostreams-dev; fi
-  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
-  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install xz; fi
-
-before_script:
-  - export CXX=$MYCXX
-  - export CC=$MYCC
-  - $CXX --version
-
-script:
-  - make all


=====================================
Dockerfile.parallel
=====================================
@@ -0,0 +1,56 @@
+# use the ubuntu base image
+FROM ubuntu:18.04
+
+MAINTAINER Tobias Rausch rausch at embl.de
+
+# install required packages
+RUN apt-get update && apt-get install -y \
+    autoconf \
+    build-essential \
+    cmake \
+    g++ \
+    gfortran \
+    git \
+    libcurl4-gnutls-dev \
+    hdf5-tools \
+    libboost-date-time-dev \
+    libboost-program-options-dev \
+    libboost-system-dev \
+    libboost-filesystem-dev \
+    libboost-iostreams-dev \
+    libbz2-dev \
+    libhdf5-dev \
+    libncurses-dev \
+    liblzma-dev \
+    zlib1g-dev \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
+# set environment
+ENV BOOST_ROOT /usr
+
+# install delly
+RUN cd /opt \
+    && git clone --recursive https://github.com/dellytools/delly.git \
+    && cd /opt/delly/ \
+    && make STATIC=1 PARALLEL=1 all \
+    && make install
+
+
+# Multi-stage build
+FROM alpine:latest
+RUN mkdir -p /opt/delly/bin
+WORKDIR /opt/delly/bin
+COPY --from=0 /opt/delly/bin/delly .
+
+# Workdir
+WORKDIR /root/
+
+# Add Delly to PATH
+ENV PATH="/opt/delly/bin:${PATH}"
+
+# Set OpenMP threads
+ENV OMP_NUM_THREADS 2
+
+# by default /bin/sh is executed
+CMD ["/bin/sh"]


=====================================
LICENSE
=====================================
@@ -1,4 +1,6 @@
-Copyright (c) 2020 Delly Project Authors (see AUTHORS file for details).
+BSD 3-Clause License
+
+Copyright (c) 2012- European Molecular Biology Laboratory (EMBL)
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
@@ -16,4 +18,4 @@ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE A
 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


=====================================
R/cnv.R
=====================================
@@ -8,7 +8,8 @@ x = read.table(args[1], header=F)
 colnames(x)[1] = c("cnv")
 x = melt(x, id.vars=c("cnv"))
 x$cn = round(x$value)
-x[x$cn > 9,]$cn = 9
+if (sum(x$cn > 9)) { x[x$cn > 9,]$cn = 9; }
+
 x$cn = factor(x$cn, levels=0:9)
 nsamples = length(unique(x$variable))
 nbins = sqrt(nsamples)


=====================================
README.md
=====================================
@@ -202,6 +202,9 @@ Somatic copy-number alterations (SCNAs)
 
 FAQ
 ---
+* Visualization of SVs      
+You may want to try out [wally](https://github.com/tobiasrausch/wally) to plot candidate structural variants. The paired-end coloring is explained in [wally's README](https://github.com/tobiasrausch/wally#paired-end-view) file.
+
 * What is the smallest SV size Delly can call?  
 This depends on the sharpness of the insert size distribution. For an insert size of 200-300bp with a 20-30bp standard deviation, Delly starts to call reliable SVs >=300bp. Delly also supports calling of small InDels using soft-clipped reads only, the smallest SV size called is 15bp.
 
@@ -223,6 +226,17 @@ There is a delly discussion group [delly-users](http://groups.google.com/d/forum
 * Docker/Singularity support?            
 There is a dockerized delly available [here](https://hub.docker.com/r/dellytools/delly/) and singularity containers (*.sif files) are part of the [delly release](https://github.com/dellytools/delly/releases).
 
+* How can I compute a mappability map?               
+A basic mappability map can be built using [dicey](https://github.com/gear-genomics/dicey), [samtools](https://github.com/samtools/samtools) and [bwa](https://github.com/lh3/bwa) with the below commands (as an example for the sacCer3 reference):
+```
+dicey chop sacCer3.fa
+bwa index sacCer3.fa
+bwa mem sacCer3.fa read1.fq.gz read2.fq.gz | samtools sort -@ 8 -o srt.bam -
+samtools index srt.bam 
+dicey mappability2 srt.bam 
+gunzip map.fa.gz && bgzip map.fa && samtools faidx map.fa.gz 
+```
+
 * Bioconda support?              
 Delly is available via [bioconda](http://bioconda.github.io/recipes/delly/README.html).
 


=====================================
debian/changelog
=====================================
@@ -1,3 +1,14 @@
+delly (0.9.1-1) unstable; urgency=medium
+
+  * Team upload.
+  * New upstream version
+  * Standards-Version: 4.6.0 (routine-update)
+  * Add missing build dependency on dh addon.
+  * Avoid explicitly specifying -Wl,--as-needed linker flag.
+  * No need to repack source any more
+
+ -- Andreas Tille <tille at debian.org>  Sun, 16 Jan 2022 16:32:18 +0100
+
 delly (0.8.7-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -12,8 +12,9 @@ Build-Depends: debhelper-compat (= 13),
                libhts-dev,
                libbz2-dev,
                zlib1g-dev,
-               chrpath
-Standards-Version: 4.5.1
+               chrpath,
+               debhelper
+Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/med-team/delly
 Vcs-Git: https://salsa.debian.org/med-team/delly.git
 Homepage: https://github.com/dellytools/delly


=====================================
debian/copyright
=====================================
@@ -1,11 +1,6 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: delly
 Source: https://github.com/dellytools/delly
-Files-Excluded:
- src/dpe
- bin/delly
- src/delly
- src/htslib
 
 Files: *
 Copyright: 2012-2020 Tobias Rausch <rausch at embl.de>


=====================================
debian/rules
=====================================
@@ -2,7 +2,6 @@
 #export DH_VERBOSE = 1
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
-export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
 
 %:


=====================================
src/assemble.h
=====================================
@@ -84,8 +84,8 @@ namespace torali
 		for (int i = 0; i < rec->core.l_qseq; ++i) sequence[i] = "=ACMGRSVTWYHKDBN"[bam_seqi(seqptr, i)];
 		int32_t readlen = sequence.size();
 
-		// Extract subsequence
-		int32_t window = 2 * c.minimumFlankSize;
+		// Extract subsequence (otherwise MSA takes forever)
+		int32_t window = 1000;
 		int32_t sPos = srStore[seed][ri].sstart - window;
 		int32_t ePos = srStore[seed][ri].sstart + srStore[seed][ri].inslen + window;
 		if (rec->core.flag & BAM_FREVERSE) {


=====================================
src/classify.h
=====================================
@@ -144,7 +144,12 @@ classifyRun(TClassifyConfig const& c) {
     typedef std::vector<TCnSd> TSampleDist;
     TSampleDist control;
     TSampleDist tumor;
+    bool invalidCNV = false;
     for (int i = 0; i < bcf_hdr_nsamples(hdr); ++i) {
+      if ((!std::isfinite(rdcn[i])) || (rdcn[i] == -1)) {
+	invalidCNV = true;
+	break;
+      }
       if ((germline) || (c.controlSet.find(hdr->samples[i]) != c.controlSet.end())) {
 	// Control or population genomics
 	control.push_back(std::make_pair(rdcn[i], rdsd[i]));
@@ -153,6 +158,7 @@ classifyRun(TClassifyConfig const& c) {
 	tumor.push_back(std::make_pair(rdcn[i], rdsd[i]));
       }
     }
+    if (invalidCNV) continue;
 
     // Classify
     if (!germline) {
@@ -220,7 +226,7 @@ classifyRun(TClassifyConfig const& c) {
 	  for (int i = 0; i < bcf_hdr_nsamples(hdr); ++i) {
 	    rdcn[i] += cnshift;
 	    cnval[i] = boost::math::round(rdcn[i]);
-	    if (cnval[i] < MAX_CN) ++cncount[cnval[i]];
+	    if ((cnval[i] >= 0) && (cnval[i] < MAX_CN)) ++cncount[cnval[i]];
 	  }
 	}
 	
@@ -245,12 +251,18 @@ classifyRun(TClassifyConfig const& c) {
       // Re-compute CNLs
       std::vector<std::string> ftarr(bcf_hdr_nsamples(hdr));
       int32_t altqual = 0;
+      int32_t altcount = 0;
       for (int i = 0; i < bcf_hdr_nsamples(hdr); ++i) {
 	int32_t qval = _computeCNLs(c, rdcn[i], sd, cnl, gqval, i);
-	if (cnval[i] != c.ploidy) altqual += qval;
+	if (cnval[i] != c.ploidy) {
+	  altqual += qval;
+	  ++altcount;
+	}
 	if (gqval[i] < 15) ftarr[i] = "LowQual";
 	else ftarr[i] = "PASS";
       }
+      if (altcount == 0) continue;
+      altqual /= altcount;
       if (altqual < c.qual) continue;
       if (altqual > 10000) altqual = 10000;
       


=====================================
src/cnv.h
=====================================
@@ -132,17 +132,20 @@ namespace torali
       double precndiff = std::abs((c.ploidy * precovsum / preexpcov) - (c.ploidy * succovsum / sucexpcov));
 
       // Intersect with delly SVs
-      int32_t searchWindow = std::max( std::max(1000, cnvs[n].start - cnvs[n].ciposlow), std::max(1000, cnvs[n].ciposhigh - cnvs[n].start));
       typename TSVs::const_iterator itbest = svbp[refIndex].end();
+      int32_t searchStart = std::max(0, std::min(cnvs[n-1].ciendlow, cnvs[n-1].end - 1000));
+      int32_t searchEnd = std::max(cnvs[n].ciposhigh, cnvs[n].start + 1000);
+      int32_t midpoint = (int32_t) ((cnvs[n-1].start + cnvs[n-1].end) / 2);
+      if (searchStart < midpoint) searchStart = midpoint;
+      midpoint = (int32_t) ((cnvs[n].start + cnvs[n].end) / 2);
+      if (searchEnd > midpoint) searchEnd = midpoint;
       // Current CNV start for this breakpoint
-      typename TSVs::const_iterator itsv = std::lower_bound(svbp[refIndex].begin(), svbp[refIndex].end(), SVBreakpoint(std::max(0, cnvs[n].start - searchWindow)), SortSVBreakpoint<SVBreakpoint>());
+      typename TSVs::const_iterator itsv = std::lower_bound(svbp[refIndex].begin(), svbp[refIndex].end(), SVBreakpoint(searchStart), SortSVBreakpoint<SVBreakpoint>());
       for(; itsv != svbp[refIndex].end(); ++itsv) {
-	if (itsv->pos - cnvs[n].start > searchWindow) break;
-	if (itsv->pos >= cnvs[n].end) continue;
-	if (itsv->pos <= cnvs[n-1].start) continue;
+	if (itsv->pos > searchEnd) break;
 	if ((itbest == svbp[refIndex].end()) || (itsv->qual > itbest->qual)) itbest = itsv;
       }
-      if ((itbest != svbp[refIndex].end()) && (itbest->qual > 50)) {
+      if ((itbest != svbp[refIndex].end()) && (itbest->qual >= 50)) {
 	// Check refined CNV
 	precovsum = 0;
 	preexpcov = 0;
@@ -633,7 +636,7 @@ namespace torali
 	++show_progress;
 
 	// Invalid CNV?
-	if (cnvs[i].cn == -1) continue;
+	if ((!c.hasGenoFile) && (cnvs[i].cn == -1)) continue;
 
 	// Integer copy-number
 	int32_t absCN = (int32_t) boost::math::round(cnvs[i].cn);


=====================================
src/coral.h
=====================================
@@ -123,8 +123,8 @@ namespace torali
     faidx_t* faiRef = fai_load(c.genome.string().c_str());
     for(int32_t refIndex=0; refIndex < (int32_t) hdr->n_targets; ++refIndex) {
       ++show_progress;
-      if (chrNoData(c, refIndex, idx)) continue;
-
+      if ((!c.hasGenoFile) && (chrNoData(c, refIndex, idx))) continue;
+      
       // Check presence in mappability map
       std::string tname(hdr->target_name[refIndex]);
       int32_t seqlen = faidx_seq_len(faiMap, tname.c_str());


=====================================
src/coverage.h
=====================================
@@ -25,10 +25,12 @@ namespace torali {
     int32_t bppos;
     int32_t svt;
     uint32_t id;
+    int32_t chr2;
+    int32_t otherBppos;
 
-    SpanPoint() : bppos(0), svt(0), id(0) {}
-    explicit SpanPoint(int32_t bp) : bppos(bp), svt(0), id(0) {}
-    SpanPoint(int32_t bp, int32_t s, uint32_t identifier) : bppos(bp), svt(s), id(identifier) {}
+    SpanPoint() : bppos(0), svt(0), id(0), chr2(0), otherBppos(0) {}
+    explicit SpanPoint(int32_t const bp) : bppos(bp), svt(0), id(0), chr2(0), otherBppos(0) {}
+    SpanPoint(int32_t const bp, int32_t const s, uint32_t const identifier, int32_t const tid, int32_t const obp) : bppos(bp), svt(s), id(identifier), chr2(tid), otherBppos(obp) {}
   };
   
   struct BpRegion {
@@ -380,11 +382,11 @@ namespace torali {
 	  if (itSV->peSupport == 0) continue;
 	  if ((itSV->chr == refIndex) && (itSV->svStart < (int32_t) hdr[file_c]->target_len[refIndex])) {
 	    spanBp[itSV->svStart] = 1;
-	    spanPoint.push_back(SpanPoint(itSV->svStart, itSV->svt, itSV->id));
+	    spanPoint.push_back(SpanPoint(itSV->svStart, itSV->svt, itSV->id, itSV->chr2, itSV->svEnd));
 	  }
 	  if ((itSV->chr2 == refIndex) && (itSV->svEnd < (int32_t) hdr[file_c]->target_len[refIndex])) {
 	    spanBp[itSV->svEnd] = 1;
-	    spanPoint.push_back(SpanPoint(itSV->svEnd, itSV->svt, itSV->id));
+	    spanPoint.push_back(SpanPoint(itSV->svEnd, itSV->svt, itSV->id, itSV->chr, itSV->svStart));
 	  }
 	}
 	std::sort(spanPoint.begin(), spanPoint.end(), SortBp<SpanPoint>());
@@ -597,7 +599,7 @@ namespace torali {
 	    if (sampleLib[file_c].median == 0) continue; // Single-end library or non-valid library
 
 	    // Normal spanning pair
-	    if ((!pairClip) && (getSVType(rec->core) == 2) && (outerISize >= sampleLib[file_c].minNormalISize) && (outerISize <= sampleLib[file_c].maxNormalISize) && (rec->core.tid==rec->core.mtid)) {
+	    if ((!pairClip) && (getSVType(rec) == 2) && (outerISize >= sampleLib[file_c].minNormalISize) && (outerISize <= sampleLib[file_c].maxNormalISize) && (rec->core.tid==rec->core.mtid)) {
 	      // Take X% of the outerisize as the spanned interval
 	      int32_t spanlen = 0.8 * outerISize;
 	      int32_t pbegin = std::min((int32_t) rec->core.pos, (int32_t) rec->core.mpos);
@@ -632,7 +634,7 @@ namespace torali {
 	    }
 	    
 	    // Abnormal spanning coverage
-	    if ((getSVType(rec->core) != 2) || (outerISize < sampleLib[file_c].minNormalISize) || (outerISize > sampleLib[file_c].maxNormalISize) || (rec->core.tid!=rec->core.mtid)) {
+	    if ((getSVType(rec) != 2) || (outerISize < sampleLib[file_c].minNormalISize) || (outerISize > sampleLib[file_c].maxNormalISize) || (rec->core.tid!=rec->core.mtid)) {
 	      // SV type
 	      int32_t svt = _isizeMappingPos(rec, sampleLib[file_c].maxISizeCutoff);
 	      if (svt == -1) continue;
@@ -656,22 +658,27 @@ namespace torali {
 		typename TSpanPoint::iterator itSpan = std::lower_bound(spanPoint.begin(), spanPoint.end(), SpanPoint(pbegin), SortBp<SpanPoint>());
 		for(; ((itSpan != spanPoint.end()) && (pend >= itSpan->bppos)); ++itSpan) {
 		  if (svt == itSpan->svt) {
-		    uint8_t* hpptr = bam_aux_get(rec, "HP");
+		    // Make sure, mate is correct
+		    if (rec->core.mtid == itSpan->chr2) {
+		      if (std::abs((int32_t) rec->core.mpos - itSpan->otherBppos) < sampleLib[file_c].maxNormalISize) {
+			uint8_t* hpptr = bam_aux_get(rec, "HP");
 #pragma omp critical
-		    {
-		      if (c.hasDumpFile) {
-			std::string svid(_addID(itSpan->svt));
-			std::string padNumber = boost::lexical_cast<std::string>(itSpan->id);
-			padNumber.insert(padNumber.begin(), 8 - padNumber.length(), '0');
-			svid += padNumber;
-			dumpOut << svid << "\t" << c.files[file_c].string() << "\t" << bam_get_qname(rec) << "\t" << hdr[file_c]->target_name[rec->core.tid] << "\t" << rec->core.pos << "\t" << hdr[file_c]->target_name[rec->core.mtid] << "\t" << rec->core.mpos << "\t" << (int32_t) rec->core.qual << "\tPE" << std::endl;
-		      }
-		      spanMap[file_c][itSpan->id].alt.push_back(pairQuality);
-		      if (hpptr) {
-			c.isHaplotagged = true;
-			int hap = bam_aux2i(hpptr);
-			if (hap == 1) ++spanMap[file_c][itSpan->id].alth1;
-			else ++spanMap[file_c][itSpan->id].alth2;
+			{
+			  if (c.hasDumpFile) {
+			    std::string svid(_addID(itSpan->svt));
+			    std::string padNumber = boost::lexical_cast<std::string>(itSpan->id);
+			    padNumber.insert(padNumber.begin(), 8 - padNumber.length(), '0');
+			    svid += padNumber;
+			    dumpOut << svid << "\t" << c.files[file_c].string() << "\t" << bam_get_qname(rec) << "\t" << hdr[file_c]->target_name[rec->core.tid] << "\t" << rec->core.pos << "\t" << hdr[file_c]->target_name[rec->core.mtid] << "\t" << rec->core.mpos << "\t" << (int32_t) rec->core.qual << "\tPE" << std::endl;
+			  }
+			  spanMap[file_c][itSpan->id].alt.push_back(pairQuality);
+			  if (hpptr) {
+			    c.isHaplotagged = true;
+			    int hap = bam_aux2i(hpptr);
+			    if (hap == 1) ++spanMap[file_c][itSpan->id].alth1;
+			    else ++spanMap[file_c][itSpan->id].alth2;
+			  }
+			}
 		      }
 		    }
 		  }


=====================================
src/scan.h
=====================================
@@ -190,7 +190,7 @@ namespace torali
 	if (rec->core.flag & (BAM_FSECONDARY | BAM_FQCFAIL | BAM_FDUP | BAM_FSUPPLEMENTARY | BAM_FUNMAP)) continue;
 	if ((rec->core.flag & BAM_FPAIRED) && ((rec->core.flag & BAM_FMUNMAP) || (rec->core.tid != rec->core.mtid))) continue;
 	if (rec->core.qual < c.minQual) continue;
-	if (getSVType(rec->core) != 2) continue;
+	if (getSVType(rec) != 2) continue;
 
 	int32_t midPoint = rec->core.pos + halfAlignmentLength(rec);
 	if (rec->core.flag & BAM_FPAIRED) {


=====================================
src/split.h
=====================================
@@ -458,7 +458,7 @@ namespace torali
     // Check breakpoint
     AlignDescriptor ad;
     if (!_findSplit(c, sv.consensus, svRefStr, align, ad, sv.svt)) return false;
-
+    
     // Get the start and end of the structural variant
     unsigned int finalGapStart = 0;
     unsigned int finalGapEnd = 0;


=====================================
src/tags.h
=====================================
@@ -174,32 +174,21 @@ namespace torali {
   // 2: Deletion-type
   // 3: Duplication-type
 
-  template<typename TBamRecord>
   inline uint8_t
-  getSVType(TBamRecord const& al) {
-    if (al.flag & BAM_FREAD1) {
-      if (!(al.flag & BAM_FREVERSE)) {
-	if (!(al.flag & BAM_FMREVERSE)) return 0;
-	else return (al.pos < al.mpos) ? 2 : 3;
-      } else {
-	if (!(al.flag & BAM_FMREVERSE)) return (al.pos > al.mpos) ? 2 : 3;
-	else return 1;
-      }
+  getSVType(bam1_t* rec) {
+    if (!(rec->core.flag & BAM_FREVERSE)) {
+      if (!(rec->core.flag & BAM_FMREVERSE)) return 0;
+      else return (rec->core.pos < rec->core.mpos) ? 2 : 3;
     } else {
-      if (!(al.flag & BAM_FREVERSE)) {
-	if (!(al.flag & BAM_FMREVERSE)) return 0;
-	else return (al.pos < al.mpos) ? 2 : 3;
-      } else {
-	if (!(al.flag & BAM_FMREVERSE)) return (al.pos > al.mpos) ? 2 : 3;
-	else return 1;
-      }
+      if (!(rec->core.flag & BAM_FMREVERSE)) return (rec->core.pos > rec->core.mpos) ? 2 : 3;
+      else return 1;
     }
   }
 
   inline int32_t
   _isizeMappingPos(bam1_t* rec, int32_t isize) {
     if (_translocation(rec)) {
-      uint8_t orient = getSVType(rec->core);
+      uint8_t orient = getSVType(rec);
       if (orient == 0) return DELLY_SVT_TRANS + 0;
       else if (orient == 1) return DELLY_SVT_TRANS + 1;
       else {
@@ -214,7 +203,7 @@ namespace torali {
       }
     } else {
       if (rec->core.pos == rec->core.mpos) return -1; // No SV
-      uint8_t orient = getSVType(rec->core);
+      uint8_t orient = getSVType(rec);
       if (orient == 0) return 0;
       else if (orient == 1) return 1;
       else if (orient == 2) {


=====================================
src/tegua.h
=====================================
@@ -241,7 +241,7 @@ namespace torali {
    boost::program_options::options_description cons("Consensus options");
    cons.add_options()
      ("max-reads,p", boost::program_options::value<uint32_t>(&c.maxReadPerSV)->default_value(5), "max. reads for consensus computation")
-     ("flank-size,f", boost::program_options::value<int32_t>(&c.minimumFlankSize)->default_value(400), "min. flank size")
+     ("flank-size,f", boost::program_options::value<int32_t>(&c.minimumFlankSize)->default_value(100), "min. flank size")
      ("flank-quality,a", boost::program_options::value<float>(&c.flankQuality)->default_value(0.9), "min. flank quality")
      ;     
    


=====================================
src/util.h
=====================================
@@ -621,7 +621,7 @@ namespace torali
 	      if ((rec->core.flag & BAM_FPAIRED) && !(rec->core.flag & BAM_FMUNMAP) && (rec->core.tid==rec->core.mtid)) {
 		if (processedNumPairs < maxNumAlignments) {
 		  vecISize.push_back(abs(rec->core.isize));
-		  if (getSVType(rec->core) == 2) ++rplus;
+		  if (getSVType(rec) == 2) ++rplus;
 		  else ++nonrplus;
 		  ++processedNumPairs;
 		}


=====================================
src/version.h
=====================================
@@ -5,7 +5,7 @@ namespace torali
 {
 
 
-  std::string dellyVersionNumber = "0.8.7";
+  std::string dellyVersionNumber = "0.9.1";
 
   inline 
     void printTitle(std::string const& title) 



View it on GitLab: https://salsa.debian.org/med-team/delly/-/compare/ee0eb47e0003f063a3ad24c29f0fba4b23d69afd...9b59708825dad418098746cdc03446c2dad27884

-- 
View it on GitLab: https://salsa.debian.org/med-team/delly/-/compare/ee0eb47e0003f063a3ad24c29f0fba4b23d69afd...9b59708825dad418098746cdc03446c2dad27884
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/20220116/887dd68c/attachment-0001.htm>


More information about the debian-med-commit mailing list