motifBreakR icon indicating copy to clipboard operation
motifBreakR copied to clipboard

<remote-error in ppm[snp.seq, ]: subscript out of bounds>

Open ooiwf opened this issue 9 years ago • 3 comments

Hi, I ran motifbreakR with the following codes: snv = snps.from.file(file = 'snv.bed', search.genome= BSgenome.Hsapiens.UCSC.hg19, format = 'bed') result = motifbreakR( snpList = snv, filterp = T, pwmList = hocomoco, threshold = 1e-4, method = 'ic', bkg = c(A=0.25, C=0.25, G = 0.25, T= 0.25), BPPARAM = BiocParallel::bpparam()) when I enter the variable name 'result' in the R console, I found this: <remote-error in ppm[snp.seq, ]: subscript out of bounds>

The .bed file contains the following data: chr20 29653903 29653904 chr20:29653904:A:C 0 +

ooiwf avatar Feb 17 '16 09:02 ooiwf

Okay so I think I figured out what was going wrong with that SNP, it's right on the edge of a region in the reference genome full of NNNNN, which I couldn't look up in the PWMs (as they don't contain N), but I think I resolved this by having the PWMs include N as a letter with a score of 0. I will push to Bioconductor when I've had more chance to test, but the version here has been updated.

Let me know if it works for you, and I'll close this issue.

Simon-Coetzee avatar Feb 18 '16 03:02 Simon-Coetzee

Hi Simon, I reinstalled the library from github and rerun using the same data. The execution seems to be in debug mode, where Browse[2]> appears while running result = motifbreakR( snpList = snv, filterp = T, pwmList = hocomoco, threshold = 1e-4, method = 'ic', bkg = c(A=0.25, C=0.25, G = 0.25, T= 0.25), BPPARAM = BiocParallel::bpparam()) To complete the execution, i need to press 'ENTER' multiple times.

In addition to this, I also encounter other error when more data are used. Error in validObject(.Object) : invalid class âMotifListâobject: all matrices must have 4 rows

ooiwf avatar Feb 18 '16 06:02 ooiwf

Okay, I think i resolved that, the motifList object wasn't validating at the end b/c it now had 5 rows (including the Ns), so I have that clean up before exit. - also removed the browser()'s

Simon-Coetzee avatar Feb 18 '16 17:02 Simon-Coetzee