Replies: 1 comment 2 replies
|
Hi Nadia, the The |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Dear Signac team,
Thank you for this great resource!
I apologise if this has been asked before (I found a similar thread and I could not find it again), or if this is a rather silly question, but I am stuck and I would like to be able to move forward with the analysis.
I am working with 10x multiome samples (RNA+ATAC on same nuclei). I am trying to create a common peak set following the https://stuartlab.org/signac/articles/merging tutorial. I was able to create the common peak set. However, I am stuck on the "Create Fragment objects" as I cannot find the "singlecell.csv"-type of file in the "outs" generated by CellRangerARC. I have the .bed files for the peaks, the tsv for the fragments, but I do not see any file with .csv, the closest thing I see is the "per_barcode_metrics" xls file. Could you help me?
Would it be wrong to continue without adding the metadate information?
Would this be wrong for creating a common peak set? (working in Rstudio on a Windows OS):
Create Seurat object
counts = Read10X_h5(paste0(sample, "/outs/filtered_feature_bc_matrix.h5"))
atac_fragments = paste0(sample, "/outs/atac_fragments.tsv.gz")
chrom_assay = CreateChromatinAssay(
counts=counts$Peaks,
sep=c(":","-"),
annotation = annotation_cjac,
fragments = atac_fragments,
validate.fragments=T)
seur = CreateSeuratObject(
counts = chrom_assay,
assay = "ATAC")
Merge samples
merged_seur <- merge(seu03, y = c(seu04, seu05, seu07, seu08, seu09), add.cell.ids = c("s03", "s04", "s05", "s07", "s08", "s09"))
merged_seur
#Create fragment files for each sample
frag3 <- CreateFragmentObject("/outs/atac_fragments.tsv.gz")
frag4 <- CreateFragmentObject("/outs/atac_fragments.tsv.gz")
(...)
Make new counts objects based on the combined file features
DefaultAssay(merged_seur) <- "ATAC"
counts3 <- FeatureMatrix(fragments = frag3, features = granges(merged_seur))
(...)
atac_assay3 = CreateChromatinAssay(
counts=counts3,
sep=c(":","-"),
annotation = annotation,
fragments = frag3,
validate.fragments=T)
(...)
Finally make the seurat objects
ATAC_3 <- CreateSeuratObject(counts = atac_assay3, assay = "CommonPeaks")
ATAC_4 <-
(...)
Merge samples after re-calculating ATAC peaks
atac_merged <- merge(ATAC_3, y = c(ATAC_4, ATAC_5, ATAC_7, ATAC_8, ATAC_9), add.cell.ids = c("s03", "s04", "s05", "s07", "s08", "s09"))
atac_merged
I am also confused as I have seen different options where the basic QC is done first, and then the common peak set is created, or the other way around...first create the common peak set, re-calculate based on the common peak set, and then do the basic QC. For example, here https://stuartlab.org/signac/1.11.0/articles/pbmc_multiomic, when performing the "peak calling" with MACS2 this happens after the QC. Is there a recommended approach?
Thank you in advance for your help and I apologise for any inconvenience.
Kind regards,
Nadia
All reactions