diff --git a/somatic/firstStep.R b/somatic/firstStep.R index 44d1621..0127b50 100644 --- a/somatic/firstStep.R +++ b/somatic/firstStep.R @@ -523,8 +523,9 @@ for (sam_no in 1:ncol(matrixOfLogFold)) { } fileToOut <- paste0(folder_name, sample_name, "/CNAs.txt") fileConn<-file(fileToOut) - writeLines(c(paste("##"," QC ", finalPValue, collapse = " ")), fileConn) + writeLines(c(paste("##"," QC ", signif(finalPValue,2), collapse = " ")), fileConn) close(fileConn) + print(found_CNVs_total) write.table(found_CNVs_total, file = fileToOut, quote=F, row.names = F, sep="\t", append = T) } } diff --git a/somatic/helpersSomatic.R b/somatic/helpersSomatic.R index 56154c8..f6e5ee6 100644 --- a/somatic/helpersSomatic.R +++ b/somatic/helpersSomatic.R @@ -83,7 +83,7 @@ plotFoundCNVs <- function(found_CNVs, toyLogFoldChange, toyBedFile, outputFolder if(opt$debug) { print(annotationGenes) } - CNVtoOut <- matrix(c(chrom, toyBedFile[found_CNVs[s,2],2], toyBedFile[found_CNVs[s,3],3], vector_of_states[found_CNVs[s,4]], -1 * found_CNVs[s,1], annotationGenes), nrow=1) + CNVtoOut <- matrix(c(chrom, toyBedFile[found_CNVs[s,2],2], toyBedFile[found_CNVs[s,3],3], vector_of_states[found_CNVs[s,4]], round(-1 * found_CNVs[s,1],0), annotationGenes), nrow=1) if(opt$debug) { print(CNVtoOut)