satijalab / seurat

R toolkit for single cell genomics
http://www.satijalab.org/seurat
Other
2.28k stars 910 forks source link

Integration for all features in both datasets #2929

Closed Connorr0 closed 4 years ago

Connorr0 commented 4 years ago

Hello, I am actually doing this analysis in Signac, but the function I am interested in is part of base Seurat.

I have two datasets that I am integrating, one dataset has two rare subtypes that are not present in the other dataset. After integration, these rare groups are getting pulled closer into other cells. I do not know if this is real, an integration artifact, or if I do not have information from peaks in these cells in the integrated assay.

I was trying to use peaks from as many cells as possible to integrate the samples using IntegrateData(), but I keep getting the error: Error in intI(i, n = x@Dim[1], dn[[1]], give.dn = FALSE) : invalid character indexing

The two objects I am integrating are E14 and P0. Here is how I am getting my peaks to use:

E14_peaks = rowSums(E14@assays$sharedPeaks_E14_P0@data > 0)
E14_peaks = names(E14_peaks[E14_peaks > 10])

P0_peaks = rowSums(P0@assays$sharedPeaks_E14_P0@data > 0)
P0_peaks = names(P0_peaks[P0_peaks > 10])

availible_peaks = unique(c(E14_peaks, P0_peaks))
length(availible_peaks)

Do you have any advice on how to avoid this error?

timoast commented 4 years ago

Are you setting anchor.features=available_peaks in FindIntegrationAnchors? What is the length of available_peaks?

Rather than just using any peak open in >10 cells in either dataset you could do some more targeted feature selection by finding top differentially accessible peaks for each cluster in each dataset and taking the union of all those peaks, and using those features in the integration.

You could also look at the original (uncorrected) data for these clusters that get drawn together in the integration and see if there are similarities in the patterns of chromatin accessibility by looking for shared differentially accessible peaks for example

timoast commented 4 years ago

Closing now, feel free to reopen if there are still issues