Unable to pass Gender file using --update-sex parameter with M and F coding

195 views
Skip to first unread message

Abhishek Shakya

unread,
Jul 21, 2023, 3:32:56 AM7/21/23
to plink2-users
Hi,

I am trying to convert a BGZIP file to binary fileset using following command:

plink2 --bcf test.vcf.gz --sort-vars --set-missing-var-ids @:#:\$r,\$a --new-id-max-allele-len 487 --update-sex /data/sample_sex_map.csv --make-pgen vzs --out output

However, I got an error:
Error: Line 2 of --update-sex file has fewer tokens than expected. 

Here is my sample_sex_map.csv file looks like
#IID,SEX
sample1,F
sample2,M


Question:

PS: I am attaching the log file with dummified paths.
log.log

Abhishek Shakya

unread,
Jul 21, 2023, 9:58:49 AM7/21/23
to plink2-users
Diagnosis:
  • I was using csv file(comma separated).
  • Plink2.0 doesn't support comma separated files for --psam and --update-sex flag

Solution:
  • Use space or tab separated files for updating sex.


Reply all
Reply to author
Forward
0 new messages