[med-svn] [Git][med-team/delly][upstream] New upstream version 1.1.5
Andreas Tille (@tille)
gitlab at salsa.debian.org
Fri Sep 30 12:23:31 BST 2022
Andreas Tille pushed to branch upstream at Debian Med / delly
Commits:
180cd996 by Andreas Tille at 2022-09-30T13:17:06+02:00
New upstream version 1.1.5
- - - - -
12 changed files:
- Makefile
- src/asmode.h
- src/delly.cpp
- src/delly.h
- src/junction.h
- src/merge.h
- src/msa.h
- src/scan.h
- src/shortpe.h
- src/tegua.h
- src/util.h
- src/version.h
Changes:
=====================================
Makefile
=====================================
@@ -55,7 +55,7 @@ TARGETS = ${SUBMODULES} ${BUILT_PROGRAMS}
all: $(TARGETS)
.htslib: $(HTSLIBSOURCES)
- if [ -r src/htslib/Makefile ]; then cd src/htslib && autoheader && autoconf && ./configure --disable-s3 --disable-gcs --disable-libcurl --disable-plugins && $(MAKE) && $(MAKE) lib-static && cd ../../ && touch .htslib; fi
+ if [ -r src/htslib/Makefile ]; then cd src/htslib && autoreconf -i && ./configure --disable-s3 --disable-gcs --disable-libcurl --disable-plugins && $(MAKE) && $(MAKE) lib-static && cd ../../ && touch .htslib; fi
src/delly: ${SUBMODULES} $(SOURCES)
$(CXX) $(CXXFLAGS) $@.cpp src/edlib.cpp -o $@ $(LDFLAGS)
=====================================
src/asmode.h
=====================================
@@ -37,7 +37,6 @@ namespace torali {
struct AsmConfig {
bool hasDumpFile;
bool hasVcfFile;
- bool svtcmd;
uint16_t minMapQual;
uint16_t minGenoQual;
uint32_t minClip;
@@ -419,7 +418,10 @@ namespace torali {
}
// SV types to compute?
- _svTypesToCompute(c, svtype, vm.count("svtype"));
+ if (!_svTypesToCompute(c, svtype)) {
+ std::cerr << "Please specify a valid SV type, i.e., -t INV or -t DEL,INV without spaces." << std::endl;
+ return 1;
+ }
// Dump reads
if (vm.count("dump")) c.hasDumpFile = true;
=====================================
src/delly.cpp
=====================================
@@ -4,6 +4,7 @@
#include <fstream>
#define BOOST_DISABLE_ASSERTS
+#define BOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX
#ifdef OPENMP
#include <omp.h>
=====================================
src/delly.h
=====================================
@@ -68,7 +68,6 @@ namespace torali
bool hasExcludeFile;
bool hasVcfFile;
bool hasDumpFile;
- bool svtcmd;
std::set<int32_t> svtset;
DnaScore<int> aliscore;
boost::filesystem::path outfile;
@@ -257,7 +256,13 @@ namespace torali
}
// SV types to compute?
- _svTypesToCompute(c, svtype, vm.count("svtype"));
+ if (!_svTypesToCompute(c, svtype)) {
+ std::cerr << "Please specify a valid SV type, i.e., -t INV or -t DEL,INV without spaces." << std::endl;
+ return 1;
+ }
+ //typedef std::set<int32_t> TSvSetTmp;
+ //for(typename TSvSetTmp::iterator itst = c.svtset.begin(); itst!=c.svtset.end(); ++itst) std::cerr << *itst << std::endl;
+ //std::cerr << c.svtset.size() << std::endl;
// Dump PE and SR support?
if (vm.count("dump")) c.hasDumpFile = true;
=====================================
src/junction.h
=====================================
@@ -459,11 +459,11 @@ namespace torali
inline void
fetchSVs(TConfig const& c, TReadBp& readBp, std::vector<std::vector<SRBamRecord> >& br) {
// Extract BAM records
- if ((!c.svtcmd) || (c.svtset.find(2) != c.svtset.end())) selectDeletions(c, readBp, br);
- if ((!c.svtcmd) || (c.svtset.find(3) != c.svtset.end())) selectDuplications(c, readBp, br);
- if ((!c.svtcmd) || (c.svtset.find(0) != c.svtset.end()) || (c.svtset.find(1) != c.svtset.end())) selectInversions(c, readBp, br);
- if ((!c.svtcmd) || (c.svtset.find(4) != c.svtset.end())) selectInsertions(c, readBp, br);
- if ((!c.svtcmd) || (c.svtset.find(5) != c.svtset.end()) || (c.svtset.find(6) != c.svtset.end()) || (c.svtset.find(7) != c.svtset.end()) || (c.svtset.find(8) != c.svtset.end())) selectTranslocations(c, readBp, br);
+ if ((c.svtset.empty()) || (c.svtset.find(2) != c.svtset.end())) selectDeletions(c, readBp, br);
+ if ((c.svtset.empty()) || (c.svtset.find(3) != c.svtset.end())) selectDuplications(c, readBp, br);
+ if ((c.svtset.empty()) || (c.svtset.find(0) != c.svtset.end()) || (c.svtset.find(1) != c.svtset.end())) selectInversions(c, readBp, br);
+ if ((c.svtset.empty()) || (c.svtset.find(4) != c.svtset.end())) selectInsertions(c, readBp, br);
+ if ((c.svtset.empty()) || (c.svtset.find(5) != c.svtset.end()) || (c.svtset.find(6) != c.svtset.end()) || (c.svtset.find(7) != c.svtset.end()) || (c.svtset.find(8) != c.svtset.end())) selectTranslocations(c, readBp, br);
}
template<typename TConfig, typename TValidRegions, typename TSvtSRBamRecord>
=====================================
src/merge.h
=====================================
@@ -1,6 +1,8 @@
#ifndef MERGE_H
#define MERGE_H
+#define BOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX
+
#include <iostream>
#include <fstream>
#include <boost/unordered_map.hpp>
=====================================
src/msa.h
=====================================
@@ -163,8 +163,7 @@ namespace torali {
// Calculate coverage
typedef boost::multi_array<bool, 2> TFlag;
- TFlag fl;
- fl.resize(boost::extents[align.shape()[0]][align.shape()[1]]);
+ TFlag fl(boost::extents[align.shape()[0]][align.shape()[1]]);
typedef std::vector<int> TCoverage;
TCoverage cov;
cov.resize(align.shape()[1], 0);
=====================================
src/scan.h
=====================================
@@ -95,7 +95,7 @@ namespace torali
for (int32_t refIndex = 0; refIndex < hdr->n_targets; ++refIndex) {
for(typename TChrIntervals::iterator it = scanRegions[refIndex].begin(); it != scanRegions[refIndex].end(); ++it) {
if (it->lower() < it->upper()) {
- if ((it->lower() >= 0) && (it->upper() < hdr->target_len[refIndex])) {
+ if (it->upper() < hdr->target_len[refIndex]) {
ScanWindow sw;
sw.start = it->lower();
sw.end = it->upper();
=====================================
src/shortpe.h
=====================================
@@ -362,7 +362,7 @@ namespace torali
// SV type
int32_t svt = _isizeMappingPos(rec, sampleLib[file_c].maxISizeCutoff);
if (svt == -1) continue;
- if ((c.svtcmd) && (c.svtset.find(svt) == c.svtset.end())) continue;
+ if ((!c.svtset.empty()) && (c.svtset.find(svt) == c.svtset.end())) continue;
// Check library-specific insert size for deletions
if ((svt == 2) && (sampleLib[file_c].maxISizeCutoff > std::abs(rec->core.isize))) continue;
@@ -422,11 +422,11 @@ namespace torali
// Collect split-read SVs
#pragma omp critical
{
- if ((!c.svtcmd) || (c.svtset.find(2) != c.svtset.end())) selectDeletions(c, readBp, srBR);
- if ((!c.svtcmd) || (c.svtset.find(3) != c.svtset.end())) selectDuplications(c, readBp, srBR);
- if ((!c.svtcmd) || (c.svtset.find(0) != c.svtset.end()) || (c.svtset.find(1) != c.svtset.end())) selectInversions(c, readBp, srBR);
- if ((!c.svtcmd) || (c.svtset.find(4) != c.svtset.end())) selectInsertions(c, readBp, srBR);
- if ((!c.svtcmd) || (c.svtset.find(DELLY_SVT_TRANS) != c.svtset.end()) || (c.svtset.find(DELLY_SVT_TRANS + 1) != c.svtset.end()) || (c.svtset.find(DELLY_SVT_TRANS + 2) != c.svtset.end()) || (c.svtset.find(DELLY_SVT_TRANS + 3) != c.svtset.end())) selectTranslocations(c, readBp, srBR);
+ if ((c.svtset.empty()) || (c.svtset.find(2) != c.svtset.end())) selectDeletions(c, readBp, srBR);
+ if ((c.svtset.empty()) || (c.svtset.find(3) != c.svtset.end())) selectDuplications(c, readBp, srBR);
+ if ((c.svtset.empty()) || (c.svtset.find(0) != c.svtset.end()) || (c.svtset.find(1) != c.svtset.end())) selectInversions(c, readBp, srBR);
+ if ((c.svtset.empty()) || (c.svtset.find(4) != c.svtset.end())) selectInsertions(c, readBp, srBR);
+ if ((c.svtset.empty()) || (c.svtset.find(DELLY_SVT_TRANS) != c.svtset.end()) || (c.svtset.find(DELLY_SVT_TRANS + 1) != c.svtset.end()) || (c.svtset.find(DELLY_SVT_TRANS + 2) != c.svtset.end()) || (c.svtset.find(DELLY_SVT_TRANS + 3) != c.svtset.end())) selectTranslocations(c, readBp, srBR);
}
}
@@ -437,7 +437,7 @@ namespace torali
now = boost::posix_time::second_clock::local_time();
std::cerr << '[' << boost::posix_time::to_simple_string(now) << "] " << "Split-read clustering" << std::endl;
for(uint32_t svt = 0; svt < srBR.size(); ++svt) {
- if ((c.svtcmd) && (c.svtset.find(svt) == c.svtset.end())) continue;
+ if ((!c.svtset.empty()) && (c.svtset.find(svt) == c.svtset.end())) continue;
if (srBR[svt].empty()) continue;
// Sort
@@ -457,7 +457,7 @@ namespace torali
// Maximum variability in insert size
int32_t varisize = getVariability(c, sampleLib);
for(int32_t svt = 0; svt < (int32_t) bamRecord.size(); ++svt) {
- if ((c.svtcmd) && (c.svtset.find(svt) == c.svtset.end())) continue;
+ if ((!c.svtset.empty()) && (c.svtset.find(svt) == c.svtset.end())) continue;
if (bamRecord[svt].empty()) continue;
// Sort BAM records according to position
=====================================
src/tegua.h
=====================================
@@ -38,7 +38,6 @@ namespace torali {
bool hasDumpFile;
bool hasExcludeFile;
bool hasVcfFile;
- bool svtcmd;
uint16_t minMapQual;
uint16_t minGenoQual;
uint32_t minClip;
@@ -268,7 +267,10 @@ namespace torali {
_alignmentScore(c, scoring);
// SV types to compute?
- _svTypesToCompute(c, svtype, vm.count("svtype"));
+ if (!_svTypesToCompute(c, svtype)) {
+ std::cerr << "Please specify a valid SV type, i.e., -t INV or -t DEL,INV without spaces." << std::endl;
+ return 1;
+ }
// Dump reads
if (vm.count("dump")) c.hasDumpFile = true;
=====================================
src/util.h
=====================================
@@ -208,41 +208,46 @@ namespace torali
}
template<typename TConfig>
- inline void
- _svTypesToCompute(TConfig& c, std::string const& svtype, bool const specified) {
- c.svtcmd = false;
- if (specified) {
- c.svtcmd = true;
- if (svtype == "DEL") {
- c.svtset.insert(2);
- } else if (svtype == "INS") {
- c.svtset.insert(4);
- } else if (svtype == "DUP") {
- c.svtset.insert(3);
- } else if (svtype == "INV") {
- c.svtset.insert(0);
- c.svtset.insert(1);
- } else if (svtype == "INV_3to3") {
- c.svtset.insert(0);
- } else if (svtype == "INV_5to5") {
- c.svtset.insert(1);
- } else if (svtype == "BND") {
- c.svtset.insert(DELLY_SVT_TRANS + 0);
- c.svtset.insert(DELLY_SVT_TRANS + 1);
- c.svtset.insert(DELLY_SVT_TRANS + 2);
- c.svtset.insert(DELLY_SVT_TRANS + 3);
- } else if (svtype == "BND_3to3") {
- c.svtset.insert(DELLY_SVT_TRANS + 0);
- } else if (svtype == "BND_5to5") {
- c.svtset.insert(DELLY_SVT_TRANS + 1);
- } else if (svtype == "BND_3to5") {
- c.svtset.insert(DELLY_SVT_TRANS + 2);
- } else if (svtype == "BND_5to3") {
- c.svtset.insert(DELLY_SVT_TRANS + 3);
- } else {
- c.svtcmd = false;
+ inline bool
+ _svTypesToCompute(TConfig& c, std::string const& svtype) {
+ if (svtype == "ALL") return true;
+ else {
+ typedef boost::tokenizer< boost::char_separator<char> > Tokenizer;
+ boost::char_separator<char> sep(",");
+ Tokenizer tokens(svtype, sep);
+ for(Tokenizer::iterator tokIter = tokens.begin(); tokIter!=tokens.end(); ++tokIter) {
+ if (*tokIter == "DEL") {
+ c.svtset.insert(2);
+ } else if (*tokIter == "INS") {
+ c.svtset.insert(4);
+ } else if (*tokIter == "DUP") {
+ c.svtset.insert(3);
+ } else if (*tokIter == "INV") {
+ c.svtset.insert(0);
+ c.svtset.insert(1);
+ } else if (*tokIter == "INV_3to3") {
+ c.svtset.insert(0);
+ } else if (*tokIter == "INV_5to5") {
+ c.svtset.insert(1);
+ } else if (*tokIter == "BND") {
+ c.svtset.insert(DELLY_SVT_TRANS + 0);
+ c.svtset.insert(DELLY_SVT_TRANS + 1);
+ c.svtset.insert(DELLY_SVT_TRANS + 2);
+ c.svtset.insert(DELLY_SVT_TRANS + 3);
+ } else if (*tokIter == "BND_3to3") {
+ c.svtset.insert(DELLY_SVT_TRANS + 0);
+ } else if (*tokIter == "BND_5to5") {
+ c.svtset.insert(DELLY_SVT_TRANS + 1);
+ } else if (*tokIter == "BND_3to5") {
+ c.svtset.insert(DELLY_SVT_TRANS + 2);
+ } else if (*tokIter == "BND_5to3") {
+ c.svtset.insert(DELLY_SVT_TRANS + 3);
+ } else {
+ return false;
+ }
}
}
+ return true;
}
inline uint32_t sequenceLength(bam1_t const* rec) {
=====================================
src/version.h
=====================================
@@ -5,7 +5,7 @@ namespace torali
{
- std::string dellyVersionNumber = "1.1.3";
+ std::string dellyVersionNumber = "1.1.5";
inline
void printTitle(std::string const& title)
View it on GitLab: https://salsa.debian.org/med-team/delly/-/commit/180cd996ad851218e8c5dea308929b5dbe07fb5e
--
View it on GitLab: https://salsa.debian.org/med-team/delly/-/commit/180cd996ad851218e8c5dea308929b5dbe07fb5e
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/20220930/458ce2fa/attachment-0001.htm>
More information about the debian-med-commit
mailing list