Skip to content

Commit

Permalink
v1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasrausch committed Dec 6, 2024
1 parent 8696a1a commit 9f538e4
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 16 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/asmode.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ namespace torali {

struct AsmConfig {
bool hasVcfFile;
bool skipGenotyping;
uint16_t minMapQual;
uint32_t minClip;
uint32_t minCliqueSize;
Expand Down
8 changes: 4 additions & 4 deletions src/assemble.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
1 change: 0 additions & 1 deletion src/delly.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ namespace torali
bool hasExcludeFile;
bool hasVcfFile;
bool hasDumpFile;
bool skipGenotyping;
std::set<int32_t> svtset;
DnaScore<int> aliscore;
boost::filesystem::path outfile;
Expand Down
3 changes: 1 addition & 2 deletions src/modvcf.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ vcfOutput(TConfig const& c, std::vector<TStructuralVariantRecord>& 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();
Expand Down Expand Up @@ -449,7 +449,6 @@ vcfOutput(TConfig const& c, std::vector<TStructuralVariantRecord>& 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);
Expand Down
8 changes: 1 addition & 7 deletions src/tegua.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ namespace torali {
bool hasExcludeFile;
bool hasVcfFile;
bool hasAltFile;
bool skipGenotyping;
uint16_t minMapQual;
uint16_t minGenoQual;
uint32_t minClip;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -236,7 +235,6 @@ namespace torali {
("pruning,j", boost::program_options::value<uint32_t>(&c.graphPruning)->default_value(1000), "graph pruning cutoff")
("extension,e", boost::program_options::value<float>(&c.indelExtension)->default_value(0.5), "enforce indel extension")
("scoring,s", boost::program_options::value<std::string>(&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;
Expand Down Expand Up @@ -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) << "] ";
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9f538e4

Please sign in to comment.