Closed Dalhte closed 7 months ago
Hi David!
I'm sorry for the delayed response, I haven't been monitoring the issues on this website.
Seems like your issue is with the lines
main.chroms <- standardChromosomes(BSgenome.Hsapiens.UCSC.hg38) keep.peaks <- which(as.character(seqnames(granges(dat[["ATAC"]]))) %in% main.chroms) dat[["ATAC"]] <- subset(dat[["ATAC"]], features = rownames(dat[["ATAC"]][keep.peaks]))
It sounds like you might be using the rat genome? In that case I would make sure the "standardChromosomes" call the line before is consistent with your genome. It might be that you are filtering out all peaks prior to calling the subset line, and thus getting undefined selections. The keep.peaks are just indexes (row numbers) of which row has a main chromosome in it. Alternatively to using the standardChromosomes call, you can just list chromosomes you want to keep as long as they are consistent with your current Signac object (i.e. main.chroms<-c("chr1","chr2","chr3"...))
For the getMatrixSet function, I'd say the species is probably pretty important, but if you note and account for that limitation in your analysis I think its okay. You can use the general vertebrae motifs from JASPAR as well.
Thanks for the kind words and let me know how it works out! Ryan
Hi Ryan Thanks a lot for your answer. I finally get around my problem modifying the : keep.peaks <- which(as.character(seqnames(granges(dat[["ATAC"]]))) %in% main.chroms) by keep.peaks <- as.character(seqnames(granges(dat[["ATAC"]]))) %in% main.chroms
And it's working just fine now. Can say if I did something inteligent or deeply stupid but it's giving consistent results so far :)
I tried the "vertebrate" option as very few motif are described for Rats, and the results seem good enough too. Thanks again Best David
Hello I'm trying to analyze multiomic data (RNA + ATAC), heavily getting inspired by your code (thanks a lot to have made it public !!!!) I encounter a problem (most probably a silly one, but I'm quite a newby here): When I try to filter les ATAC peaks on standard chromosome using : dat[["ATAC"]] <- subset(dat[["ATAC"]], features = rownames(dat[["ATAC"]][keep.peaks])) (https://mulqueenr.github.io/10xmultiome_phase2/ section "run ChromVar on all data") I get an undefined columns selected for rownames function. I think I understand that, because dat[["ATAC"]] have rownames such as 1-12000-13000 but keepeaks are juste numbers from 1 to a lot, the rownames(dat[["ATAC"]][keep.peaks]) have no intersections ? But I really don't know how to correct that ! Can you help, please ?
(I have a second question : for the getmatrixset function, is the species option very important? I'm working on the Rat, but there is very few motifs described, I'd rather use human or mouse motifs, I don't think Rat trascription factors are that different but I can be wrong !)
Best David