Giter Club home page Giter Club logo

rna-seq-tsne's Introduction

The art of using t-SNE for single-cell transcriptomics

Pretty perplexity

This is a companion repository to our paper https://www.nature.com/articles/s41467-019-13056-x (Kobak & Berens 2019, The art of using t-SNE for single-cell transcriptomics). All code is in Python Jupyter notebooks. We used this t-SNE implementation: https://github.com/KlugerLab/FIt-SNE.

See demo.ipynb for a step-by-step guide using a data set from Tasic et al., Nature 2018 (24,000 cells sequenced with Smart-seq2).

The other notebooks generate all figures that we have in the paper:

The last three notebooks require one to run server-10xdata.py and server-cao.py. One needs more than 32 Gb of RAM to process these datasets conveniently, so these Python scripts were run separately on a powerful machine. They pickle all the results (t-SNE embeddings). Unfortunately, these pickles are too large to be shared on Github.

rna-seq-tsne's People

Contributors

dkobak avatar philippberens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rna-seq-tsne's Issues

R Implementation for novice

I have some experience using R (no Python unfortunately) but am having some trouble figuring out how to implement your t-SNE pipeline. In the preprint, you mention that it should be relatively easy to implement in R. What would you recommend as a general approach? Using a Python interface package like reticulate to run the Python functions? Writing an R script de novo to accomplish the same tasks as in the tutorial? Something else?

I found your explanation of the appropriate uses of t-SNE and tradeoffs in parameter selection to be very intuitive. I hope to work this approach into my normal analysis routine for sc-RNA-Seq data. Any help would be greatly appreciated. Thanks!

Dead link to toy example in readme

Very minor issue to report here: the link to toy-exam_p_le.ipynb in the readme appears dead as the file is named toy-examle.ipynb is the repository.

R Implementation

Hi,

I saw the other "issue", which is now closed, but I wanted to ask again, do you plan on releasing an R implementation? Or is there R code available for the methods described in the paper?

For the larger user community to benefit from the suggestions in your paper for getting good tSNE plots, it would be very useful if you can make a user-friendly R package, that can be loaded and used, possibly integrated, with a package like Seurat. Ease of use in R is important in my opinion for the community to use your pipeline for tSNE.

Your efforts in this direction would be appreciated by the user community.

Thanks.

Advice on 50k cell dataset

Thank you for your detailed paper! I wanted to apply your suggestions to a 50k cell dataset which should be similar to the Macosko dataset (44k cells) but I am getting weird results.
I am using the latest version of FIt-SNE (with PCA initialization as default) and a dataset normalized with sctransform and integrated using Seurat.

Here is a summary of my results.

Using the suggested setting from the paper the tSNEs seem to become more diffuse compared to the 30 perplexity setting
standard

I also tried changing to set the late_exag_coef to 4
exagerated

Any idea what is happening here? Thank you in advance :)

python implementation

Following changes make the code run in the windows os
254: timestamp = str(datetime.now().strftime('%Y-%m-%d-%H-%M-%S')) + '-' + str(np.random.randint(0,1000000000))
259: with open(os.path.join(os.getcwd(), infile), 'wb') as f: #os.getcwd() + '/' + infile
302: os.path.join(os.path.dirname(os.path.realpath(file)), 'bin', 'FItSNE'), # + "/bin/fast_tsne", #os.path.dirname(os.path.realpath(file)) + "/bin/fast_tsne",
# remove i/o-files
330 os.remove(os.path.join(os.getcwd(), infile)) # os.getcwd() + '/' + infile)
os.remove(os.path.join(os.getcwd(), outfile)) # os.getcwd() + '/' + outfile)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.