Simon-Coetzee / motifBreakR

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

snps.from.file error to load bed file. #12

Closed lwtan90 closed 3 months ago

lwtan90 commented 5 years ago

I ran into this wierd error from snps.from.file function:

snps.mb.frombed = snps.from.file(file="snps.bed",search.genome=BSgenome.Hsapiens.UCSC.hg19, format="bed") Error inrownames<-(tmp, value = c("chr1", "chr2", "chr5", "chr12", : invalid rownames length

I have updated my package to the latest version, and the same error happened even with the toy example.

snps.mb = snps.from.file(snps.bed.file,search.genome=BSgenome.Drerio.UCSC.danRer7,format="bed") Error inrownames<-(tmp, value = c("chr18", "chr5", "chr14", "chr3", : invalid rownames length

Can you kindly help to sort it out? It works previously because you editted the VCF reading function.

Wil

wlwtan commented 5 years ago

I found out the reason, but I have yet to solved it. It is due to the split function in the extractFromBSgenomeSingleSequences function, needed in getSeq function. Strangely, the split function is unable to split GenomicRanges! And, the error message above is from this split function. Any thoughts?

wlwtan commented 5 years ago

Split function is from base package! Or unless the function is overridden by other packages / your script. I am using R version 3.5.0. Could be the reason?

Simon-Coetzee commented 5 years ago

May I please have a sample of a few lines from a bed file you're interested in using? And I'd like to confirm that you're using hg19?