From 214abee97b853126b1bf1faf2390376b5966656e Mon Sep 17 00:00:00 2001 From: "A. Murat Eren" Date: Tue, 9 Sep 2014 17:30:52 -0400 Subject: [PATCH] get rid of unnecesary dependencies --- bin/o-cca-analysis.R | 46 ---------------------------------------- bin/o-cluster-analysis.R | 1 - 2 files changed, 47 deletions(-) delete mode 100755 bin/o-cca-analysis.R diff --git a/bin/o-cca-analysis.R b/bin/o-cca-analysis.R deleted file mode 100755 index 0059a8f..0000000 --- a/bin/o-cca-analysis.R +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env Rscript - -X11(width=12, height=10) -library("vegan") -library(tcltk) -library(gtools) - -args <- commandArgs(trailingOnly = TRUE) -csv_path <- args[1] -output_file_prefix <- args[2] -title_text <- args[3] - - -if(invalid(title_text)) - title_text <- "Unknown Title" - -if(invalid(output_file_prefix)) - output_file_prefix <- "unknown" - -csv <- read.csv(csv_path, header=TRUE, sep="\t") -rownames(csv) <- csv[,1] -csv_cca <- cca(csv[,-1]) - -C <- function(){ - plot(csv_cca, type = "n") - title(title_text, col.main = "gray") - text(csv_cca, dis = "sites", col="red", cex=0.5, labels=rownames(csv)) - points(csv_cca, display = "sp", col = "gray", bg = "red", cex =0.4) -} - -C() -tk_messageBox(message="Press a key") - -# PDF -pdf_output <- paste(output_file_prefix,".pdf",sep="") -pdf(pdf_output) -C() -sprintf("CCA result PDF: '%s'", pdf_output) -dev.off() - -# PNG -png_output <- paste(output_file_prefix,".png",sep="") -png(png_output, width = 1200, height = 1000, units = "px", pointsize = 12, bg = "transparent", type = c("cairo", "cairo-png", "Xlib", "quartz")) -C() -sprintf("CCA result PNG: '%s'", png_output) -dev.off() diff --git a/bin/o-cluster-analysis.R b/bin/o-cluster-analysis.R index dd4ba16..eb94122 100755 --- a/bin/o-cluster-analysis.R +++ b/bin/o-cluster-analysis.R @@ -25,7 +25,6 @@ if(invalid(output_file_prefix)){ if (display == TRUE){ X11(width=12, height=10) - library(tcltk) }