4a. Calculate doublet scores
doubScores <- addDoubletScores(
input = ArrowFiles,
nTrials = 10,
k = 10, # Refers to how many cells near a "pseudo-doublet" to count.
knnMethod = "UMAP", # Refers to the embedding to use for nearest neighbor search.
LSIMethod = 1
)
ds <- addDoubletScores(
input = ArrowFiles,
nTrials = 10,
k = 10, # Refers to how many cells near a "pseudo-doublet" to count.
knnMethod = "UMAP", # Refers to the embedding to use for nearest neighbor search.
LSIMethod = 1
)
4b. Save initial project
proj <- ArchRProject(
ArrowFiles = ArrowFiles,
outputDirectory = ".",
copyArrows = TRUE #This is recommended so that you maintain an unaltered copy for later usage.
)
proj <- saveArchRProject(ArchRProj = proj)
save.image(paste0(sample_name, "_project1_", Sys.Date(), ".RData"))
4c. Subset by TSS score
- Visualize using cell-ranger' ./QualityControl/...-TSS_by_Unique_Frags.pdf plots
- Cut off <10
idxPass <- which(proj$TSSEnrichment >= 10) # primarily due to P30
cellsPass <- proj$cellNames[idxPass]
proj2 <- proj[cellsPass, ]
proj2 <- filterDoublets(proj2)
proj2 <- saveArchRProject(ArchRProj = proj2)
save.image(paste0(sample_name, "_project2_", Sys.Date(), ".RData"))
Results of filterDoublets
Filtering 190 cells from ArchRProject! P5 : 14 of 1218 (1.1%) E18 : 147 of 3843 (3.8%) E12 : 15 of 1249 (1.2%) P30 : 14 of 1196 (1.2%)