Error: --export-allele variant ID 'rs0000000' appears multiple times in dataset

730 views
Skip to first unread message

Pooja Middha Kapoor

unread,
Jun 4, 2021, 6:52:27 PM6/4/21
to plink2-users
Hi, 
I am using plink2 (code below) to extract some SNPs and since I need specific allele dosage I am using --export-allele option but there are some SNP ids which are multiple (multi-alleleic). I have the required allele in the file which I provide with --export-allele option but still i get the following error "Error: --export-allele variant ID 'rs00000000' appears multiple times in dataset". How can I force plink to look at the allele and chose that variant.

plink2 \
  --pfile $inpath/chr${SLURM_ARRAY_TASK_ID}.03292018 \
  --extract range $datpath/chr_pos_extraction.txt \
  --export A-transpose \
  --export-allele $datpath/snp_allele_extraction.txt \
  --memory 16000 \
  --threads 5 \
  --freq cols=+pos,+reffreq \
  --out $outpath/chr${SLURM_ARRAY_TASK_ID}

Thanks, 
Pooja 

Christopher Chang

unread,
Jun 4, 2021, 7:05:36 PM6/4/21
to plink2-users
The simplest solution is to use --set-all-var-ids to assign your variants unique IDs that include allele codes.

Pooja Middha Kapoor

unread,
Jun 4, 2021, 7:51:18 PM6/4/21
to plink2-users
Hi Christopher, 
Thank you for your reply. If I use the argument @:#[b37]\$r , I encounter another problem: 

Error: 1687 allele codes too long for --set-all-var-ids.

I can set this by --new-id-max-allele-len but should the variant id in the --export-allele be the same as the one I give the argument for in --set-all-var-ids?

Best, 

Pooja. 


Christopher Chang

unread,
Jun 4, 2021, 7:53:12 PM6/4/21
to plink2-users
Yes, you will need to use a short script to modify the --export-allele file to contain the new IDs.
Reply all
Reply to author
Forward
0 new messages