VCF file to BED format: Variant names are limited to 16000 characters

105 views
Skip to first unread message

Vishal Singh Negi

unread,
Jul 12, 2023, 11:11:58 AM7/12/23
to plink2-users
Hello everyone,
I am trying to convert a variant VCF file to BED format using the following command:

vcfb_file="/scratch/vn81649/snapbean/snapbean/new_biallelic/vcfb_f_an_ba.vcf.gz"
output_dir_vcfb="/scratch/vn81649/snapbean/snapbean/new_plink/output_vcfb"
plink2 --bcf $vcfb_file --make-bed --out $output_dir_vcfb/vcfb_plink


This command worked well for another variant file, but I am getting the following error when I run it for this variant file:

Error: Variant names are limited to 16000 characters.

I am not sure how to fix this issue. Can anyone help me?

Below is the log:
PLINK v2.00a3LM 64-bit Intel (20 Sep 2021)     www.cog-genomics.org/plink/2.0/
(C) 2005-2021 Shaun Purcell, Christopher Chang   GNU General Public License v3
Logging to /scratch/vn81649/snapbean/snapbean/new_plink/output_vcfb/vcfb_plink.log.
Options in effect:
  --bcf /scratch/vn81649/snapbean/snapbean/new_biallelic/vcfb_f_an_ba.vcf.gz
  --make-bed
  --out /scratch/vn81649/snapbean/snapbean/new_plink/output_vcfb/vcfb_plink

Start time: Wed Jul 12 10:24:06 2023
257634 MiB RAM detected; reserving 128817 MiB for main workspace.
Using up to 64 threads (change this with --threads).
--bcf: 52080912 variants scanned.
--bcf: 52034k variants converted.
/scratch/vn81649/snapbean/snapbean/new_plink/output_vcfb/vcfb_plink-temporary.pgen
+
/scratch/vn81649/snapbean/snapbean/new_plink/output_vcfb/vcfb_plink-temporary.pvar.zst
+
/scratch/vn81649/snapbean/snapbean/new_plink/output_vcfb/vcfb_plink-temporary.psam
written.
401 samples (0 females, 0 males, 401 ambiguous; 401 founders) loaded from
/scratch/vn81649/snapbean/snapbean/new_plink/output_vcfb/vcfb_plink-temporary.psam.
End time: Wed Jul 12 10:33:11 2023

Christopher Chang

unread,
Jul 12, 2023, 12:07:55 PM7/12/23
to plink2-users
Unfortunately, this cannot be fixed with plink.  You have to decide on a different way of assigning variant IDs in the VCF file so that you don't get these extremely long IDs.

Juan Sainz

unread,
Feb 13, 2024, 12:19:37 PM2/13/24
to plink2-users
Did you solve this issue. I am experiencing the same problem. 
Any help would be fantastic
Best regards, 
Juan

Reply all
Reply to author
Forward
0 new messages