r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
300 stars 125 forks source link

HOMER and chromVAR #59

Open cschmidl opened 5 years ago

cschmidl commented 5 years ago

Dear Rongxin, thank you for the great tool and very helpful tutorial! I have 2 questions regarding motifs: 1) HOMER does not work for me, I have HOMER v4.10 - is it compatible with this version? 2) You mention under news that there is a chromVAR implementation, but I can not find it when following the link Thanks for your help!

r3fang commented 5 years ago

Hi There,

Thank you for your interest! I am working on this features now, will update the package in one or two weeks. Is it too late?

-- Rongxin Fang, Ren Lab Ludwig Cancer Research Bioinformatics Ph.D. Student University of California, San Diego

On Jul 18, 2019, at 11:48 AM, cschmidl notifications@github.com wrote:

Dear Rongxin, thank you for the great tool and very helpful tutorial! I have 2 questions regarding motifs:

HOMER does not work for me, I have HOMER v4.10 - is it compatible with this version? You mention under news that there is a chromVAR implementation, but I can not find it when following the link Thanks for your help! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/r3fang/SnapATAC/issues/59?email_source=notifications&email_token=ABT6GG5NZNDK2WHGIJAJUODQAC3I5A5CNFSM4IE6TNT2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HACS72A, or mute the thread https://github.com/notifications/unsubscribe-auth/ABT6GG5UL2MS7PURVCJMYJTQAC3I5ANCNFSM4IE6TNTQ.

cschmidl commented 5 years ago

Hi Ronxin, I'm dying to try it on my data :) No, sure, I'll wait patiently! Thanks for the fast reply, Christian

r3fang commented 5 years ago

Haha got it. I will speed on. Also, I will also update many other features in the pipeline, keep tuned on the GitHub page

-- Rongxin Fang, Ren Lab Ludwig Cancer Research Bioinformatics Ph.D. Student University of California, San Diego

On Jul 18, 2019, at 11:52 AM, cschmidl notifications@github.com wrote:

Hi Ronxin, I'm dying to try it on my data :) No, sure, I'll wait patiently! Thanks for the fast reply, Christian

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/r3fang/SnapATAC/issues/59?email_source=notifications&email_token=ABT6GG3BL4PLC5PWXEQCMQDQAC3V5A5CNFSM4IE6TNT2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2JOAPI#issuecomment-512942141, or mute the thread https://github.com/notifications/unsubscribe-auth/ABT6GGYTBKPP2OWV5VTYBN3QAC3V5ANCNFSM4IE6TNTQ.

r3fang commented 5 years ago

just a temp solution:

x.sp = addPmatToSnap(x.sp);
x.sp = makeBinary(x.sp, mat="pmat");
library(chromVAR);
library(BSgenome.Mmusculus.UCSC.mm10);
library(motifmatchr);
library(SummarizedExperiment);
peaks.gr = x.sp@peak;
mat = x.sp@pmat;
idy = which(Matrix::colSums(mat) > 10);
rse <- SummarizedExperiment(assays = list(counts = t(mat[,idy])), rowRanges = peaks.gr[idy], colData = DataFrame(Cell_Type=1:nrow(mat), depth=Matrix::rowSums(mat)));
rse <- addGCBias(rse, genome = BSgenome.Mmusculus.UCSC.mm10);
motifs <- getJasparMotifs(collection = "CORE");
motif_mm <- matchMotifs(motifs, rse, genome = BSgenome.Mmusculus.UCSC.mm10);
dev <- computeDeviations(object = rse, annotations = motif_mm);
dev_mat = t(assay(dev));