From a8d44f780728b1dfbf0ff4e03b3bf7c66752227d Mon Sep 17 00:00:00 2001 From: Pooja Date: Thu, 4 Dec 2025 22:40:01 -0800 Subject: [PATCH 1/2] Remove eval(parse()) while parsing parameters --- DESCRIPTION | 4 +- scripts/runIchorCNA.R | 288 ++++++++++-------- .../2025-12-04T220220.871949.snakemake.log | 49 +++ ...wwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= | 1 + ...VwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln | 1 + scripts/snakemake/config/config.yaml | 2 +- scripts/snakemake/config/samples.yaml | 2 +- 7 files changed, 220 insertions(+), 127 deletions(-) mode change 100644 => 100755 scripts/runIchorCNA.R create mode 100644 scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log create mode 100644 scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9pY2hvckNOQS9GSEwwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= create mode 100644 scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9yZWFkRGVwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln diff --git a/DESCRIPTION b/DESCRIPTION index a580015..d62c2a2 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: ichorCNA Type: Package Title: A tool for estimating the fraction of tumor in ultra-low-pass whole genome sequencing (ULP-WGS) of cell-free DNA -Version: 0.3.4 -Date: 2020-08-17 +Version: 0.6.1 +Date: 2025-12-04 Author: Gavin Ha, Maintainer: Gavin Ha Depends: R (>= 3.6.0) diff --git a/scripts/runIchorCNA.R b/scripts/runIchorCNA.R old mode 100644 new mode 100755 index bf1be7e..107be6f --- a/scripts/runIchorCNA.R +++ b/scripts/runIchorCNA.R @@ -58,11 +58,50 @@ option_list <- list( make_option(c("--txnStrength"), type="numeric", default=1e7, help = "Transition pseudo-counts. Exponent should be the same as the number of decimal places of --txnE. Default: [%default]"), make_option(c("--multSampleTxnStrength"), type="numeric", default=1, help="Strength of same state transition between multiple samples. Default: [%default]"), make_option(c("--plotFileType"), type="character", default="pdf", help = "File format for output plots. Default: [%default]"), - make_option(c("--plotYLim"), type="character", default="c(-2,2)", help = "ylim to use for chromosome plots. Default: [%default]"), + make_option(c("--plotYLim"), type="character", default="c(-2,2)", help = "ylim to use for chromosome plots. Default: [%default]"), make_option(c("--outDir"), type="character", default="./", help = "Output Directory. Default: [%default]"), make_option(c("--libdir"), type = "character", default=NULL, help = "Script library path. Usually exclude this argument unless custom modifications have been made to the ichorCNA R package code and the user would like to source those R files. Default: [%default]"), make_option(c("--cores"), type="numeric", default = 1, help = "Number of cores to use for EM. Default: [%default]") ) + +# Function to parse character vectors +parse_numeric_vector <- function(str_value) { + if (is.null(str_value) || str_value == "NULL" || str_value == "None") { + return(NULL) + } + # Remove "c(" and ")" if present + str_value <- gsub("^c\\(", "", str_value) + str_value <- gsub("\\)$", "", str_value) + # Handle ranges like "1:22" or "c(1:22,\"X\")" + if (grepl(":", str_value)) { + parts <- strsplit(str_value, ",")[[1]] + result <- c() + for (part in parts) { + part <- trimws(part) + if (grepl(":", part)) { + range_parts <- as.numeric(strsplit(part, ":")[[1]]) + result <- c(result, seq(range_parts[1], range_parts[2])) + } else { + # Remove quotes if present + part <- gsub("\"", "", part) + result <- c(result, part) + } + } + return(result) + } + # Split by comma and clean up + values <- strsplit(str_value, ",")[[1]] + values <- trimws(values) + values <- gsub("\"", "", values) + # Convert to numeric, otherwise keep as character + numeric_values <- suppressWarnings(as.numeric(values)) + if (all(!is.na(numeric_values))) { + return(numeric_values) + } else { + return(values) + } +} + parseobj <- OptionParser(option_list=option_list) opt <- parse_args(parseobj) print(opt) @@ -88,12 +127,20 @@ exons.bed <- opt$exons.bed # "0" if none specified centromere <- opt$centromere minMapScore <- opt$minMapScore flankLength <- opt$rmCentromereFlankLength -normal <- eval(parse(text = opt$normal)) -normal.init <- eval(parse(text = opt$normal.init)) -scStates <- eval(parse(text = opt$scStates)) + +# Parse vector parameters without eval +normal <- parse_numeric_vector(opt$normal) +normal.init <- parse_numeric_vector(opt$normal.init) +scStates <- parse_numeric_vector(opt$scStates) +lambda <- parse_numeric_vector(opt$lambda) +ploidy <- parse_numeric_vector(opt$ploidy) +plotYLim <- parse_numeric_vector(opt$plotYLim) +chrs <- as.character(parse_numeric_vector(opt$chrs)) +chrTrain <- as.character(parse_numeric_vector(opt$chrTrain)) +chrNormalize <- as.character(parse_numeric_vector(opt$chrNormalize)) + subclone.penalty <- opt$scPenalty likModel <- opt$likModel -lambda <- eval(parse(text = opt$lambda)) lambdaScaleHyperParam <- opt$lambdaScaleHyperParam estimateNormal <- opt$estimateNormal estimatePloidy <- opt$estimatePloidy @@ -102,7 +149,6 @@ maxFracCNASubclone <- opt$maxFracCNASubclone maxFracGenomeSubclone <- opt$maxFracGenomeSubclone minSegmentBins <- opt$minSegmentBins altFracThreshold <- opt$altFracThreshold -ploidy <- eval(parse(text = opt$ploidy)) coverage <- opt$coverage maxCN <- opt$maxCN txnE <- opt$txnE @@ -116,13 +162,10 @@ normal2IgnoreSC <- opt$normal2IgnoreSC outDir <- opt$outDir libdir <- opt$libdir plotFileType <- opt$plotFileType -plotYLim <- eval(parse(text=opt$plotYLim)) outImage <- paste0(outDir,"/", patientID,".RData") genomeBuild <- opt$genomeBuild genomeStyle <- opt$genomeStyle -chrs <- as.character(eval(parse(text = opt$chrs))) -chrTrain <- as.character(eval(parse(text=opt$chrTrain))); -chrNormalize <- as.character(eval(parse(text=opt$chrNormalize))); + seqlevelsStyle(chrs) <- genomeStyle seqlevelsStyle(chrNormalize) <- genomeStyle seqlevelsStyle(chrTrain) <- genomeStyle @@ -130,13 +173,13 @@ cores <- opt$cores ## load ichorCNA library or source R scripts if (!is.null(libdir) && libdir != "None"){ - source(paste0(libdir,"/R/utils.R")) - source(paste0(libdir,"/R/segmentation.R")) - source(paste0(libdir,"/R/EM.R")) - source(paste0(libdir,"/R/output.R")) - source(paste0(libdir,"/R/plotting.R")) + source(paste0(libdir,"/R/utils.R")) + source(paste0(libdir,"/R/segmentation.R")) + source(paste0(libdir,"/R/EM.R")) + source(paste0(libdir,"/R/output.R")) + source(paste0(libdir,"/R/plotting.R")) } else { - library(ichorCNA) + library(ichorCNA) } ## load seqinfo @@ -158,12 +201,12 @@ if (is.null(exons.bed) || exons.bed == "None" || exons.bed == "NULL"){ ## load PoN if (is.null(normal_panel) || normal_panel == "None" || normal_panel == "NULL"){ - normal_panel <- NULL + normal_panel <- NULL } if (is.null(centromere) || centromere == "None" || centromere == "NULL"){ # no centromere file provided - centromere <- system.file("extdata", "GRCh37.p13_centromere_UCSC-gapTable.txt", - package = "ichorCNA") + centromere <- system.file("extdata", "GRCh37.p13_centromere_UCSC-gapTable.txt", + package = "ichorCNA") } centromere <- read.delim(centromere,header=T,stringsAsFactors=F,sep="\t") save.image(outImage) @@ -172,7 +215,7 @@ save.image(outImage) message("Reading GC and mappability files") gc <- wigToGRanges(gcWig) if (is.null(gc)){ - stop("GC wig file not provided but is required") + stop("GC wig file not provided but is required") } map <- wigToGRanges(mapWig) if (is.null(map)){ @@ -201,10 +244,10 @@ for (i in 1:numSamples) { tumour_reads <- wigToGRanges(wigFiles[i,2]) message("Correcting Tumour") counts[[id]] <- loadReadCountsFromWig(tumour_reads, chrs = chrs, gc = gc, map = map, repTime = repTime, - centromere = centromere, flankLength = flankLength, - targetedSequences = targetedSequences, chrXMedianForMale = chrXMedianForMale, - genomeStyle = genomeStyle, fracReadsInChrYForMale = fracReadsInChrYForMale, - chrNormalize = chrNormalize, mapScoreThres = minMapScore) + centromere = centromere, flankLength = flankLength, + targetedSequences = targetedSequences, chrXMedianForMale = chrXMedianForMale, + genomeStyle = genomeStyle, fracReadsInChrYForMale = fracReadsInChrYForMale, + chrNormalize = chrNormalize, mapScoreThres = minMapScore) gender <- counts[[id]]$gender if ((!is.null(sex) && sex != "None" && sex != "NULL") && gender$gender != sex ){ #compare with user-defined sex @@ -214,48 +257,48 @@ for (i in 1:numSamples) { ## load in normal file if provided if (!is.null(normal_file) && normal_file != "None" && normal_file != "NULL"){ - message("Loading normal file:", normal_file) - normal_reads <- wigToGRanges(normal_file) - message("Correcting Normal") - counts.normal <- loadReadCountsFromWig(normal_reads, chrs=chrs, gc=gc, map=map, repTime = repTime, - centromere=centromere, flankLength = flankLength, targetedSequences=targetedSequences, - genomeStyle = genomeStyle, chrNormalize = chrNormalize, mapScoreThres = minMapScore) - normal_copy <- counts.normal$counts #as(counts$counts, "GRanges") - counts[[id]]$counts$cor.gc.normal <- counts.normal$counts$cor.gc - counts[[id]]$counts$cor.map.normal <- counts.normal$counts$cor.map - counts[[id]]$counts$cor.rep.normal <- counts.normal$counts$cor.rep - gender.normal <- counts[[id]]$gender + message("Loading normal file:", normal_file) + normal_reads <- wigToGRanges(normal_file) + message("Correcting Normal") + counts.normal <- loadReadCountsFromWig(normal_reads, chrs=chrs, gc=gc, map=map, repTime = repTime, + centromere=centromere, flankLength = flankLength, targetedSequences=targetedSequences, + genomeStyle = genomeStyle, chrNormalize = chrNormalize, mapScoreThres = minMapScore) + normal_copy <- counts.normal$counts #as(counts$counts, "GRanges") + counts[[id]]$counts$cor.gc.normal <- counts.normal$counts$cor.gc + counts[[id]]$counts$cor.map.normal <- counts.normal$counts$cor.map + counts[[id]]$counts$cor.rep.normal <- counts.normal$counts$cor.rep + gender.normal <- counts[[id]]$gender }else{ - normal_copy <- NULL + normal_copy <- NULL } ### DETERMINE GENDER ### ## if normal file not given, use chrY, else use chrX message("Determining gender...", appendLF = FALSE) gender.mismatch <- FALSE if (!is.null(normal_copy)){ - if (gender$gender != gender.normal$gender){ #use tumour # use normal if given - # check if normal is same gender as tumour - gender.mismatch <- TRUE - } + if (gender$gender != gender.normal$gender){ #use tumour # use normal if given + # check if normal is same gender as tumour + gender.mismatch <- TRUE + } } message("Gender ", gender$gender) - + ## NORMALIZE GENOME-WIDE BY MATCHED NORMAL OR NORMAL PANEL (MEDIAN) ## tumour_copy[[id]] <- counts[[id]]$counts tumour_copy[[id]] <- normalizeByPanelOrMatchedNormal(tumour_copy[[id]], chrs = chrs, - normal_panel = normal_panel, normal_copy = normal_copy, - gender = gender$gender, normalizeMaleX = normalizeMaleX) - - ### OUTPUT FILE ### - ### PUTTING TOGETHER THE COLUMNS IN THE OUTPUT ### - outMat <- as.data.frame(tumour_copy[[id]]) - #outMat <- outMat[,c(1,2,3,12)] - outMat <- outMat[,c("seqnames","start","end","copy")] - colnames(outMat) <- c("chr","start","end","log2_TNratio_corrected") - outFile <- paste0(outDir,"/",id,".correctedDepth.txt") - message(paste("Outputting to:", outFile)) - write.table(outMat, file=outFile, row.names= FALSE, col.names = TRUE, quote = FALSE, sep="\t") - + normal_panel = normal_panel, normal_copy = normal_copy, + gender = gender$gender, normalizeMaleX = normalizeMaleX) + + ### OUTPUT FILE ### + ### PUTTING TOGETHER THE COLUMNS IN THE OUTPUT ### + outMat <- as.data.frame(tumour_copy[[id]]) + #outMat <- outMat[,c(1,2,3,12)] + outMat <- outMat[,c("seqnames","start","end","copy")] + colnames(outMat) <- c("chr","start","end","log2_TNratio_corrected") + outFile <- paste0(outDir,"/",id,".correctedDepth.txt") + message(paste("Outputting to:", outFile)) + write.table(outMat, file=outFile, row.names= FALSE, col.names = TRUE, quote = FALSE, sep="\t") + } ## end of for each sample chrInd <- as.character(seqnames(tumour_copy[[1]])) %in% chrTrain @@ -279,8 +322,8 @@ ptmTotalSolutions <- proc.time() # start total timer results <- list() numCombinations <- (length(normal) * length(ploidy)) ^ S loglik <- as.data.frame(matrix(NA, nrow = numCombinations, ncol = 7, - dimnames = list(c(), c("n_0", "phi_0", "n_est", "phi_est", - "Frac_genome_subclonal", "Frac_CNA_subclonal", "loglik")))) + dimnames = list(c(), c("n_0", "phi_0", "n_est", "phi_est", + "Frac_genome_subclonal", "Frac_CNA_subclonal", "loglik")))) fracGenomeSub <- as.data.frame(matrix(NA, nrow = numCombinations, ncol = S)) fracAltSub <- as.data.frame(matrix(NA, nrow = numCombinations, ncol = S)) # prepare normal/ploidy restarts for different solutions @@ -313,10 +356,10 @@ for (i in 1:length(ploidy)){ logR <- as.data.frame(lapply(tumour_copy, function(x) { x$copy })) # NEED TO EXCLUDE CHR X # param <- getDefaultParameters(logR[valid & chrInd, , drop=F], n_0 = n, maxCN = maxCN, - includeHOMD = includeHOMD, - ct.sc=scStates, normal2IgnoreSC = normal2IgnoreSC, ploidy_0 = floor(p), - e=txnE, e.subclone = subclone.penalty, e.sameState = multSampleTxnStrength, - strength=txnStrength, likModel = likModel) + includeHOMD = includeHOMD, + ct.sc=scStates, normal2IgnoreSC = normal2IgnoreSC, ploidy_0 = floor(p), + e=txnE, e.subclone = subclone.penalty, e.sameState = multSampleTxnStrength, + strength=txnStrength, likModel = likModel) ############################################ ######## CUSTOM PARAMETER SETTINGS ######### @@ -330,59 +373,59 @@ for (i in 1:length(ploidy)){ # param$betaLambda[param$ct.sc.status] <- param$betaLambda[param$ct.sc.status] /2 # param$alphaVar[param$ct.sc.status, 1] <- param$alphaVar[param$ct.sc.status, 1] *2 # } - ############################################# - ################ RUN HMM #################### - ############################################# + ############################################# + ################ RUN HMM #################### + ############################################# hmmResults.cor <- HMMsegment(tumour_copy, valid, dataType = "copy", param = param, chrTrain = chrTrain, maxiter = 20, estimateNormal = estimateNormal, estimatePloidy = estimatePloidy, estimatePrecision = TRUE, estimateVar = TRUE, estimateSubclone = estimateScPrevalence, estimateTransition = TRUE, estimateInitDist = TRUE, likChangeConvergence = 1e-4, verbose = TRUE) - + for (s in 1:numSamples){ - iter <- hmmResults.cor$results$iter - id <- names(hmmResults.cor$cna)[s] - + iter <- hmmResults.cor$results$iter + id <- names(hmmResults.cor$cna)[s] + ## correct integer copy number based on estimated purity and ploidy - correctedResults <- correctIntegerCN(cn = hmmResults.cor$cna[[s]], - segs = hmmResults.cor$results$segs[[s]], - purity = 1 - hmmResults.cor$results$n[s, iter], ploidy = hmmResults.cor$results$phi[s, iter], - cellPrev = 1 - hmmResults.cor$results$sp[s, iter], - maxCNtoCorrect.autosomes = maxCN, maxCNtoCorrect.X = maxCN, minPurityToCorrect = 0.05, - gender = gender$gender, chrs = chrs, correctHOMD = includeHOMD) - hmmResults.cor$results$segs[[s]] <- correctedResults$segs - hmmResults.cor$cna[[s]] <- correctedResults$cn - ## convert full diploid solution (of chrs to train) to have 1.0 normal or 0.0 purity - ## check if there is an altered segment that has at least a minimum # of bins - segsS <- hmmResults.cor$results$segs[[s]] - segsS <- segsS[segsS$chr %in% chrTrain, ] - segAltInd <- which(segsS$event != "NEUT") - maxBinLength = -Inf - if (length(segAltInd) > 0){ - maxInd <- which.max(segsS$end[segAltInd] - segsS$start[segAltInd] + 1) - maxSegRD <- GRanges(seqnames=segsS$chr[segAltInd[maxInd]], - ranges=IRanges(start=segsS$start[segAltInd[maxInd]], end=segsS$end[segAltInd[maxInd]])) - hits <- findOverlaps(query=maxSegRD, subject=tumour_copy[[s]][valid, ]) - maxBinLength <- length(subjectHits(hits)) - } - ## check if there are proportion of total bins altered - # if segment size smaller than minSegmentBins, but altFrac > altFracThreshold, then still estimate TF - cnaS <- hmmResults.cor$cna[[s]] - altInd <- cnaS[cnaS$chr %in% chrTrain, "event"] == "NEUT" - altFrac <- sum(!altInd, na.rm=TRUE) / length(altInd) - if ((maxBinLength <= minSegmentBins) & (altFrac <= altFracThreshold)){ - hmmResults.cor$results$n[s, iter] <- 1.0 - } + correctedResults <- correctIntegerCN(cn = hmmResults.cor$cna[[s]], + segs = hmmResults.cor$results$segs[[s]], + purity = 1 - hmmResults.cor$results$n[s, iter], ploidy = hmmResults.cor$results$phi[s, iter], + cellPrev = 1 - hmmResults.cor$results$sp[s, iter], + maxCNtoCorrect.autosomes = maxCN, maxCNtoCorrect.X = maxCN, minPurityToCorrect = 0.05, + gender = gender$gender, chrs = chrs, correctHOMD = includeHOMD) + hmmResults.cor$results$segs[[s]] <- correctedResults$segs + hmmResults.cor$cna[[s]] <- correctedResults$cn + ## convert full diploid solution (of chrs to train) to have 1.0 normal or 0.0 purity + ## check if there is an altered segment that has at least a minimum # of bins + segsS <- hmmResults.cor$results$segs[[s]] + segsS <- segsS[segsS$chr %in% chrTrain, ] + segAltInd <- which(segsS$event != "NEUT") + maxBinLength = -Inf + if (length(segAltInd) > 0){ + maxInd <- which.max(segsS$end[segAltInd] - segsS$start[segAltInd] + 1) + maxSegRD <- GRanges(seqnames=segsS$chr[segAltInd[maxInd]], + ranges=IRanges(start=segsS$start[segAltInd[maxInd]], end=segsS$end[segAltInd[maxInd]])) + hits <- findOverlaps(query=maxSegRD, subject=tumour_copy[[s]][valid, ]) + maxBinLength <- length(subjectHits(hits)) + } + ## check if there are proportion of total bins altered + # if segment size smaller than minSegmentBins, but altFrac > altFracThreshold, then still estimate TF + cnaS <- hmmResults.cor$cna[[s]] + altInd <- cnaS[cnaS$chr %in% chrTrain, "event"] == "NEUT" + altFrac <- sum(!altInd, na.rm=TRUE) / length(altInd) + if ((maxBinLength <= minSegmentBins) & (altFrac <= altFracThreshold)){ + hmmResults.cor$results$n[s, iter] <- 1.0 + } ## plot solution ## mainName[[s]] <- c(mainName[[s]], paste0("Solution: ", counter, ", Sample: ", id, ", n: ", n[s], ", p: ", p[s], - ", log likelihood: ", signif(hmmResults.cor$results$loglik[hmmResults.cor$results$iter], digits = 4))) + ", log likelihood: ", signif(hmmResults.cor$results$loglik[hmmResults.cor$results$iter], digits = 4))) ## plot individual samples if (numSamples == 1){ # if only single-sample analysis outPlotFile <- paste0(outDir, "/", id, "/", id, "_genomeWide_", "n", n[s], "-p", p[s]) plotGWSolution(hmmResults.cor, s=s, outPlotFile=outPlotFile, plotFileType=plotFileType, - logR.column = "logR", call.column = "Corrected_Call", - plotYLim=plotYLim, estimateScPrevalence=estimateScPrevalence, seqinfo=seqinfo, main=mainName[[s]][counter]) + logR.column = "logR", call.column = "Corrected_Call", + plotYLim=plotYLim, estimateScPrevalence=estimateScPrevalence, seqinfo=seqinfo, main=mainName[[s]][counter]) } } iter <- hmmResults.cor$results$iter @@ -416,22 +459,22 @@ save.image(outImage) fracAltSub[is.nan(fracAltSub$V1), ] <- 0 if (estimateScPrevalence){ ## sort but excluding solutions with too large % subclonal if (numSamples > 1){ - fracInd <- which(rowSums(fracAltSub <= maxFracCNASubclone) == S & - rowSums(fracGenomeSub <= maxFracGenomeSubclone) == S) + fracInd <- which(rowSums(fracAltSub <= maxFracCNASubclone) == S & + rowSums(fracGenomeSub <= maxFracGenomeSubclone) == S) }else{ - fracInd <- which(fracAltSub <= maxFracCNASubclone & - fracGenomeSub <= maxFracGenomeSubclone) + fracInd <- which(fracAltSub <= maxFracCNASubclone & + fracGenomeSub <= maxFracGenomeSubclone) } - if (length(fracInd) > 0){ ## if there is a solution satisfying % subclonal + if (length(fracInd) > 0){ ## if there is a solution satisfying % subclonal # sort by highest loglik and then by lowest fracCNAsubclonal (if ties) - ind <- fracInd[order(-loglik[fracInd, "loglik"], loglik[fracInd, "Frac_CNA_subclonal"])] + ind <- fracInd[order(-loglik[fracInd, "loglik"], loglik[fracInd, "Frac_CNA_subclonal"])] # sort by highest loglik for solutions that don't pass fracCNAsubclonal threshold fracInd.exclude <- setdiff(1:nrow(loglik), ind) ind.excludeSC <- fracInd.exclude[order(-loglik[fracInd.exclude, "loglik"])] ind <- c(ind, ind.excludeSC) - }else{ # otherwise just take largest likelihood - ind <- order(as.numeric(loglik[, "loglik"]), decreasing=TRUE) - } + }else{ # otherwise just take largest likelihood + ind <- order(as.numeric(loglik[, "loglik"]), decreasing=TRUE) + } }else{#sort by likelihood only ind <- order(as.numeric(loglik[, "loglik"]), decreasing=TRUE) } @@ -447,16 +490,16 @@ for (s in 1:numSamples){ turnDevOff <- FALSE turnDevOn <- FALSE if (i == 1){ - turnDevOn <- TRUE + turnDevOn <- TRUE } if (i == length(ind)){ - turnDevOff <- TRUE + turnDevOff <- TRUE } plotGWSolution(hmmResults.cor, s=s, outPlotFile=outPlotFile, plotFileType="pdf", - logR.column = "logR", call.column = "Corrected_Call", - plotYLim=plotYLim, estimateScPrevalence=estimateScPrevalence, - seqinfo = seqinfo, - turnDevOn = turnDevOn, turnDevOff = turnDevOff, main=mainName[[s]][ind[i]]) + logR.column = "logR", call.column = "Corrected_Call", + plotYLim=plotYLim, estimateScPrevalence=estimateScPrevalence, + seqinfo = seqinfo, + turnDevOn = turnDevOn, turnDevOff = turnDevOff, main=mainName[[s]][ind[i]]) } } # multisample, combined plots @@ -465,7 +508,7 @@ if (numSamples > 1){ if (plotFileType == "png"){ outPlotFile <- paste0(outPlotFile, ".png") png(outPlotFile,width=20,height=numSamples*6,units="in",res=300) - }else{ + }else{ outPlotFile <- paste0(outPlotFile, ".pdf") pdf(outPlotFile,width=20,height=numSamples*6) } @@ -474,11 +517,11 @@ if (numSamples > 1){ par(mfrow=c(numSamples, 1)) for (s in 1:numSamples){ plotGWSolution(hmmResults.cor, s=s, outPlotFile=outPlotFile, plotFileType="pdf", - logR.column = "logR", call.column = "Corrected_Call", - plotYLim=plotYLim, estimateScPrevalence=estimateScPrevalence, - seqinfo = seqinfo, spacing = 4, - cex.text = 1.25, cex=0.5, - turnDevOn = FALSE, turnDevOff = FALSE, main=mainName[[s]][ind[i]]) + logR.column = "logR", call.column = "Corrected_Call", + plotYLim=plotYLim, estimateScPrevalence=estimateScPrevalence, + seqinfo = seqinfo, spacing = 4, + cex.text = 1.25, cex=0.5, + turnDevOn = FALSE, turnDevOff = FALSE, main=mainName[[s]][ind[i]]) } } dev.off() @@ -493,7 +536,7 @@ hmmResults.cor$results$chrXMedian <- gender$chrXMedian hmmResults.cor$results$coverage <- coverage outputHMM(cna = hmmResults.cor$cna, segs = hmmResults.cor$results$segs, - results = hmmResults.cor$results, patientID = patientID, outDir=outDir) + results = hmmResults.cor$results, patientID = patientID, outDir=outDir) outFile <- paste0(outDir, "/", patientID, ".params.txt") outputParametersToFile(hmmResults.cor, file = outFile) @@ -501,5 +544,4 @@ outputParametersToFile(hmmResults.cor, file = outFile) plotSolutions(hmmResults.cor, tumour_copy, chrs, outDir, counts, numSamples=numSamples, logR.column = "logR", call.column = "event", likModel = likModel, plotFileType=plotFileType, plotYLim=plotYLim, seqinfo = seqinfo, - estimateScPrevalence=estimateScPrevalence, maxCN=maxCN) - + estimateScPrevalence=estimateScPrevalence, maxCN=maxCN) \ No newline at end of file diff --git a/scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log b/scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log new file mode 100644 index 0000000..bcd1ccf --- /dev/null +++ b/scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log @@ -0,0 +1,49 @@ +Building DAG of jobs... +Using shell: /bin/bash +Provided cluster nodes: 50 +Unlimited resources: mem +Job counts: + count jobs + 1 all + 1 ichorCNA + 1 read_counter + 3 + +[Thu Dec 4 22:02:21 2025] +rule read_counter: + input: /hpc/temp/ha_g/projects/psma/PSMA-Lut-2025_Sept120_realigned/realign_bam_paired_snakemake/BAMs/FHL0167_E_C2_recalibrated.bam + output: results/readDepth/FHL0167_E_C2.bin1000000.wig + log: logs/readDepth/FHL0167_E_C2.bin1000000.log + jobid: 2 + wildcards: samples=FHL0167_E_C2, binSize=1000000 + resources: mem=4 + +Submitted job 2 with external jobid 'Submitted batch job 43148935'. +Waiting at most 100 seconds for missing files. +[Thu Dec 4 22:03:22 2025] +Finished job 2. +1 of 3 steps (33%) done + +[Thu Dec 4 22:03:22 2025] +rule ichorCNA: + input: results/readDepth/FHL0167_E_C2.bin1000000.wig + output: results/ichorCNA/FHL0167_E_C2/FHL0167_E_C2.cna.seg + log: logs/ichorCNA/FHL0167_E_C2.log + jobid: 1 + wildcards: tumor=FHL0167_E_C2 + resources: mem=4 + +Submitted job 1 with external jobid 'Submitted batch job 43148937'. +[Thu Dec 4 22:07:02 2025] +Finished job 1. +2 of 3 steps (67%) done + +[Thu Dec 4 22:07:02 2025] +localrule all: + input: results/ichorCNA/FHL0167_E_C2/FHL0167_E_C2.cna.seg, results/readDepth/FHL0167_E_C2.bin1000000.wig + jobid: 0 + +[Thu Dec 4 22:07:02 2025] +Finished job 0. +3 of 3 steps (100%) done +Complete log: /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log diff --git a/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9pY2hvckNOQS9GSEwwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= b/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9pY2hvckNOQS9GSEwwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= new file mode 100644 index 0000000..f656c20 --- /dev/null +++ b/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9pY2hvckNOQS9GSEwwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= @@ -0,0 +1 @@ +{"version": null, "code": "gAMoQxJ0AGQBfA18EGQCjQMBAGQAUwBxAChYBQAAAGlucHV0cQFYBgAAAG91dHB1dHECWAYAAABwYXJhbXNxA1gJAAAAd2lsZGNhcmRzcQRYBwAAAHRocmVhZHNxBVgJAAAAcmVzb3VyY2VzcQZYAwAAAGxvZ3EHWAcAAAB2ZXJzaW9ucQhYBAAAAHJ1bGVxCVgJAAAAY29uZGFfZW52cQpYDwAAAHNpbmd1bGFyaXR5X2ltZ3ELWBAAAABzaW5ndWxhcml0eV9hcmdzcQxYDwAAAHVzZV9zaW5ndWxhcml0eXENWAwAAABiZW5jaF9yZWNvcmRxDlgFAAAAam9iaWRxD1gIAAAAaXNfc2hlbGxxEFgPAAAAYmVuY2hfaXRlcmF0aW9ucRFYCgAAAHNoYWRvd19kaXJxEnRxE11xFChOWLIEAABSc2NyaXB0IHtwYXJhbXMucnNjcmlwdH0gLS1pZCB7cGFyYW1zLmlkfSAtLWxpYmRpciB7cGFyYW1zLmxpYmRpcn0gLS1jb3JlcyB7cGFyYW1zLmNvcmVzfSAtLVdJRyB7aW5wdXQudHVtfSAtLWdjV2lnIHtwYXJhbXMuZ2N3aWd9IC0tbWFwV2lnIHtwYXJhbXMubWFwd2lnfSAtLXJlcFRpbWVXaWcge3BhcmFtcy5yZXBUaW1lV2lnfSAtLXNleCB7cGFyYW1zLnNleH0gLS1ub3JtYWxQYW5lbCB7cGFyYW1zLm5vcm1hbHBhbmVsfSAtLXBsb2lkeSAie3BhcmFtcy5wbG9pZHl9IiAtLW5vcm1hbCAie3BhcmFtcy5ub3JtYWx9IiAtLW1heENOIHtwYXJhbXMubWF4Q059IC0taW5jbHVkZUhPTUQge3BhcmFtcy5pbmNsdWRlSE9NRH0gLS1jaHJzICJ7cGFyYW1zLmNocnN9IiAtLWNoclRyYWluICJ7cGFyYW1zLmNoclRyYWlufSIgLS1nZW5vbWVTdHlsZSB7cGFyYW1zLmdlbm9tZVN0eWxlfSAtLWdlbm9tZUJ1aWxkIHtwYXJhbXMuZ2Vub21lQnVpbGR9IC0tZXN0aW1hdGVOb3JtYWwge3BhcmFtcy5lc3RpbWF0ZU5vcm1hbH0gLS1lc3RpbWF0ZVBsb2lkeSB7cGFyYW1zLmVzdGltYXRlUGxvaWR5fSAtLWVzdGltYXRlU2NQcmV2YWxlbmNlIHtwYXJhbXMuZXN0aW1hdGVDbG9uYWxpdHl9IC0tc2NTdGF0ZXMgIntwYXJhbXMuc2NTdGF0ZXN9IiAtLWxpa01vZGVsIHtwYXJhbXMubGlrTW9kZWx9IC0tY2VudHJvbWVyZSB7cGFyYW1zLmNlbnRyb21lcmV9IC0tZXhvbnMuYmVkIHtwYXJhbXMuZXhvbnN9IC0tdHhuRSB7cGFyYW1zLnR4bkV9IC0tdHhuU3RyZW5ndGgge3BhcmFtcy50eG5TdHJlbmd0aH0gLS1taW5NYXBTY29yZSB7cGFyYW1zLm1pbk1hcFNjb3JlfSAtLWZyYWNSZWFkc0luQ2hyWUZvck1hbGUge3BhcmFtcy5mcmFjUmVhZHNDaHJZTWFsZX0gLS1ub3JtYWxpemVNYWxlWCB7cGFyYW1zLm5vcm1hbGl6ZU1hbGVYfSAtLW1heEZyYWNHZW5vbWVTdWJjbG9uZSB7cGFyYW1zLm1heEZyYWNHZW5vbWVTdWJjbG9uZX0gLS1tYXhGcmFjQ05BU3ViY2xvbmUge3BhcmFtcy5tYXhGcmFjQ05BU3ViY2xvbmV9IC0tbm9ybWFsMklnbm9yZVNDIHtwYXJhbXMubm9ybWFsMklnbm9yZVNDfSAtLXNjUGVuYWx0eSB7cGFyYW1zLnNjUGVuYWx0eX0gLS1wbG90RmlsZVR5cGUge3BhcmFtcy5wbG90RmlsZVR5cGV9IC0tcGxvdFlMaW0gIntwYXJhbXMucGxvdFlsaW19IiAtLW91dERpciB7cGFyYW1zLm91dERpcn0gPiB7bG9nfSAyPiB7bG9nfXEVaA5oEYZxFmVYBQAAAHNoZWxscReFcRh0cRku", "rule": "ichorCNA", "input": ["results/readDepth/FHL0167_E_C2.bin1000000.wig"], "log": ["logs/ichorCNA/FHL0167_E_C2.log"], "params": ["'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/GRCh38.GCA_000001405.2_centromere_acen.txt'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/HD_ULP_PoN_hg38_1Mb_normAutosomes_median.rds'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/gc_hg38_1000kb.wig'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/map_hg38_1000kb.wig'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/scripts/runIchorCNA_fix.R'", "'FHL0167_E_C2'", "'None'", "'None'", "'UCSC'", "'c(-2,4)'", "'c(0.5,0.6,0.7,0.8,0.9,0.95)'", "'c(1,3)'", "'c(1:22)'", "'c(1:22, \\\\\"X\\\\\")'", "'c(2,3)'", "'hg38'", "'pdf'", "'results/ichorCNA/FHL0167_E_C2/'", "'t'", "0.002", "0.5", "0.7", "0.75", "0.9", "0.9999", "1", "1", "10000", "5", "False", "None", "True", "True", "True", "True"], "shellcmd": "Rscript /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/scripts/runIchorCNA_fix.R --id FHL0167_E_C2 --libdir /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/ --cores 1 --WIG results/readDepth/FHL0167_E_C2.bin1000000.wig --gcWig /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/gc_hg38_1000kb.wig --mapWig /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/map_hg38_1000kb.wig --repTimeWig None --sex None --normalPanel /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/HD_ULP_PoN_hg38_1Mb_normAutosomes_median.rds --ploidy \"c(2,3)\" --normal \"c(0.5,0.6,0.7,0.8,0.9,0.95)\" --maxCN 5 --includeHOMD False --chrs \"c(1:22, \\\"X\\\")\" --chrTrain \"c(1:22)\" --genomeStyle UCSC --genomeBuild hg38 --estimateNormal True --estimatePloidy True --estimateScPrevalence True --scStates \"c(1,3)\" --likModel t --centromere /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/GRCh38.GCA_000001405.2_centromere_acen.txt --exons.bed None --txnE 0.9999 --txnStrength 10000 --minMapScore 0.75 --fracReadsInChrYForMale 0.002 --normalizeMaleX True --maxFracGenomeSubclone 0.5 --maxFracCNASubclone 0.7 --normal2IgnoreSC 0.9 --scPenalty 1 --plotFileType pdf --plotYLim \"c(-2,4)\" --outDir results/ichorCNA/FHL0167_E_C2/ > logs/ichorCNA/FHL0167_E_C2.log 2> logs/ichorCNA/FHL0167_E_C2.log", "incomplete": false, "starttime": 1764914765.921409, "endtime": 1764914822.546783, "job_hash": 9214558047794700732, "conda_env": null, "singularity_img_url": null} \ No newline at end of file diff --git a/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9yZWFkRGVwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln b/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9yZWFkRGVwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln new file mode 100644 index 0000000..ba6a666 --- /dev/null +++ b/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9yZWFkRGVwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln @@ -0,0 +1 @@ +{"version": null, "code": "gAMoQxJ0AGQBfA18EGQCjQMBAGQAUwBxAChYBQAAAGlucHV0cQFYBgAAAG91dHB1dHECWAYAAABwYXJhbXNxA1gJAAAAd2lsZGNhcmRzcQRYBwAAAHRocmVhZHNxBVgJAAAAcmVzb3VyY2VzcQZYAwAAAGxvZ3EHWAcAAAB2ZXJzaW9ucQhYBAAAAHJ1bGVxCVgJAAAAY29uZGFfZW52cQpYDwAAAHNpbmd1bGFyaXR5X2ltZ3ELWBAAAABzaW5ndWxhcml0eV9hcmdzcQxYDwAAAHVzZV9zaW5ndWxhcml0eXENWAwAAABiZW5jaF9yZWNvcmRxDlgFAAAAam9iaWRxD1gIAAAAaXNfc2hlbGxxEFgPAAAAYmVuY2hfaXRlcmF0aW9ucRFYCgAAAHNoYWRvd19kaXJxEnRxE11xFChOWGYAAAB7cGFyYW1zLnJlYWRDb3VudGVyfSB7aW5wdXR9IC1jIHtwYXJhbXMuY2hyc30gLXcge3BhcmFtcy5iaW5TaXplfSAtcSB7cGFyYW1zLnF1YWx9ID4ge291dHB1dH0gMj4ge2xvZ31xFWgOaBGGcRZlWAUAAABzaGVsbHEXhXEYdHEZLg==", "rule": "read_counter", "input": ["/hpc/temp/ha_g/projects/psma/PSMA-Lut-2025_Sept120_realigned/realign_bam_paired_snakemake/BAMs/FHL0167_E_C2_recalibrated.bam"], "log": ["logs/readDepth/FHL0167_E_C2.bin1000000.log"], "params": ["'/fh/fast/ha_g/app/bin/readCounter'", "'20'", "'chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY'", "1000000"], "shellcmd": "/fh/fast/ha_g/app/bin/readCounter /hpc/temp/ha_g/projects/psma/PSMA-Lut-2025_Sept120_realigned/realign_bam_paired_snakemake/BAMs/FHL0167_E_C2_recalibrated.bam -c chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY -w 1000000 -q 20 > results/readDepth/FHL0167_E_C2.bin1000000.wig 2> logs/readDepth/FHL0167_E_C2.bin1000000.log", "incomplete": false, "starttime": 1764914570.425365, "endtime": 1764914602.307819, "job_hash": -4504133736722542007, "conda_env": null, "singularity_img_url": null} \ No newline at end of file diff --git a/scripts/snakemake/config/config.yaml b/scripts/snakemake/config/config.yaml index d19122d..02d2aaa 100644 --- a/scripts/snakemake/config/config.yaml +++ b/scripts/snakemake/config/config.yaml @@ -58,4 +58,4 @@ ichorCNA_txnE: 0.9999 # lower (e.g. 100) leads to higher sensitivity and more segments ichorCNA_txnStrength: 10000 ichorCNA_plotFileType: pdf -ichorCNA_plotYlim: c(-2,4) +ichorCNA_plotYlim: c(-2,4) \ No newline at end of file diff --git a/scripts/snakemake/config/samples.yaml b/scripts/snakemake/config/samples.yaml index c5f3d43..e7f40ef 100644 --- a/scripts/snakemake/config/samples.yaml +++ b/scripts/snakemake/config/samples.yaml @@ -1,2 +1,2 @@ samples: - tumor_sample1: /path/to/bam/tumor.bam + tumor_sample1: /path/to/bam/tumor.bam \ No newline at end of file From 70f23d719d856edc58619567d79e5fea66536250 Mon Sep 17 00:00:00 2001 From: Pooja Date: Thu, 4 Dec 2025 23:08:12 -0800 Subject: [PATCH 2/2] Remove eval(parse()) while parsing parameters --- .../2025-12-04T220220.871949.snakemake.log | 49 ------------------- ...wwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= | 1 - ...VwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln | 1 - 3 files changed, 51 deletions(-) delete mode 100644 scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log delete mode 100644 scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9pY2hvckNOQS9GSEwwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= delete mode 100644 scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9yZWFkRGVwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln diff --git a/scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log b/scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log deleted file mode 100644 index bcd1ccf..0000000 --- a/scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log +++ /dev/null @@ -1,49 +0,0 @@ -Building DAG of jobs... -Using shell: /bin/bash -Provided cluster nodes: 50 -Unlimited resources: mem -Job counts: - count jobs - 1 all - 1 ichorCNA - 1 read_counter - 3 - -[Thu Dec 4 22:02:21 2025] -rule read_counter: - input: /hpc/temp/ha_g/projects/psma/PSMA-Lut-2025_Sept120_realigned/realign_bam_paired_snakemake/BAMs/FHL0167_E_C2_recalibrated.bam - output: results/readDepth/FHL0167_E_C2.bin1000000.wig - log: logs/readDepth/FHL0167_E_C2.bin1000000.log - jobid: 2 - wildcards: samples=FHL0167_E_C2, binSize=1000000 - resources: mem=4 - -Submitted job 2 with external jobid 'Submitted batch job 43148935'. -Waiting at most 100 seconds for missing files. -[Thu Dec 4 22:03:22 2025] -Finished job 2. -1 of 3 steps (33%) done - -[Thu Dec 4 22:03:22 2025] -rule ichorCNA: - input: results/readDepth/FHL0167_E_C2.bin1000000.wig - output: results/ichorCNA/FHL0167_E_C2/FHL0167_E_C2.cna.seg - log: logs/ichorCNA/FHL0167_E_C2.log - jobid: 1 - wildcards: tumor=FHL0167_E_C2 - resources: mem=4 - -Submitted job 1 with external jobid 'Submitted batch job 43148937'. -[Thu Dec 4 22:07:02 2025] -Finished job 1. -2 of 3 steps (67%) done - -[Thu Dec 4 22:07:02 2025] -localrule all: - input: results/ichorCNA/FHL0167_E_C2/FHL0167_E_C2.cna.seg, results/readDepth/FHL0167_E_C2.bin1000000.wig - jobid: 0 - -[Thu Dec 4 22:07:02 2025] -Finished job 0. -3 of 3 steps (100%) done -Complete log: /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/scripts/snakemake/.snakemake/log/2025-12-04T220220.871949.snakemake.log diff --git a/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9pY2hvckNOQS9GSEwwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= b/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9pY2hvckNOQS9GSEwwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= deleted file mode 100644 index f656c20..0000000 --- a/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9pY2hvckNOQS9GSEwwMTY3X0VfQzIvRkhMMDE2N19FX0MyLmNuYS5zZWc= +++ /dev/null @@ -1 +0,0 @@ -{"version": null, "code": "gAMoQxJ0AGQBfA18EGQCjQMBAGQAUwBxAChYBQAAAGlucHV0cQFYBgAAAG91dHB1dHECWAYAAABwYXJhbXNxA1gJAAAAd2lsZGNhcmRzcQRYBwAAAHRocmVhZHNxBVgJAAAAcmVzb3VyY2VzcQZYAwAAAGxvZ3EHWAcAAAB2ZXJzaW9ucQhYBAAAAHJ1bGVxCVgJAAAAY29uZGFfZW52cQpYDwAAAHNpbmd1bGFyaXR5X2ltZ3ELWBAAAABzaW5ndWxhcml0eV9hcmdzcQxYDwAAAHVzZV9zaW5ndWxhcml0eXENWAwAAABiZW5jaF9yZWNvcmRxDlgFAAAAam9iaWRxD1gIAAAAaXNfc2hlbGxxEFgPAAAAYmVuY2hfaXRlcmF0aW9ucRFYCgAAAHNoYWRvd19kaXJxEnRxE11xFChOWLIEAABSc2NyaXB0IHtwYXJhbXMucnNjcmlwdH0gLS1pZCB7cGFyYW1zLmlkfSAtLWxpYmRpciB7cGFyYW1zLmxpYmRpcn0gLS1jb3JlcyB7cGFyYW1zLmNvcmVzfSAtLVdJRyB7aW5wdXQudHVtfSAtLWdjV2lnIHtwYXJhbXMuZ2N3aWd9IC0tbWFwV2lnIHtwYXJhbXMubWFwd2lnfSAtLXJlcFRpbWVXaWcge3BhcmFtcy5yZXBUaW1lV2lnfSAtLXNleCB7cGFyYW1zLnNleH0gLS1ub3JtYWxQYW5lbCB7cGFyYW1zLm5vcm1hbHBhbmVsfSAtLXBsb2lkeSAie3BhcmFtcy5wbG9pZHl9IiAtLW5vcm1hbCAie3BhcmFtcy5ub3JtYWx9IiAtLW1heENOIHtwYXJhbXMubWF4Q059IC0taW5jbHVkZUhPTUQge3BhcmFtcy5pbmNsdWRlSE9NRH0gLS1jaHJzICJ7cGFyYW1zLmNocnN9IiAtLWNoclRyYWluICJ7cGFyYW1zLmNoclRyYWlufSIgLS1nZW5vbWVTdHlsZSB7cGFyYW1zLmdlbm9tZVN0eWxlfSAtLWdlbm9tZUJ1aWxkIHtwYXJhbXMuZ2Vub21lQnVpbGR9IC0tZXN0aW1hdGVOb3JtYWwge3BhcmFtcy5lc3RpbWF0ZU5vcm1hbH0gLS1lc3RpbWF0ZVBsb2lkeSB7cGFyYW1zLmVzdGltYXRlUGxvaWR5fSAtLWVzdGltYXRlU2NQcmV2YWxlbmNlIHtwYXJhbXMuZXN0aW1hdGVDbG9uYWxpdHl9IC0tc2NTdGF0ZXMgIntwYXJhbXMuc2NTdGF0ZXN9IiAtLWxpa01vZGVsIHtwYXJhbXMubGlrTW9kZWx9IC0tY2VudHJvbWVyZSB7cGFyYW1zLmNlbnRyb21lcmV9IC0tZXhvbnMuYmVkIHtwYXJhbXMuZXhvbnN9IC0tdHhuRSB7cGFyYW1zLnR4bkV9IC0tdHhuU3RyZW5ndGgge3BhcmFtcy50eG5TdHJlbmd0aH0gLS1taW5NYXBTY29yZSB7cGFyYW1zLm1pbk1hcFNjb3JlfSAtLWZyYWNSZWFkc0luQ2hyWUZvck1hbGUge3BhcmFtcy5mcmFjUmVhZHNDaHJZTWFsZX0gLS1ub3JtYWxpemVNYWxlWCB7cGFyYW1zLm5vcm1hbGl6ZU1hbGVYfSAtLW1heEZyYWNHZW5vbWVTdWJjbG9uZSB7cGFyYW1zLm1heEZyYWNHZW5vbWVTdWJjbG9uZX0gLS1tYXhGcmFjQ05BU3ViY2xvbmUge3BhcmFtcy5tYXhGcmFjQ05BU3ViY2xvbmV9IC0tbm9ybWFsMklnbm9yZVNDIHtwYXJhbXMubm9ybWFsMklnbm9yZVNDfSAtLXNjUGVuYWx0eSB7cGFyYW1zLnNjUGVuYWx0eX0gLS1wbG90RmlsZVR5cGUge3BhcmFtcy5wbG90RmlsZVR5cGV9IC0tcGxvdFlMaW0gIntwYXJhbXMucGxvdFlsaW19IiAtLW91dERpciB7cGFyYW1zLm91dERpcn0gPiB7bG9nfSAyPiB7bG9nfXEVaA5oEYZxFmVYBQAAAHNoZWxscReFcRh0cRku", "rule": "ichorCNA", "input": ["results/readDepth/FHL0167_E_C2.bin1000000.wig"], "log": ["logs/ichorCNA/FHL0167_E_C2.log"], "params": ["'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/GRCh38.GCA_000001405.2_centromere_acen.txt'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/HD_ULP_PoN_hg38_1Mb_normAutosomes_median.rds'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/gc_hg38_1000kb.wig'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/map_hg38_1000kb.wig'", "'/fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/scripts/runIchorCNA_fix.R'", "'FHL0167_E_C2'", "'None'", "'None'", "'UCSC'", "'c(-2,4)'", "'c(0.5,0.6,0.7,0.8,0.9,0.95)'", "'c(1,3)'", "'c(1:22)'", "'c(1:22, \\\\\"X\\\\\")'", "'c(2,3)'", "'hg38'", "'pdf'", "'results/ichorCNA/FHL0167_E_C2/'", "'t'", "0.002", "0.5", "0.7", "0.75", "0.9", "0.9999", "1", "1", "10000", "5", "False", "None", "True", "True", "True", "True"], "shellcmd": "Rscript /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/scripts/runIchorCNA_fix.R --id FHL0167_E_C2 --libdir /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/ --cores 1 --WIG results/readDepth/FHL0167_E_C2.bin1000000.wig --gcWig /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/gc_hg38_1000kb.wig --mapWig /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/map_hg38_1000kb.wig --repTimeWig None --sex None --normalPanel /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/HD_ULP_PoN_hg38_1Mb_normAutosomes_median.rds --ploidy \"c(2,3)\" --normal \"c(0.5,0.6,0.7,0.8,0.9,0.95)\" --maxCN 5 --includeHOMD False --chrs \"c(1:22, \\\"X\\\")\" --chrTrain \"c(1:22)\" --genomeStyle UCSC --genomeBuild hg38 --estimateNormal True --estimatePloidy True --estimateScPrevalence True --scStates \"c(1,3)\" --likModel t --centromere /fh/fast/ha_g/user/pchandra/ichor_eval_fix/ichorCNA/inst/extdata/GRCh38.GCA_000001405.2_centromere_acen.txt --exons.bed None --txnE 0.9999 --txnStrength 10000 --minMapScore 0.75 --fracReadsInChrYForMale 0.002 --normalizeMaleX True --maxFracGenomeSubclone 0.5 --maxFracCNASubclone 0.7 --normal2IgnoreSC 0.9 --scPenalty 1 --plotFileType pdf --plotYLim \"c(-2,4)\" --outDir results/ichorCNA/FHL0167_E_C2/ > logs/ichorCNA/FHL0167_E_C2.log 2> logs/ichorCNA/FHL0167_E_C2.log", "incomplete": false, "starttime": 1764914765.921409, "endtime": 1764914822.546783, "job_hash": 9214558047794700732, "conda_env": null, "singularity_img_url": null} \ No newline at end of file diff --git a/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9yZWFkRGVwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln b/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9yZWFkRGVwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln deleted file mode 100644 index ba6a666..0000000 --- a/scripts/snakemake/.snakemake/metadata/cmVzdWx0cy9yZWFkRGVwdGgvRkhMMDE2N19FX0MyLmJpbjEwMDAwMDAud2ln +++ /dev/null @@ -1 +0,0 @@ -{"version": null, "code": "gAMoQxJ0AGQBfA18EGQCjQMBAGQAUwBxAChYBQAAAGlucHV0cQFYBgAAAG91dHB1dHECWAYAAABwYXJhbXNxA1gJAAAAd2lsZGNhcmRzcQRYBwAAAHRocmVhZHNxBVgJAAAAcmVzb3VyY2VzcQZYAwAAAGxvZ3EHWAcAAAB2ZXJzaW9ucQhYBAAAAHJ1bGVxCVgJAAAAY29uZGFfZW52cQpYDwAAAHNpbmd1bGFyaXR5X2ltZ3ELWBAAAABzaW5ndWxhcml0eV9hcmdzcQxYDwAAAHVzZV9zaW5ndWxhcml0eXENWAwAAABiZW5jaF9yZWNvcmRxDlgFAAAAam9iaWRxD1gIAAAAaXNfc2hlbGxxEFgPAAAAYmVuY2hfaXRlcmF0aW9ucRFYCgAAAHNoYWRvd19kaXJxEnRxE11xFChOWGYAAAB7cGFyYW1zLnJlYWRDb3VudGVyfSB7aW5wdXR9IC1jIHtwYXJhbXMuY2hyc30gLXcge3BhcmFtcy5iaW5TaXplfSAtcSB7cGFyYW1zLnF1YWx9ID4ge291dHB1dH0gMj4ge2xvZ31xFWgOaBGGcRZlWAUAAABzaGVsbHEXhXEYdHEZLg==", "rule": "read_counter", "input": ["/hpc/temp/ha_g/projects/psma/PSMA-Lut-2025_Sept120_realigned/realign_bam_paired_snakemake/BAMs/FHL0167_E_C2_recalibrated.bam"], "log": ["logs/readDepth/FHL0167_E_C2.bin1000000.log"], "params": ["'/fh/fast/ha_g/app/bin/readCounter'", "'20'", "'chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY'", "1000000"], "shellcmd": "/fh/fast/ha_g/app/bin/readCounter /hpc/temp/ha_g/projects/psma/PSMA-Lut-2025_Sept120_realigned/realign_bam_paired_snakemake/BAMs/FHL0167_E_C2_recalibrated.bam -c chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY -w 1000000 -q 20 > results/readDepth/FHL0167_E_C2.bin1000000.wig 2> logs/readDepth/FHL0167_E_C2.bin1000000.log", "incomplete": false, "starttime": 1764914570.425365, "endtime": 1764914602.307819, "job_hash": -4504133736722542007, "conda_env": null, "singularity_img_url": null} \ No newline at end of file