From 9f538e4d7dee204eb873f54d42c4dce2d2f832bb Mon Sep 17 00:00:00 2001 From: Tobias Rausch Date: Fri, 6 Dec 2024 10:49:31 +0100 Subject: [PATCH] v1.3.2 --- README.md | 4 ++++ src/asmode.h | 1 - src/assemble.h | 8 ++++---- src/delly.h | 1 - src/modvcf.h | 3 +-- src/tegua.h | 8 +------- src/version.h | 2 +- 7 files changed, 11 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 81ff161..e4b77c7 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,10 @@ Structural variants are still reported with respect to GRCh38 coordinates but th `bcftools view -i '(QUAL>=300) && ( ((SVTYPE=="INS") && (INFO/SVLEN>50)) || (SVTYPE="BND") || ((INFO/END - POS)>50) )' delly.bcf` +Please note that for inter-chromosomal translocations, delly uses `INFO/CHR2` for the second chromosome. You can convert an inter-chromosomal translocation to the two-record breakend format using: + +`python scripts/delly2bnd.py -v delly.bcf -r hg38.fa -o delly.bnd.bcf` + Read-depth profiles and copy-number variant calling --------------------------------------------------- diff --git a/src/asmode.h b/src/asmode.h index b54a256..37b2a5a 100644 --- a/src/asmode.h +++ b/src/asmode.h @@ -36,7 +36,6 @@ namespace torali { struct AsmConfig { bool hasVcfFile; - bool skipGenotyping; uint16_t minMapQual; uint32_t minClip; uint32_t minCliqueSize; diff --git a/src/assemble.h b/src/assemble.h index ddfffdb..8efd5f2 100644 --- a/src/assemble.h +++ b/src/assemble.h @@ -855,7 +855,7 @@ namespace torali tmpCons = svs[svid].consensus; svs[svid].consensus = svs[svid].consensus.substr(offsetTmpCons, svSize); } - if ((c.skipGenotyping) || (alignConsensus(c, hdr, seq, NULL, svs[svid], true))) msaSuccess = true; + if (alignConsensus(c, hdr, seq, NULL, svs[svid], true)) msaSuccess = true; if (!tmpCons.empty()) { svs[svid].consensus = tmpCons; svs[svid].consBp += offsetTmpCons; @@ -865,7 +865,7 @@ namespace torali std::string suffix = boost::to_upper_copy(std::string(seq + svs[svid].svStart, seq + std::min(seqlen, svs[svid].svStart + c.minConsWindow))); msaWfa(c, seqStore[svid], svs[svid].consensus, prefix, suffix); if ((int32_t) svs[svid].consensus.size() < svs[svid].insLen + 4 * c.minConsWindow) { - if ((c.skipGenotyping) || (alignConsensus(c, hdr, seq, NULL, svs[svid], false))) msaSuccess = true; + if (alignConsensus(c, hdr, seq, NULL, svs[svid], false)) msaSuccess = true; } } //std::cerr << msaSuccess << std::endl; @@ -921,7 +921,7 @@ namespace torali tmpCons = svs[svid].consensus; svs[svid].consensus = svs[svid].consensus.substr(offsetTmpCons, svSize); } - if ((c.skipGenotyping) || (alignConsensus(c, hdr, seq, sndSeq, svs[svid], true))) msaSuccess = true; + if (alignConsensus(c, hdr, seq, sndSeq, svs[svid], true)) msaSuccess = true; if (!tmpCons.empty()) { svs[svid].consensus = tmpCons; svs[svid].consBp += offsetTmpCons; @@ -931,7 +931,7 @@ namespace torali std::string suffix = boost::to_upper_copy(std::string(seq + svs[svid].svStart, seq + std::min(seqlen, svs[svid].svStart + c.minConsWindow))); msaWfa(c, seqStore[svid], svs[svid].consensus, prefix, suffix); if ((int32_t) svs[svid].consensus.size() < svs[svid].insLen + 4 * c.minConsWindow) { - if ((c.skipGenotyping) || (alignConsensus(c, hdr, seq, NULL, svs[svid], false))) msaSuccess = true; + if (alignConsensus(c, hdr, seq, NULL, svs[svid], false)) msaSuccess = true; } } //std::cerr << msaSuccess << std::endl; diff --git a/src/delly.h b/src/delly.h index a7524c1..f138953 100644 --- a/src/delly.h +++ b/src/delly.h @@ -65,7 +65,6 @@ namespace torali bool hasExcludeFile; bool hasVcfFile; bool hasDumpFile; - bool skipGenotyping; std::set svtset; DnaScore aliscore; boost::filesystem::path outfile; diff --git a/src/modvcf.h b/src/modvcf.h index bce49fe..c578df1 100644 --- a/src/modvcf.h +++ b/src/modvcf.h @@ -419,7 +419,7 @@ vcfOutput(TConfig const& c, std::vector& svs, TJunctio for(typename TSVs::iterator svIter = svs.begin(); svIter!=svs.end(); ++svIter) { if ((svIter->srSupport == 0) && (svIter->peSupport == 0)) continue; // In discovery mode, skip SVs that have less than 2 reads support after genotyping - if ((!c.hasVcfFile) && (!c.skipGenotyping)) { + if (!c.hasVcfFile) { uint32_t totalGtSup = 0; for(unsigned int file_c = 0; file_c < c.files.size(); ++file_c) { totalGtSup += spanCountMap[file_c][svIter->id].alt.size() + jctCountMap[file_c][svIter->id].alt.size(); @@ -449,7 +449,6 @@ vcfOutput(TConfig const& c, std::vector& svs, TJunctio padNumber.insert(padNumber.begin(), 8 - padNumber.length(), '0'); id += padNumber; bcf_update_id(hdr, rec, id.c_str()); - if (c.skipGenotyping) svIter->alleles = _addAlleles("N", std::string(bamhd->target_name[svIter->chr2]), *svIter, svIter->svt); std::string alleles = _replaceIUPAC(svIter->alleles); bcf_update_alleles_str(hdr, rec, alleles.c_str()); bcf_update_filter(hdr, rec, &tmpi, 1); diff --git a/src/tegua.h b/src/tegua.h index 9452f72..8d4e08c 100644 --- a/src/tegua.h +++ b/src/tegua.h @@ -39,7 +39,6 @@ namespace torali { bool hasExcludeFile; bool hasVcfFile; bool hasAltFile; - bool skipGenotyping; uint16_t minMapQual; uint16_t minGenoQual; uint32_t minClip; @@ -170,7 +169,7 @@ namespace torali { } // SV Genotyping - if (!c.skipGenotyping) genotypeLR(c, svs, jctMap, rcMap); + genotypeLR(c, svs, jctMap, rcMap); // VCF Output vcfOutput(c, svs, jctMap, rcMap, spanMap); @@ -236,7 +235,6 @@ namespace torali { ("pruning,j", boost::program_options::value(&c.graphPruning)->default_value(1000), "graph pruning cutoff") ("extension,e", boost::program_options::value(&c.indelExtension)->default_value(0.5), "enforce indel extension") ("scoring,s", boost::program_options::value(&scoring)->default_value("3,-2,-3,-1"), "alignment scoring") - ("skipGT,k", "skip consensus realignment and genotyping (useful for complex SVs)") ; boost::program_options::positional_options_description pos_args; @@ -384,10 +382,6 @@ namespace torali { } } - // Consensus alignment? - if (vm.count("skipGT")) c.skipGenotyping = true; - else c.skipGenotyping = false; - // Show cmd boost::posix_time::ptime now = boost::posix_time::second_clock::local_time(); std::cerr << '[' << boost::posix_time::to_simple_string(now) << "] "; diff --git a/src/version.h b/src/version.h index 4377a61..6d6f742 100644 --- a/src/version.h +++ b/src/version.h @@ -5,7 +5,7 @@ namespace torali { - std::string dellyVersionNumber = "1.3.1"; + std::string dellyVersionNumber = "1.3.2"; inline void printTitle(std::string const& title)