jianyangqt / gcta

GCTA software
GNU General Public License v3.0
73 stars 23 forks source link

Issue reading bgen index file #69

Closed chenpunk closed 6 months ago

chenpunk commented 6 months ago

Hello, I'm trying to generate a GRM using GCTA on UKB RAP JupyterLab and have encountered problems reading bgen index file:

Options:

--mbgen ./chr.txt --sample /path1/'path2'/ukb22828_c1_b0_v3.sample --remove ./outlier.txt --keep ./keep.txt --extract ./snp.txt --make-grm-part 100 100 --out ukb

Note: GRM is computed using the SNPs on the autosomes. Reading Oxford sample information file from [/path1/'path2'/ukb22828_c1_b0_v3.sample]... 487409 individuals to be included from the sample file. Get 472004 samples from list [./keep.txt]. After keeping individuals, 458564 subjects remain. Get 1620 samples from list [./outlier.txt]. After removing individuals, 457946 subjects remain. 457946 individuals to be included. 209307 males, 248639 females, 0 unknown. Loading bgen index from [/path1/'path2.bgen.bgi]... Error: can't open the index file: unable to open database file Index the bgen file by 'bgenix -g test.bgen -index'. An error occurs, please check the options or data

And my chr.txt reads like:

/path1/'path2'/ukb22828_c1_b0_v3 ... /path1/'path2'/ukb22828_c22_b0_v3

The folder /path1/'path2'/ have all bgen and bgen.bgi files. The software cannot specify the correct path and the name of index files automatically. It seems that this has something wrong with quote maker in path2. And I'm not sure how to specify it manually. I hope you can give us some advice.

chenpunk commented 6 months ago

Alright, I copied imputed files to a separated folder whose name does not contain space, and the command works fine. I think the problem is caused by quotation marker of the path when inputing bgen files.