From eca6889b784583bc0e9fb338d7b53d4c9b530dc4 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Mon, 22 Feb 2021 23:43:40 +0100 Subject: new scripts and files added --- scripts/tsne-mp2d-coordinates.R | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/tsne-mp2d-coordinates.R (limited to 'scripts/tsne-mp2d-coordinates.R') diff --git a/scripts/tsne-mp2d-coordinates.R b/scripts/tsne-mp2d-coordinates.R new file mode 100644 index 0000000..ef97595 --- /dev/null +++ b/scripts/tsne-mp2d-coordinates.R @@ -0,0 +1,12 @@ +#!/usr/bin/env Rscript +library(Rtsne) +library(ggplot2) +args = commandArgs(trailingOnly=TRUE) +data = read.csv(args[1],header=F) +smi = data[,1] +data[,1] = NULL +m = as.matrix(data) +dist = as.dist(m) +set.seed(66) +tsne = Rtsne(dist,verbose=T,is_distance=T) +write.csv(data.frame(smiles= smi, x = tsne$Y[,1], y = tsne$Y[,2]),args[2],row.names=F) -- cgit v1.2.3