Skip to content
Snippets Groups Projects
Commit 08c1fa55 authored by Cats's avatar Cats
Browse files

fix mergeCounts

parent b52170d6
No related branches found
No related tags found
1 merge request!15Biowdl 25
......@@ -12,7 +12,7 @@ task MergeCounts {
set -e -o pipefail
mkdir -p ${sub(outputFile, basename(outputFile) + "$", "")}
${preCommand}
R --no-save --slave <<CODE > ${outputFile}
R --no-save --slave <<CODE
library(dplyr)
library(reshape2)
......@@ -23,7 +23,7 @@ task MergeCounts {
header <- ${true="TRUE" false="FALSE" inputHasHeader}
d <- do.call(rbind, lapply(listOfFiles, function(file){
d <- read.table(file, header=header, comment.char="#")
d <- read.table(file, sep="\t", header=header, comment.char="#")
splitPath <- strsplit(file, "/")[[1]]
colnames(d)[valueI] <- sub("\\\.[^\\\.]*$", "",
......@@ -34,7 +34,7 @@ task MergeCounts {
}))
d <- d %>% dcast(feature ~ sample, value.var="count")
write.table(d, sep="\t", quote=FALSE, row.names=FALSE)
write.table(d, file="${outputFile}", sep="\t", quote=FALSE, row.names=FALSE)
CODE
>>>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment