Skip to content

Commit 01d1bb6

Browse files
Sebastian NiehusSebastian Niehus
authored andcommitted
Remove obsolete distinction based on "informativeness"
- Remove obsolete distinction based on "informativeness" of a read pair prior to likelihood calculations. - Fix bug in VCF position calculation if the position of a variant was 1.
1 parent a7a5615 commit 01d1bb6

4 files changed

Lines changed: 10 additions & 20 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ SEQAN_LIB=.
1414
CXXFLAGS+=-I$(SEQAN_LIB) -DSEQAN_HAS_ZLIB=1 -std=c++14 -DSEQAN_DISABLE_VERSION_CHECK
1515
LDLIBS=-lz -lpthread
1616

17-
DATE=on 2020-07-30
18-
VERSION=1.2.1
17+
DATE=on 2020-08-04
18+
VERSION=1.2.2
1919
CXXFLAGS+=-DDATE=\""$(DATE)"\" -DVERSION=\""$(VERSION)"\"
2020

2121
# Enable warnings

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ Preprint available at bioRxiv 740225; doi: https://doi.org/10.1101/740225
5555

5656
## Version and License
5757
```
58-
Last update: 2020-07-30
59-
PopDel version: 1.2.1
58+
Last update: 2020-08-04
59+
PopDel version: 1.2.2
6060
SeqAn version: 2.3.1 (modified)
6161
Author: Sebastian Niehus (Sebastian.Niehus[at]bihealth.de)
6262
```

popdel_call/genotype_deletion_popdel_call.h

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -203,18 +203,13 @@ inline Triple<long double> compute_data_likelihoods(String<Triple<long double> >
203203
int currentDeviation = chromosomeProfiles.getSingleDeviation(rg, it);
204204
long double refLikelihood = I(hist, currentDeviation - refShift);
205205
long double delLikelihood = I(hist, currentDeviation - deletion_length);
206-
if (refLikelihood < 2 * delLikelihood && delLikelihood < 2 * refLikelihood)
207-
{
208-
++it;
209-
continue; // unclear support.
210-
}
211206
// std::cout << "====================================================" << std::endl;
212207
// std::cout << "Pos:\t" << chromosomeProfiles.currentPos << std::endl;
213208
// std::cout << "Dev:\t" << currentDeviation << std::endl;
214209
// std::cout << "L(REF):\t" << refLikelihood << std::endl;
215210
// std::cout << "L(DEL):\t" << delLikelihood << std::endl;
216211
long double g0 = log(refLikelihood);
217-
long double g1 = log(refLikelihood +delLikelihood) - log(2.0);
212+
long double g1 = log(refLikelihood +delLikelihood) - log(2.0);
218213
long double g2 = log(delLikelihood);
219214
currentRgWiseDataLikelihoods.i1 += g0;
220215
currentRgWiseDataLikelihoods.i2 += g1;
@@ -291,20 +286,12 @@ inline Triple<long double> compute_data_likelihoods(Triple<long double> & gtLogs
291286
long double refLikelihood = I(hist, currentDeviation - refShift);
292287
long double delLikelihood = I(hist, currentDeviation - deletion_length);
293288
if (refLikelihood >= 2 * delLikelihood)
294-
{
295289
++lad.i1; // Supporting the reference
296-
297-
}
298290
else if (delLikelihood >= 2 * refLikelihood)
299-
{
300291
++lad.i3; // Supporting a deletion
301-
}
302292
else
303-
{
304293
++lad.i2; // Unclear support.
305-
++it;
306-
continue;
307-
}
294+
308295
logLikelihoods.i1 += log(refLikelihood);
309296
gtLogs.i1 += log10(refLikelihood);
310297
logLikelihoods.i2 += log(refLikelihood +delLikelihood) - log(2.0);

popdel_call/vcfout_popdel_call.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,10 @@ inline VcfRecord buildRecord(const QuantileMap& quantileMap, const Call& call, i
177177
{
178178
VcfRecord record;
179179
record.rID = rID;
180-
record.beginPos = call.position;
180+
if (call.position > 1)
181+
record.beginPos = call.position - 1;
182+
else
183+
record.beginPos = call.position;
181184
record.id = ".";
182185
record.ref = "N";
183186
record.alt = "<DEL>";

0 commit comments

Comments
 (0)