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
98 stars 25 forks source link

fix bug in snpgdsBED2GDS if family=TRUE #9

Closed smgogarten closed 9 years ago

smgogarten commented 9 years ago

The latest update to SNPRelate introduced a bug in snpgdsBED2GDS: the sample annotation was not getting added if "family=TRUE". I added a sync.gds command that fixes it. I also added the family ID to the annotation that gets stored.

smgogarten commented 9 years ago

This seems to be not quite fixed - Windows build on Bioconductor is failing for both SNPRelate and GWASTools, for the same reason. I think you have to close the gds file before running cleanup.gds? But I'm not sure how to make this play nicely with the on.exit(closefn.gds()) command.

zhengxwen commented 9 years ago

It is fixed now:

    # close the file
    on.exit()
    closefn.gds(gfile)

before cleanup.gds.