Skip to content

Commit

Permalink
Fixed a bug in tumorOnly solver
Browse files Browse the repository at this point in the history
  • Loading branch information
German Demidov authored and German Demidov committed Jan 26, 2021
1 parent d216431 commit 3df2421
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions somatic/tumorOnlySolver.R
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ for (sam_no in 1:ncol(coverage.normalised)) {
iterations = iterations + 1
}


pvaluesForCNVs <- rep(NA, nrow(found_CNVs_total))
if (nrow(found_CNVs_total) > 0) {
for (i in 1:nrow(found_CNVs_total)) {
Expand All @@ -550,7 +549,9 @@ for (sam_no in 1:ncol(coverage.normalised)) {
if (!chrom %in% c("chrX","chrY")) {
valueOfOthers = apply(coverage.normalised.off[coordsInBedOff,-sam_no,drop=F],2,median)
} else {
valueOfOthers = apply(coverage.normalised.off[coordsInBedOff,which(genderOfSamples == genderOfSamples[sam_no]),drop=F],2,median)
genderOfThisSample = genderOfSamples[which(names(genderOfSamples) == sample_name)]
idsOfSameSexSamples = which(colnames(coverage.normalised.off) %in% names(genderOfSamples)[which(genderOfSamples == genderOfThisSample)])
valueOfOthers = apply(coverage.normalised.off[coordsInBedOff,idsOfSameSexSamples,drop=F],2,median)
}
}
}
Expand Down

0 comments on commit 3df2421

Please sign in to comment.