Simon-Coetzee / motifBreakR

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

logical subscript contains NAs #34

Closed Addamoo closed 2 years ago

Addamoo commented 3 years ago

Your package is great. It perfectly fits to my data, when I publish my results I'll cite your work, however... First I decided to go through the tutorial:

library(motifbreakR)
library(SNPlocs.Hsapiens.dbSNP142.GRCh37)
library(BSgenome.Hsapiens.UCSC.hg19)

snps.bed.file <- system.file("extdata", "snps.bed", package = "motifbreakR")

snps.mb.frombed <- snps.from.file(file = snps.bed.file,
                                  dbSNP = SNPlocs.Hsapiens.dbSNP142.GRCh37,
                                  search.genome = BSgenome.Hsapiens.UCSC.hg19,
                                  format = "bed")
ERROR: logical subscript contains NAs
Warning:
W poleceniu 'snps.from.file(file = snps.bed.file, dbSNP = SNPlocs.Hsapiens.dbSNP142.GRCh37, ':
  User selected reference allele differs from the sequence in BSgenome.Hsapiens.UCSC.hg19 continuing with genome specified reference allels
 there are NA differences

Cousd you give me a hint, what is wrong?

Simon-Coetzee commented 3 years ago

There was a bug related to having rsids and variants in the form of chr:pos:ref:alt in the same file. It's been fixed here on github, give it a try and see if that fixes things.

Addamoo commented 2 years ago

Works great! Thank you!