motifBreakR icon indicating copy to clipboard operation
motifBreakR copied to clipboard

snps.from.file error to load bed file.

Open lwtan90 opened this issue 6 years ago • 3 comments

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 in rownames<-(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 in rownames<-(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

lwtan90 avatar Nov 13 '18 05:11 lwtan90

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 avatar Nov 13 '18 07:11 wlwtan

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?

wlwtan avatar Nov 13 '18 07:11 wlwtan

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?

Simon-Coetzee avatar Nov 16 '18 19:11 Simon-Coetzee