ge11232002 / TFBSTools

Software Package for Transcription Factor Binding Site (TFBS) Analysis
25 stars 10 forks source link

toPWM() error #9

Closed NicolaLady closed 8 years ago

NicolaLady commented 8 years ago

Hi,

I keep getting an error when using the toPWM() in TFBSTools. I was successful in converting a PFM to PWM for the transcription factor NFIA but when i try to do the same for E2F7 i get the following error,

PWM_E2F7 <- toPWM(PFMatrixList_E2F7,pseudocounts=0.8)
Error in apply(m, 1:2, as.integer) : dim(X) must have a positive length

This is my sessionInfo..

sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] en_IE.UTF-8/en_IE.UTF-8/en_IE.UTF-8/C/en_IE.UTF-8/en_IE.UTF-8

attached base packages:
 [1] grid      stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] BSgenome.Hsapiens.UCSC.hg19_1.4.0 BSgenome_1.40.1                   PWMEnrich_4.8.2                  
 [4] MotifDb_1.14.0                    JASPAR2016_1.0.0                  JASPAR2014_1.8.0                 
 [7] Biostrings_2.40.2                 XVector_0.12.1                    TFBSTools_1.10.3                 
[10] BiocInstaller_1.22.3              rtracklayer_1.32.2                GenomicRanges_1.24.2             
[13] GenomeInfoDb_1.8.3                IRanges_2.6.1                     S4Vectors_0.10.2                 
[16] BiocGenerics_0.18.0               biomaRt_2.28.0    

Any help would be much appreciated!

Thanks

Nicola

ge11232002 commented 8 years ago

Hi, could you give the code so I can reproduce the error? Thanks.

NicolaLady commented 8 years ago
library(TFBSTools)
library(JASPAR2014)
library(JASPAR2016)

# search the JASPAR2014 and JASPAR 2016 database for the E2F7 matrix

opts <- list()
opts[["species"]] <- 9606
opts[["name"]] <- "E2F7"
opts[["all_versions"]] <- TRUE

PFMatrixList_E2F7 <- getMatrixSet(JASPAR2016,opts)

PFMatrixList_E2F7[['MA0758.1']]

PWM_E2F7 <- toPWM(PFMatrixList_E2F7,pseudocounts=0.8)
ge11232002 commented 8 years ago

This code works perfectly fine on my computer. My guess is some function is interfered by other loaded packages (MotifDb? or some other I don't know) loaded in. Could you try open a clean R session and only run the code you gave me?

NicolaLady commented 8 years ago

Its working now on a clean R session - i tested it with before and after loading MotifDb and there was no issue so its another package possibly causing the issue- thanks for you help :)