GreenleafLab / ArchR

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

addMotifAnnotations() requires taxid for JASPAR motifSet #1513

Closed hukai916 closed 2 years ago

hukai916 commented 2 years ago

I think JASPAR dbs only accept taxid instead of latin name when comes to species. I tested with the species "arabidopsis thaliana", basically, the following command WILL NOT work:

> proj <- addMotifAnnotations(ArchRProj = proj, name = "Motif", species = "arabidopsis thaliana", motifSet = "JASPAR2020", force = TRUE)
ArchR logging to : ArchRLogs/ArchR-addMotifAnnotations-172d6f280bb9a9-Date-2022-07-16_Time-00-32-54.log
If there is an issue, please report to github with logFile!
peakAnnotation name already exists! Overriding.
2022-07-16 00:32:54 : Gettting Motif Set, Species : arabidopsis thaliana, 0.004 mins elapsed.
2022-07-16 00:32:54 : Finding Motif Positions with motifmatchr!, 0.006 mins elapsed.
Error in (function (cond)  :
  error in evaluating the argument 'x' in selecting a method for function 'ncol': subscript out of bounds
In addition: Warning message:
In .get_IDlist_by_query(x, opts) :
  Warning: Zero matrices returned with current critera

But the following works:

proj <- addMotifAnnotations(ArchRProj = proj, name = "Motif", species = "3702", motifSet = "JASPAR2020", force = TRUE)
ArchR logging to : ArchRLogs/ArchR-addMotifAnnotations-172d6f59fa282a-Date-2022-07-16_Time-00-28-01.log
If there is an issue, please report to github with logFile!
peakAnnotation name already exists! Overriding.
2022-07-16 00:28:01 : Gettting Motif Set, Species : 3702, 0.004 mins elapsed.
2022-07-16 00:28:16 : Finding Motif Positions with motifmatchr!, 0.252 mins elapsed.
2022-07-16 00:28:58 : Creating Motif Overlap Matrix, 0.947 mins elapsed.
2022-07-16 00:28:58 : Finished Getting Motif Info!, 0.954 mins elapsed.

This is with v1.0.1.

rcorces commented 2 years ago

Hi @hukai916! 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 2 years ago

I have updated the documentation to be more explicit. https://github.com/GreenleafLab/ArchR/commit/075ab6b9ce584761addb532096ffcfab7cbd346d

xmliu01 commented 1 year ago

I got the same error when I changed the species into 3702, do you know how to solve that?

hukai916 commented 1 year ago

Which version of ArchR are you using? Does "arabidopsis thaliana" work?

xmliu01 commented 1 year ago

I followed the methods provided in #1831 and solved the problem, thanks.