Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transform my seurat object into iCellR #26

Open
pabloatria18 opened this issue Dec 6, 2020 · 5 comments
Open

Transform my seurat object into iCellR #26

pabloatria18 opened this issue Dec 6, 2020 · 5 comments

Comments

@pabloatria18
Copy link

Hello,
Is there a way of transforming my final Seurat object (after all the QC, Batch alignment and Clustering) into iCellR?
There is some information I would like to obtain but I can't get it from the Seurat vignettes (like Cell cycle pie graph, Graph bar illustrating the change between conditions in one cluster, among others).

I appreciate the help

@rezakj
Copy link
Owner

rezakj commented Dec 7, 2020

Yes, read this issue: #19

@pabloatria18
Copy link
Author

Thanks Reza!
I could do it, but I am not being able to transfer the condition and clusters into the iCellR object.
Also, you advise running the analysis again using iCellR, you mean running the whole raw data again with iCellR instead of transferring from Seurat?

@rezakj
Copy link
Owner

rezakj commented Dec 7, 2020

You can, but the only thing is that iCellR identifies the conditions in the barcode/cell id (column names in the main.data slot and row names in the tSNE data). A few ways to do this but here are some of the easier options:
1: modify the barcode names for tSNE data and main data.
2: replace the cluster numbers with the condition names (so that the clusters are actually your conditions.)
3: this option might not be so convenient for you but to avoid options 1 and 2 you need to run everything from the start using iCellR.

@pabloatria18
Copy link
Author

Thanks!
Is there any way of maintaining the colors when plotting?
For example,
When I do:

clust.stats.plot(my.obj, plot.type = "pie.cc", interactive = F, conds.to.plot = "Control")
clust.stats.plot(my.obj, plot.type = "pie.cc", interactive = F, conds.to.plot = "Loaded")

I get different colors for the cell cycle phases

@rezakj
Copy link
Owner

rezakj commented Dec 8, 2020

Almost all the plots in iCellR are ggplot2. So just make the plot object like this:

My.plot <- clust.stats.plot(my.obj, plot.type = "pie.cc", interactive = F, conds.to.plot = "Control")

Then "My.plot" is your plot object you then just need to add "+" manual colors.

Here are some examples:
http://www.sthda.com/english/wiki/ggplot2-colors-how-to-change-colors-automatically-and-manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants