No. I am asking how to merge 2 fragment files *before starting an ArchR project.
So I'm trying to integrate two datasets together for 10 different samples (taken in different batches). To mitigate for that I looked into Harmony but was not sure how to essentially apply Harmony from two datasets and get fragment files for later analysis in ArchR.
Any suggestions or pointers?
1 answer
ArchR has built-in support for Harmony correction;
projHeme2 <- addHarmony(
ArchRProj = projHeme2,
reducedDims = "IterativeLSI",
name = "Harmony",
groupBy = "dataset"
)
https://www.archrproject.com/bookdown/batch-effect-correction-wtih-harmony.html
I would not recommend doing this, as the fragment files contain the raw data, which will have a batch effect; and there are no mechanisms by which to correct fragments. Even if the fragment files are from technical replicates; in cases where you suspect a batch effect, the recommendation is to keep the files separate, use the built-in correction methodology for clustering; and include the replicate information as a covariate in the final statistical models being used.
If you do not suspect there to be a batch effect (i.e., the same libraries were sequenced multiple times), you can merge the .bam files and re-generate the fragment files from the resulting file.
Log in to answer this question.