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

Can I integrate data with iCellR? #27

Closed
Midsummer723 opened this issue Feb 18, 2021 · 4 comments
Closed

Can I integrate data with iCellR? #27

Midsummer723 opened this issue Feb 18, 2021 · 4 comments

Comments

@Midsummer723
Copy link

I appreciate this great tools for analysis. Could I ask you that there is a integration function for multiple data or not.
I have about 50 patients data (all are the 10x files) which I want to merge them into one object. I find the "Combined Principal Component Alignment (CPCA)". But how can I use for my data. Thank you very much.

@rezakj
Copy link
Owner

rezakj commented Feb 18, 2021

Yes, it is very easy. First read each patient data like this:

P1 <- load10x("filtered_gene_bc_matrices/hg19/")
P2 <- load10x("filtered_gene_bc_matrices/hg19/")
P3 <- load10x("filtered_gene_bc_matrices/hg19/")
...
P50 <- load10x("filtered_gene_bc_matrices/hg19/")

Then use the data.aggregation function to make them into one file while also labeling each patient/condition.

Example for 3 patients:
my.data <- data.aggregation(samples = c("P1", "p2","P3"), condition.names = c("P1", "p2","P3"))

Then make an object:

my.obj <- make.obj(my.data)
my.obj

CPCA is for batch alignment, which you run instead of PCA step if you wish to do batch alignment.

@Midsummer723
Copy link
Author

Thank you for the quick reply. The CPCA can work for the batch effect,right? If it is, how can I use it to my data . Like the "my.obj <- iba(my.obj,dims = 1:30, k = 10,ba.method = "CPCA", method = "gene.model", gene.list = my.obj@gene.model)" change the gene.model to orig.ident (sorry , I use the seurat)? OR if not, how can I integrate the data to aviod the batch effect.

@rezakj
Copy link
Owner

rezakj commented Feb 18, 2021

Yes, you can replace my.obj@gene.model with orig.ident or any gene list. It is technically just a number of genes you want to use for this. It could be a list of top dispersed genes or top 1000-2000 expressed genes or combination of both or a set of genes you are interested in (eg. c(gene1,gene2,...)).

@Midsummer723
Copy link
Author

Thank you very much!

@rezakj rezakj closed this as completed Feb 19, 2021
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