zhengxwen / gdsfmt

R Interface to CoreArray Genomic Data Structure (GDS) Files (Development version only)
http://www.bioconductor.org/packages/gdsfmt
18 stars 4 forks source link

"Stream read error" occurs when storage="character" (variable-length string) #7

Closed zhengxwen closed 9 years ago

zhengxwen commented 9 years ago

gdsfmt_1.3.1 has a bug which was identified recently. It is fixed in gdsfmt_1.3.2, and please install the latest gdsfmt package immediately.

library(gdsfmt)

gfile <- createfn.gds("test.gds")
node <- add.gdsn(gfile, "data", as.character(1:1000))
read.gdsn(node, start=300, count=1)

closefn.gds(gfile)

showing:

Error in read.gdsn(node, start = 300, count = 1) : Stream read error

However, the following code works with gdsfmt_1.3.1:

library(gdsfmt)

gfile <- createfn.gds("test.gds")
node <- add.gdsn(gfile, "data", as.character(1:1000))
read.gdsn(node)
read.gdsn(node, start=300, count=1)

closefn.gds(gfile)