Skip to content

Commit

Permalink
somatic: Bugfix and removed testing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
axelgschwind committed Nov 26, 2018
1 parent 3637b6f commit 0b3a754
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions somatic/firstStep.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,6 @@ option_list = list(
opt_parser = OptionParser(option_list=option_list);
opt = parse_args(opt_parser);

### TESTING PART
opt$bed = "/Users/gdemidov/Tuebingen/somatic_CNVs/Somatic/ssSC_v4.annotated.bed"
opt$tumor = "/Users/gdemidov/Tuebingen/somatic_CNVs/Somatic/v4_tumor.cov"
opt$normal = "/Users/gdemidov/Tuebingen/somatic_CNVs/Somatic/v4_normal.cov"
opt$colNum = 4
opt$pair = "/Users/gdemidov/Tuebingen/somatic_CNVs/Somatic/pairs-2.txt"
opt$out = "/Users/gdemidov/Tuebingen/clinCNV_dev/results"
opt$folderWithScript = "/Users/gdemidov/Tuebingen/clinCNV_dev/ClinCNV/somatic"
opt$reanalyseCohort = F
opt$bedOfftarget = "/Users/gdemidov/Tuebingen/somatic_CNVs/Somatic/annotated_offtarget_v4.bed"
opt$tumorOfftarget = "/Users/gdemidov/Tuebingen/somatic_CNVs/Somatic/v4_tumor_off.cov"
opt$normalOfftarget = "/Users/gdemidov/Tuebingen/somatic_CNVs/Somatic/v4_normal_off.cov"
opt$bafFolder = "/Users/gdemidov/Tuebingen/somatic_CNVs/Somatic/baf"


### PLOTTING OF PICTURES (DOES NOT REALLY NECESSARY IF YOU HAVE IGV SEGMENTS)
plottingOfPNGs = F
Expand Down Expand Up @@ -211,15 +197,15 @@ if (framework == "somatic") {

## CHECK INPUT VALIDITY
if (!is.null(opt$normalSample)) {
stopifnot(!opt$normalSample %in% colnames(normal))
stopifnot(opt$normalSample %in% colnames(normal))
}
if (!is.null(opt$tumorSample)) {
stopifnot(!is.null(opt$normalSample))
stopifnot(!opt$tumorSample %in% colnames(normal))
stopifnot(!opt$tumorSample %in% pairs[,1])
stopifnot(!opt$normalSample %in% pairs[,2])
stopifnot(opt$tumorSample %in% colnames(tumor))
stopifnot(opt$tumorSample %in% pairs[,1])
stopifnot(opt$normalSample %in% pairs[,2])
coordOfNormalInPairs = which(pairs[,2] == opt$normalSample)
stopifnot(!opt$tumorSample %in% pairs[coordOfNormalInPairs,1])
stopifnot(opt$tumorSample %in% pairs[coordOfNormalInPairs,1])
}

lstOfChromBorders <- getCytobands("cytobands.txt")
Expand Down Expand Up @@ -923,7 +909,7 @@ for (sam_no in 1:ncol(matrixOfLogFold)) {


found_CNVs_total <- matrix(0, nrow=0, ncol=8)
colnames(found_CNVs_total) <- c("#chr", "start", "end", "tumor_CN_change", "tumor_clonality", "absolute_CN_change", "loglikelihood", "genes")
colnames(found_CNVs_total) <- c("#chr", "start", "end", "tumor_CN_change", "tumor_clonality", "CN_change", "loglikelihood", "genes")
allDetectedPurities = c()
for (l in 1:length(left_borders)) {

Expand Down

0 comments on commit 0b3a754

Please sign in to comment.