zhengxwen / SNPRelate

R package: parallel computing toolset for relatedness and principal component analysis of SNP data (Development version only)
http://www.bioconductor.org/packages/SNPRelate
101 stars 25 forks source link

error with snpgdsGEN2GDS #58

Closed gianolga closed 5 years ago

gianolga commented 5 years ago

Hello,

I'm trying to convert the UK Biobank provided bgen files to gds format using the snpgdsGEN2GDS (SNPRelate in R (version "3.6") ).

snpgdsGEN2GDS("xxx.bgen","xxx.sample","xxx.out", chr.code=22, call.threshold=0.9, version=c("<=1.1.5"),snpfirstdim=FALSE, compress.annotation="ZIP_RA.max", compress.geno="",verbose=TRUE)

However I'm getting an error: Error in snpgdsGEN2GDS("xxxx.bgen", : fewer columns than what expected. FILE: xxxx.bgen LINE: 1, COLUMN: 2, ?,? In addition: There were 50 or more warnings (use warnings() to see the first 50)

I have worked with the specific bgen files in SNPTEST and I didn't have any problem.

Do you have any idea what is going wrong?

Many thanks, Olga

zhengxwen commented 5 years ago

snpgdsGEN2GDS() works with old version of GEN files, not new bgen files. Please use https://github.com/zhengxwen/gds2bgen instead.

gianolga commented 5 years ago

Many thanks!