Skip to content

Commit

Permalink
Fix issue 63: filename length bug (#64)
Browse files Browse the repository at this point in the history
* fix issue 63: Filename length restriction in R diffchrom script
  • Loading branch information
GWarsow authored Jul 14, 2021
1 parent 7aba516 commit 66dfa91
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ The original script with a documentation of the underlying ideas can be found [h

## Change Logs

* 1.2.73-2 (branch-specific change)
* 1.2.73-202 (branch-specific change)
- PATCH: call of grDevices.pdf() in chrom_diff.r lead to unexpected
(truncated to at most 511 characters) file name of output pdf

* 1.2.73-201 (branch-specific change)
- PATCH: explicit MBUFFER version can be specified for tbi-lsf environment

* 1.2.73-2, 1.2.73-200 (branch-specific change)
- Updated unidirectional WGBS read-reordering script from [here](https://github.com/cimbusch/TWGBS.git)
- Actually include the WGBS read-reordering script
- Improved error checking and reporting for BWA and surrounding pipe
Expand Down
10 changes: 8 additions & 2 deletions resources/analysisTools/qcPipeline/chrom_diff.r
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,14 @@ for(i in 1:nrow(data)){
v[i] <- sum(data[i,])
}

pdf(opt$outputFile, height = 10, width = 10)
# fix for https://github.com/DKFZ-ODCF/AlignmentAndQCWorkflows/issues/63
oldWD = getwd()
setwd(dirname(opt$outputFile))
tmpFileName=basename(tempfile(pattern = "DiffChroms_", fileext = ".tmp"))

pdf(tmpFileName, height = 10, width = 10)
barplot(v, names.arg = rownames(data), col = rainbow(nrow(data)),ylab = "# reads", xlab = "Chromosome", main = plot_title)

dev.off()

file.rename(tmpFileName, opt$outputFile)
setwd(oldWD)

0 comments on commit 66dfa91

Please sign in to comment.