GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
388 stars 140 forks source link

Vierstra motif annotation don't match the data on Vierstra website #1829

Closed NoemieL closed 1 year ago

NoemieL commented 1 year ago

Hi, I don't know if it's a bug but when I look at the up-regulated Vierstra archetype motif on one of my groups, the annotation doesn't match what I found at https://resources.altius.org/~jvierstra/projects/motif-clustering-v2.0beta/.

This is what I have done:

  ArchRProj = ArchR_proj, 
  useMatrix = "PeakMatrix",
  groupBy = "Prelevement",
  testMethod = "wilcoxon",
  bias = c("TSSEnrichment", "log10(nFrags)"),
  useGroups = "Pre",
  bgdGroups = "Post"
)

ArchR_proj <- addMotifAnnotations(ArchRProj = ArchR_proj, motifSet = "Vierstra", collection = "archetypel", annoName = "Vierstra")

motifsUp_Vierstra <- peakAnnoEnrichment(
  seMarker = markerTest_Pre_Post,
  ArchRProj = ArchR_proj,
  peakAnnotation = "Vierstra",
  cutOff = "FDR <= 0.01 & Log2FC >= 1"
)

df_up_Vierstra <- data.frame(TF = rownames(motifsUp_Vierstra), mlog10Padj = assay(motifsUp_Vierstra)[,1])
df_up_Vierstra <- df_up_Vierstra[order(df_up_Vierstra$mlog10Padj, decreasing = TRUE),]
df_up_Vierstra$rank <- seq_len(nrow(df_up_Vierstra))
df_up_Vierstra

TF mlog10Padj rank AC0576|PAX/CRX|Homeodomain 158.59745749 1 AC0456|ZNF/PRDM|C2H2_ZF 157.37865749 2 AC0457|ZNF/ZFP|C2H2_ZF 153.92475749 3 AC0227|SPI/BCL11A|Ets 128.76055749 4 AC0524|FOXC|['Fork_head/winged_helix_factors'] 119.01735749 5 AC0452|ZNF354A/ZNF|C2H2_ZF 99.91215749 6

For example, if I look at AC0576 on the website, it says it is a ZSCAN/ZNF motif while ArchR says a PAX/CRX motif. Have I misunderstood the results? Thanks

image

rcorces commented 1 year ago

Hi @NoemieL! Thanks for using ArchR! Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.
Before we help you, you must respond to the following questions unless your original post already contained this information: 1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved? 2. Can you recapitulate your error using the tutorial code and dataset? If so, provide a reproducible example. 3. Did you post your log file? If not, add it now. 4. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.

rcorces commented 1 year ago

Thats because ArchR uses the v2.1beta motifs. there was a bug in v2.0beta that Jeff Vierstra corrected in v2.1beta https://resources.altius.org/~jvierstra/projects/motif-clustering-v2.1beta/ https://github.com/GreenleafLab/ArchR/blob/f6c0388bd37023400794c9ae8562ad69e3ba9fd7/R/AnnotationPeaks.R#L283

rcorces commented 1 year ago

image

NoemieL commented 1 year ago

I see! Thanks!