This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Exporting files from Plink with sample IDs?

Hello. I have various .bed and .tped files (+ corresponding .fam/.tfam files) that I am exporting in vcf format from plink as follows:

./plink --tfile examplesnps --chr-set 39 --out exported_vcf  --recode vcf

However, I don't know how to get an output that has the sample IDs attached to the genotype data. Does anyone know how to include the actual sample names (i.e., the individual IDs) in the outputs from plink?

Thanks in advance!

plink snp

Since you are using --tfile flag, then you must have examplesnps.tped and examplesnps.tfam (which has the same format as .fam file). That tfam file would have the sample IDs.

Thanks. Yes, I have the corresponding .tfam file, which I assume plink calls in during the process, but in the vcf output it doesn't show the sample names. Just the loci.

1 answer

Have you tried --recode vcf-iid?

Ok, so I subsequently saw that when I use --recode vcf-iid, plink outputs another file with the extension .irem, which contains the sample IDs. Thank you for the suggestion!

Log in to answer this question.