view chromeister/bin/plot.R @ 0:4616cc3476d4 draft

Uploaded
author bitlab
date Sat, 15 Dec 2018 18:06:48 -0500
parents
children
line wrap: on
line source

#!/usr/bin/env Rscript
args = commandArgs(trailingOnly=TRUE)

if(length(args) < 1){
  stop("USE: Rscript --vanilla plot.R <matrix>")
}


path_mat = args[1]


data <- read.csv(path_mat, header = FALSE, sep = " ", skip=1)


png(paste(path_mat, ".png", sep=""), width = length(data[,1]), height = length(data[,1]))
image(t(as.matrix(data)), col = grey(seq(1, 0, length = 256)), xaxt='n', yaxt='n')
dev.off()