Skip to content

Error when using a custom motif annotation in addMotifAnnotations() #1932

Discussion options

You must be logged in to vote

I thought I have solved this problem.
I found that the names of tair.motif is NULL, and it will got the NA results.
So, if I add the names to tair.motif using names(tair.motif)=ID(tair.motif), then it worked.

The complete code is

library(TFBSTools)
library(chromVAR)
library(motifmatchr)
motif=read_meme("~/TF-motif/meme/Ath_TF_binding_motifs.meme")
motif_all=convert_motifs(motif,class="TFBSTools-PWMatrix")
tair.motif=do.call(PWMatrixList,motif_all)
names(tair.motif)=ID(tair.motif)
projSpike2=addMotifAnnotations(projSpike2,name="Motif",motifPWMs=tair.motif)

And you can also download the motifSet from JASPAR using TFBSTools

library(TFBSTools)
library(JASPAR2020)
tair.motif=getMatrixSet(x=JA…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by xmliu01
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants