Skip to content

Instantly share code, notes, and snippets.

@ipurusho
Created October 7, 2016 18:19
Show Gist options
  • Save ipurusho/44e06d43aab0a7dd2641589a4fd3351c to your computer and use it in GitHub Desktop.
Save ipurusho/44e06d43aab0a7dd2641589a4fd3351c to your computer and use it in GitHub Desktop.
tSNE script for VSD as input to visualize clusters in sequencing data
import sys
import numpy as np
from sklearn.manifold import TSNE
my_data = np.genfromtxt(str(sys.argv[1]), delimiter=',')
model = TSNE(n_components=2, random_state=0,perplexity=int(sys.argv[2]))
tsne = model.fit_transform(np.transpose(my_data))
np.savetxt(str(sys.argv[3]), tsne, delimiter=",")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment