Skip to content

Commit

Permalink
v11.3 - better fit for contamination value for ploidy 1, 3 and 4
Browse files Browse the repository at this point in the history
  • Loading branch information
valeu committed Jan 23, 2018
1 parent ec1917d commit 7c17db6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/GenomeCopyNumber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3390,7 +3390,7 @@ float GenomeCopyNumber::evaluateContamination () {
if (chrCopyNumber_[index].isSmoothed() && WESanalysis == false)
expected = chrCopyNumber_[index].getSmoothedProfileAtI(i);
}
if (!(expected == 1 || expected <= 0 || expected >= 2 || observed > 3 || observed <= 0)
if (!(expected == 1 || expected <= 0 || expected >= 1+2.0/ploidy_ || observed > 3 || observed <= 0)
&& (((1>observed)&&(1>expected))||((1<observed)&&(1<expected)))) {// should it be something related to ploidy_ and not 2
float p = (observed-expected)/(observed-expected+2/ploidy_*(1-observed));
if (p>-0.5 && p<1.5) {
Expand Down Expand Up @@ -3445,7 +3445,7 @@ float GenomeCopyNumber::evaluateContaminationwithLR () {
if (chrCopyNumber_[index].isMedianCalculated()) {
expected = round_by_ploidy(chrCopyNumber_[index].getMedianProfileAtI(i),ploidy_) ;
}
if (expected!=NA && expected<2){
if (expected!=NA && expected<1+2.0/ploidy_){
observed_values.push_back(observed-1);
expected_values.push_back(expected-1);
}
Expand Down
Binary file modified src/freec
Binary file not shown.
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define VERSION_H

const double VERSION_OFFSET = 3;
const double FREEC_VERSION = 11.2;
const double FREEC_VERSION = 11.3;
const double CONTROL_FREEC_VERSION = FREEC_VERSION - VERSION_OFFSET;

#endif

0 comments on commit 7c17db6

Please sign in to comment.