Download the following script: https://gist.github.com/ipurusho/44e06d43aab0a7dd2641589a4fd3351c
In R, write the variance stabilized values per sample, subsetting for the top 500 variable genes, to a file #without# row and column labels. You can then use the tsne.py script as follows:
python /path/to/tSNE.py /path/to/tsne_input_vsd.csv 30 /path/to/output_file.csv
Where 30
is the perplexity value, which is dependent on sample size for optimum output (see documentation). The output file will contain two columns, dimension 1, dimension 2. The rows correspond to the Samples which will be in the same order as the input vsd columns. You can load this data back into R and visualize it using your preferred method.