zhanxw / seqminer

Query sequence data (VCF/BCF1/BCF2, Tabix, BGEN, PLINK) in R
http://zhanxw.github.io/seqminer/
Other
30 stars 12 forks source link

tabix.read.table crashes R #2

Closed zx8754 closed 9 years ago

zx8754 commented 9 years ago

Tabixed files are at: https://github.com/oncogenetics/LocusExplorer/tree/dev/Data/GeneticMap1KG

This works:

tabix.read("GeneticMap1KG.txt.gz","chr1:721290-729948")`
# [1] "chr1\t721290\t2.69\r" "chr1\t723819\t2.82\r" "chr1\t723891\t2.98\r" "chr1\t728242\t2.98\r" "chr1\t729948\t3.08\r"

This crashes R with following error message:

tabix.read.table("GeneticMap1KG.txt.gz","chr1:721290-729948")

# terminate called after throwing an instance of 'std::out_of_range'
#  what(): basic_string::substr
#
# And Rstudio crashes...

Session info:

sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252    LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] seqminer_4.5

loaded via a namespace (and not attached):
[1] tools_3.2.1
zhanxw commented 9 years ago

I will fix it.

zhanxw commented 9 years ago

The new github version should fix it. Meanwhile, this version will appear in CRAN in about a week.