This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How do I read BGEN format genotype data using BOLT-LMM?

Hi everyone,

I failed to read BGEN format imputed SNPs data ( ukb_imp_chr**_v3.bgen ) into BOLT-LMM software using csh.

According to the instruction, we can specify a list of whitespace-separated .bgen / .sample file pairs using the --bgenSampleFileList option. I used this option to load in genotype data and matched sample file, after submitting the job, an error info returned - Use exactly one of the --bfile, --bfilegz, or --fam, bim, bed input formats.

I tried --bfile option, but it gave me a new error - Unable to open file: /path/ukb_imp_chr**_v3.bgen.fam.

Could you please enlighten me how do I fix this problem? Really appreciate for any help.

bolt-lmm ukbiobank bgen format

Hi

I know it's probably late for this comment, but since it may be of use for someone else:

To be able to use bgenSampleFileList flag, you need to write pair of whitespace separated bgen and sample files to a text file, and you introduce it to BOLT-LMM as --bgenSampleFileList=bgenList.txt. An example of such a file may look like as below:

path/to/bgenfiles/imputed.chr1.bgen path/to/bgenfiles/imputed.chr1.sample path/to/bgenfiles/imputed.chr2.bgen path/to/bgenfiles/imputed.chr2.sample

Hope it may help!

Hello I tried running with this code but I get an error message.

BOLT-LMM_v2.3.5/bolt \
    --bgenFile=Project/chr1.bgen \
    --sampleFile=Project/chr1.sample \
    --remove = sample_remve_ids \
    --phenoFile=NPH \
    --phenoCol=PHENO \
    --covarFile=ukb_covar.csv \
    --lmm \
    --numThreads=2

But get an error msg

ERROR: Use exactly one of the --bfile, --bfilegz, or --fam,bim,bed input formats (even when analyzing imputed data, a plink file is needed for model- fitting using a subset of SNPs, typically those directly genotyped) Aborting due to error processing command-line arguments

Please help.

this is how it is described in the BOLT-LMM mannual bolt \ --bed=yourbedfile.bed \ --bim=yourbimfile.bim \ --fam=yourfamfile.fam \ --bgenFile=Project/chr1.bgen \ --sampleFile=Project/chr1.sample \ --bgenMinINFO=0.3 \ --remove = sample_remve_ids \ --phenoFile=NPH \ --phenoCol=PHENO \ --covarFile=ukb_covar.csv \ --numThreads=7 \ --lmm \ --LDscoresFile=./LDSCORE.1000G_EUR.tab.gz \ --geneticMapFile=./genetic_map_hg19_withX.txt.gz \ --statsFile=t1dgc_imputed_bolt.lmm.tab \ --statsFileBgenSnps=t1dgc_assoc_bolt-lmm.tab \ 2>&1 | tee t1dgc_imputed_bolt-lmm.log

also add path to your bolt exec to the bash

0 answers

No answers yet.

Log in to answer this question.