Mercurial > repos > rnateam > chipseeker
diff chipseeker.R @ 4:90fe78a19b55 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:21:37 -0500 |
parents | 535321abf9a4 |
children | b418a1d3585d |
line wrap: on
line diff
--- a/chipseeker.R Fri Jun 01 02:13:33 2018 -0400 +++ b/chipseeker.R Mon Nov 26 06:21:37 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)) {