No --bgen REF/ALT mode specified

29 views
Skip to first unread message

mehrnoosh shokouhi

unread,
Oct 30, 2023, 9:19:09 AM10/30/23
to plink2-users
I am using plink2 and write my codes in R script: 

runPLINK <- function(PLINKoptions = "") system(paste("/opt/apps/plink/2.0/bin/plink2", PLINKoptions))
runPLINK()
runPLINK("--bgen /DATA/shared/bcac/genotypes/v10/bgen/icogs_euro/iCOGS_european_chr21.bgen --out /DATA/users/m.shokouhi/plink/plink2")

The mentioned code makes PGEN/PVAR/PSAM files but there is a warning in the procedure: No --bgen REF/ALT mode specified. In plink2 website it is written that it considers the first allele as a reference allele if you do not specify it (which is my case). 

Now, I realized that the ref and alt alleles in my PVAR file is swapped compared to the original bgen file! I tried to use --bgen-ref-first flag for this issue but it doesn't work in plink2, although it is offered on the website!

I would appreciate it if you guided me!

BW,
Mehrnoosh 

Christopher Chang

unread,
Oct 30, 2023, 11:41:50 PM10/30/23
to plink2-users
The website does not "offer a --bgen-ref-first flag".

There is a --bgen flag, with the following summary:
"--bgen <filename> <REF/ALT mode> ['snpid-chr']"

https://www.cog-genomics.org/plink/2.0/general_usage#flag_usage describes how to interpret the flag summaries.  The first bullet point says:
"<angle brackets> denote a required parameter, where the text between the brackets describes its nature."
Reply all
Reply to author
Forward
0 new messages