CostaLab / scMEGA

scMEGA: Single-cell Multiomic Enhancer-based Gene regulAtory network inference
https://costalab.github.io/scMEGA
Other
32 stars 2 forks source link

Motif matching when using mouse data #18

Open AmandaKedaigle opened 1 year ago

AmandaKedaigle commented 1 year ago

Hi! I was running into an issue when selecting TFs in my mouse data, because the motif names did not match many genes in the gene exp data. I ended up altering the SelectTFs and GetTFGeneCorrelation code to

rownames(trajMM) <- stringr::str_to_title(object@assays[[atac.assay]]@motifs@motif.names)

(although maybe a biomaRt matching or something would be more accurate) and am getting better results, so I thought I'd note it!

lzj1769 commented 1 year ago

Hi @AmandaKedaigle

Thanks for reporting this point. Indeed, we only tested the function using human data, where the gene names are all capitalized.

Using biomatRt is absolutely better and I will add it to our TODO.

Thanks, Zhijian

Dalhte commented 11 months ago

Hi! I was running into an issue when selecting TFs in my mouse data, because the motif names did not match many genes in the gene exp data. I ended up altering the SelectTFs and GetTFGeneCorrelation code to

rownames(trajMM) <- stringr::str_to_title(object@assays[[atac.assay]]@motifs@motif.names)

(although maybe a biomaRt matching or something would be more accurate) and am getting better results, so I thought I'd note it!

Dear @AmandaKedaigle

I'm trying to make scMega works and I encounter the same problem as you did: the matrix names are not recognized. I would like to do the same modification you did (modifying the rownames(trajMM) code but I'm truly lost about how to do it, I can't find the file containing the selectTFs function in my ScMega R libs. Can you help me ?

Best regards

David

AmandaKedaigle commented 11 months ago

Hi David! If you're using RStudio you can write View(function_name) to see code for a function in a loaded package (or View(package_name::function_name). I believe that outside of RStudio you can still see the code with just the function name, no parentheses. I just copied the code for those functions into a new script, altered that line, and then loaded my new functions overtop of the package ones. Hope this helps!

Dalhte commented 11 months ago

Hi Amanda Thanks a lot ! It's working :) Just to know, did you had incompatibility problems between ScMEGA and seurat V5 (if you use seurat that is ?) I have this error poping up : Error in GetAssayData(): ! No layers are found Best and thanks again :) David

AmandaKedaigle commented 11 months ago

I was using Seurat, but was still on v4 - didn't run into that one!

Dalhte commented 11 months ago

the V5 is a bit annoying with lots of incompatibility ! Thanks a lot for your help ! Best David