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