Exporting files from Plink with sample IDs?
1
1
Entering edit mode
9 months ago
bntjoanne ▴ 10

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?

plink SNP • 273 views
0
Entering edit mode

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.

0
Entering edit mode

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.

2
Entering edit mode
9 months ago

Have you tried --recode vcf-iid?

0
Entering edit mode

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!