#!/home/jhamp/.conda/envs/tfbs/bin/Rscript args = commandArgs(TRUE) file = args[1] tab = read.table(file, header=FALSE) colnames(tab) = c("chromosome", "start", "stop", "id", "score", "maxpos", "length") tab$maxpos = tab$start + tab$maxpos write.table(tab, file, row.names=FALSE, col.names=FALSE, quote=FALSE, sep='\t')