Hi, Elliott Ferris here from the Neurobiology Department at the University of Utah. I am working to make a custom background for a motif enrichment analysis with PWMenrich. I've rum into a problem with makeBackground(). Here is a simplified example of the code I am running:
library("PWMenrich")
library("MotifDb.Hsap.PFM")
library(BSgenome.Hsapiens.UCSC.hg19)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
gn <- sort(genes(txdb))
up1000 <- flank(gn, width=1000)
genome <- BSgenome.Hsapiens.UCSC.hg19
up1000seqs <- getSeq(genome, up1000)
background <- makeBackground(MotifDb.Hsap.PFM, organism = Hsapiens, bg.seq = up1000seqs, type="logn", bg.len = 1000)
I get the following error:
Error in (acgt.count/sum(acgt.count)) * bg.pseudo.count : non-numeric argument to binary operator
I see this error on the computer cluster I am running on but not my desktop. Let me know if you have ideas as to how to troubleshoot this.
Thanks!
Elliott