export file format in vcf.gz

785 views
Skip to first unread message

Mere H

unread,
Sep 22, 2022, 3:48:39 PM9/22/22
to plink2-users
Hi PLINK community,
I am wondering if PLINK can export the file in vcf.gz format? I know the following code can export vcf, and then I can use bgzip to zip the vcf, but is there a way to get vcf.gz directly as the output so that we can avoid letting the vcf take much storage space in the first place?

--export vcf 'vcf-dosage=HDS-force' --out filename

I have also noticed that vcf.gz can be imported by using --vcf, just in the same way as importing vcf. If vcf.gz is an acceptable import format, I guess there must be a way to export this format as well, right?

Thank you!

Mey

Christopher Chang

unread,
Sep 23, 2022, 11:41:19 AM9/23/22
to plink2-users
You're looking for "--export vcf bgz ..."

Mere H

unread,
Sep 27, 2022, 12:04:04 AM9/27/22
to plink2-users
Thanks, Dr. Chang! That works well and serves my purpose. 
Here is the code I used with success:
--export vcf 'bgz' 'vcf-dosage=HDS-force' --out filename

Mey
Reply all
Reply to author
Forward
0 new messages