Simon-Coetzee / motifBreakR

A Package For Predicting The Disruptiveness Of Single Nucleotide Polymorphisms On Transcription Factor Binding Sites.
28 stars 12 forks source link

motifbreakR error #23

Open BenxiaHu opened 4 years ago

BenxiaHu commented 4 years ago

hello, when I ran the following code, I got this error: Error in textConnection("sout", "w", local = TRUE) : all connections are in use Calls: Motif ... tryCatchList -> tryCatchOne -> doTryCatch -> textConnection In addition: Warning messages: 1: In rowids2rowidx(user_rowids, ids, x_rowids, ifnotfound) : SNP ids not found: rs147399600, rs142752345, rs142223133, rs146022920, rs138372249, rs77799504, rs139303724, rs117506436, rs114723795, ...

They were dropped. 2: In if (seqlevelsStyle(granges.object) != seqlevelsStyle(search.genome)) { : the condition has length > 1 and only the first element will be used

snps.mb <- snps.from.rsid(rsid = SNPlist,dbSNP = SNPlocs.Hsapiens.dbSNP144.GRCh37,search.genome = BSgenome.Hsapiens.UCSC.hg19)

load human MotifDb

`testMotifDb <- MotifDb[which(mcols(MotifDb)$organism=="Hsapiens")]`
## remove stamlab Motifs, because they are not annotated 

testMotifDb <- testMotifDb[which(mcols(testMotifDb)$dataSource!="stamlab")] results <- motifbreakR(snpList = snps.mb, filterp = TRUE,pwmList = testMotifDb,threshold = 1e-4,method = "ic",bkg = c(A=0.25, C=0.25, G=0.25, T=0.25),BPPARAM = BiocParallel::bpparam())

BTW, SNPlist contains about 20,000 variants. Do you know how to deal with this issue? Best,

dennishazelett commented 4 years ago

How to read these error messages: 1) the SNPs are not in the SNPlocs package you specified. You have the option of either finding another (genome compatible) package that has them or you can create a custom list in .bed format as shown in the tutorials. 2) This is a common message you will get when SNPs have more than 2 possible values. Motifbreakr will take the first two variants, but that may not be the desired behavior. Again, you can generate a custom list (in .bed format) as a workaround. Let us know if this helps

dennishazelett commented 4 years ago

Also, note that older versions of MotifBreakR will filter indels. If you want indels included in your analysis, make sure you're using the latest version of MotifBreakR