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 it be applied to a single BAM file (scATAC-seq) and a single 10X scRNA-seq data? #1

Open
x811zou opened this issue Mar 4, 2019 · 1 comment

Comments

@x811zou
Copy link

x811zou commented Mar 4, 2019

Hi!
I have a sample (no labeling) of stem cell differentiation data in both scRNA-seq and scATAC-seq, but I only have one BAM file from 10x. Just wanna make sure that your method could be applied to my data, coz I want to get combined clustering result.
Thank you for your help!

@timydaley
Copy link

Hi Xue,
Our R package scABC has the ability to read in and obtain count matrix files from a single bam ATAC-seq file, using the read group tag. The package is available at https://github.com/SUwonglab/scABC. The following commands should get you the counts file.

devtools::install_github("SUwonglab/scABC")
bamfile = "input.bam"
peakfile = "peaks.bed"
peaks = selectPeaks(peakfile)
counts = scABC:: getCountsMatrix(bamfile, peaks, byReadGroup = TRUE, RGtag = 'CB') # Or whatever your read group tag is
write.table(as.matrix(counts), file = "counts.txt", sep = "\t", quote = FALSE, row.names = FALSE, col.names = FALSE)

@durenzn Should the cell names be written to the file? If so, then set col.names = TRUE

This should then be suitable for input for CoupledNMF. Let us know. We haven't done this before.

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