FAQ  •  Register  •  Login

t-SNE in R

Forum rules
Please be as geeky as possible. Reference, reference, reference.
Also, please note that this is a mixed bag of math-gurus and mathematically challenged, so choose your words wisely :-)
<<

mallahi

Participant

Posts: 4

Joined: Tue Sep 19, 2017 7:52 pm

Post Wed Oct 04, 2017 3:37 pm

t-SNE in R

Hello,

Does anyone use t-sne in R to analyze their CyTOF data? If so, what is the best way to import/organize CSV files?

Thanks!
<<

ErinSimonds

Master

Posts: 50

Joined: Tue May 13, 2014 8:04 pm

Post Wed Oct 04, 2017 5:01 pm

Re: t-SNE in R

Hi Michelle,

I'd recommend starting with the Cytofkit package. It will import your data, run tSNE on it, and it provides a nice graphical interface to view and export the plots. It can also run PhenoGraph clustering on your data and allows you to view those clusters in tSNE space. Just be sure to choose "cytofAsinh" as the scaling factor when you set up the run in the GUI window. I'd recommend starting with 1000 events from a single FCS file until you get the hang of it.

The code to install and run it is:

  Code:
## install
source("https://bioconductor.org/biocLite.R")
biocLite("cytofkit")

## run new analysis
library(cytofkit)
cytofkit_GUI()

## open old analysis (or recently finished analysis)
cytofkitShinyAPP()


You may need to install some other required open source programs (aka dependencies) like RShiny and XQuartz (if you are a Mac user).

Good luck!
<<

mleipold

Guru

Posts: 5796

Joined: Fri Nov 01, 2013 5:30 pm

Location: Stanford HIMC, CA, USA

Post Wed Oct 04, 2017 6:24 pm

Re: t-SNE in R

Hi Michelle,

In addition to the info Erin mentioned, here are some other helpful links for Cytofkit:
https://github.com/JinmiaoChenLab/cytofkit
https://www.bioconductor.org/packages/r ... nyAPP.html


Mike
<<

FlowJoTechSupport

Participant

Posts: 3

Joined: Tue Aug 11, 2015 3:16 pm

Post Wed Oct 04, 2017 7:17 pm

Re: t-SNE in R

Hey Michelle,

Erin and Mike point out some very nice links to analyze data in R, of course, you can use FlowJo to analyze CyTof data by dragging and dropping, using clustering and t-SNE denoised by PCA, etc. For more information check this out, https://www.flowjo.com/solutions/flowjo/downloads, we have a trial you can sign-up for and technical support to help you.

Best,

Miguel Velazquez

Tech Support @ FJ
<<

dtelad11

Master

Posts: 129

Joined: Mon Oct 31, 2016 6:26 pm

Post Wed Oct 04, 2017 11:01 pm

Re: t-SNE in R

Out of curiosity, at which stage do you get to CSV files? In which way to you want to organize them?

(I am asking because usually flow data comes in FCS files.)
<<

mallahi

Participant

Posts: 4

Joined: Tue Sep 19, 2017 7:52 pm

Post Thu Oct 05, 2017 9:30 pm

Re: t-SNE in R

Thank you Erin, Mike, and Miguel for your help. I will definitely try Cytofkit.

Does that mean that, by using Cytofkit, I will not have to first convert the FCS files into CSV files?

Thanks again!
Michelle
<<

mleipold

Guru

Posts: 5796

Joined: Fri Nov 01, 2013 5:30 pm

Location: Stanford HIMC, CA, USA

Post Thu Oct 05, 2017 11:29 pm

Re: t-SNE in R

Hi Michelle,

No, Cytofkit can be run on FCS files.


Mike
<<

mallahi

Participant

Posts: 4

Joined: Tue Sep 19, 2017 7:52 pm

Post Fri Oct 06, 2017 2:23 am

Re: t-SNE in R

Hi Mike,

Great - thank you for the clarification.

Regards,
Michelle
<<

dtelad11

Master

Posts: 129

Joined: Mon Oct 31, 2016 6:26 pm

Post Fri Oct 06, 2017 3:55 pm

Re: t-SNE in R

You might want to look into the flowCore R package, which allows you to import FCS files into R. Once the data is in R, you can use the Rtsne package to run t-SNE on it. This route is relevant if you're looking to build your own pipeline for FCS analysis, if you just want to run t-SNE then the GUI option Erin pointed out might be the way to go.
<<

cytofkitMaintainer

Participant

Posts: 2

Joined: Fri Nov 03, 2017 1:23 am

Post Mon Nov 06, 2017 9:37 am

Re: t-SNE in R

Hi all,

Thanks for all the recommendations, and glad to see people using cytofkit!

Unfortunately, a bug was identified regarding how clustering was handled in cytofkit, detailed here.

Thankfully, we've fixed the issue and the fix (along with new features) can be accessed by updating cytofkit.
To do so, you can update your version of R to 3.4.2 and update to Bioconductor v3.6 then run the following:
  Code:
source("https://bioconductor.org/biocLite.R")
biocLite("cytofkit")


Thanks Erin for pointing us here to ensure we can reach as many users as possible regarding this bug fix announcement.

Regards,
cytofkit Maintenance team
Next

Return to CyTOF data analysis

Who is online

Users browsing this forum: No registered users and 8 guests