diff chipseeker.R @ 3:a6d072a82158 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/chipseeker commit 6f594126ac7369cc80c30a02a6df57e785dfb45a
author rnateam
date Mon, 26 Nov 2018 06:55:03 -0500
parents 195cba35110e
children 3ff6333973aa
line wrap: on
line diff
--- a/chipseeker.R	Fri Jun 01 02:14:08 2018 -0400
+++ b/chipseeker.R	Mon Nov 26 06:55:03 2018 -0500
@@ -53,17 +53,18 @@
 # Convert from 1-based to 0-based format
 if (format == "interval") {
     metacols <- apply(as.data.frame(metacols), 1, function(col) paste(col, collapse="|"))
-    resout <- data.frame(Chrom=res$seqnames,
-                    Start=res$start - 1,
-                    End=res$end,
-                    Comment=metacols)
+    resout <- data.frame(res$seqnames,
+                    res$start - 1,
+                    res$end,
+                    metacols)
+    colnames(resout)[1:4] <- c("Chrom", "Start", "End", "Comment")
 } else {
-    resout <- data.frame(Chrom=res$seqnames,
-                    Start=res$start - 1,
-                    End=res$end,
+    resout <- data.frame(res$seqnames,
+                    res$start - 1,
+                    res$end,
                     metacols)
+    colnames(resout)[1:3] <- c("Chrom", "Start", "End")
 }
-
 write.table(resout, file="out.tab", sep="\t", row.names=FALSE, quote=FALSE)
 
 if (!is.null(args$plots)) {