From 0030b8b163ded5558513b4bc6b30a924577d7e52 Mon Sep 17 00:00:00 2001 From: Szilveszter Juhos Date: Wed, 25 Oct 2017 11:13:27 +0200 Subject: [PATCH 1/2] Adding exception handling to ASCAT when it is not able to find optimum --- bin/run_ascat.r | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/run_ascat.r b/bin/run_ascat.r index 31ea6f2264..e11c3f69c2 100755 --- a/bin/run_ascat.r +++ b/bin/run_ascat.r @@ -43,6 +43,12 @@ cnvs=ascat.output$segments[ascat.output$segments[,"nMajor"]!=1 | ascat.output$se write.table(cnvs, file=paste(tumorname,".cnvs.txt",sep=""), sep="\t", quote=F, row.names=F, col.names=T) #Write out purity and ploidy info -summary <- matrix(c(ascat.output$aberrantcellfraction, ascat.output$ploidy), ncol=2, byrow=TRUE) +summary <- tryCatch({ + matrix(c(ascat.output$aberrantcellfraction, ascat.output$ploidy), ncol=2, byrow=TRUE)}, error = function(err) { + # error handler picks up where error was generated + print(paste("Could not find optimal solution: ",err)) + return(matrix(c(0,0),nrow=1,ncol=2,byrow = TRUE)) + } +) colnames(summary) <- c("AberrantCellFraction","Ploidy") write.table(summary, file=paste(tumorname,".purityploidy.txt",sep=""), sep="\t", quote=F, row.names=F, col.names=T) From e3d71412c79d4a24f7fc56981491cb5bb47d2e5e Mon Sep 17 00:00:00 2001 From: Szilveszter Juhos Date: Wed, 25 Oct 2017 11:28:46 +0200 Subject: [PATCH 2/2] fixing config r-params-base typo --- configuration/singularity-path.config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configuration/singularity-path.config b/configuration/singularity-path.config index 4fb21e0ff2..8ce9cb3d93 100644 --- a/configuration/singularity-path.config +++ b/configuration/singularity-path.config @@ -33,10 +33,10 @@ process { $RealignerTargetCreator.container = "${params.containerPath}/gatk-${params.tag}.img" $RecalibrateBam.container = "${params.containerPath}/gatk-${params.tag}.img" $RunAlleleCount.container = "${params.containerPath}/runallelecount-${params.tag}.img" - $RunAscat.container = "${params.containerPath}/r-params.base-${params.tag}.img" + $RunAscat.container = "${params.containerPath}/r-base-${params.tag}.img" $RunBamQC.container = "${params.containerPath}/qualimap-${params.tag}.img" $RunBcftoolsStats.container = "${params.containerPath}/caw-${params.tag}.img" - $RunConvertAlleleCounts.container = "${params.containerPath}/r-params.base-${params.tag}.img" + $RunConvertAlleleCounts.container = "${params.containerPath}/r-base-${params.tag}.img" $RunFastQC.container = "${params.containerPath}/fastqc-${params.tag}.img" $RunFreeBayes.container = "${params.containerPath}/freebayes-${params.tag}.img" $RunGenotypeGVCFs.container = "${params.containerPath}/gatk-${params.tag}.img"