Created
October 7, 2016 18:19
-
-
Save ipurusho/44e06d43aab0a7dd2641589a4fd3351c to your computer and use it in GitHub Desktop.
tSNE script for VSD as input to visualize clusters in sequencing data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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