I have two vcf files, one containing samples with TP53 mutations, and one containing samples with no TP53 mutations. The vcf without the mutations is the control and the vcf with the mutations is the case. How can I combine these two files into something that can be processed by the --assoc function in plink 1.9.0? Do I need to make them into one vcf? Or is it not necessary, and I can just use --assoc on each file after converting each individually?


1 Answer 1


Both Plink 1.9 [uses --assoc] and Plink 2 [uses --glm] can process VCF files directly; no conversion needed.

I think that Plink will combine multiple files specified on the command line into one file, but if this is not the case then bcftools can be used to merge them.

As described in those input specifications, you can provide Plink with a .fam file (via --fam) to add in phenotype data.

Information about the .fam formats can be found here. It's a 6-column headerless space-separated format containing the following fields:

  1. Family ID ('FID')
  2. Within-family ID ('IID'; cannot be '0')
  3. Within-family ID of father ('0' if father isn't in dataset)
  4. Within-family ID of mother ('0' if mother isn't in dataset)
  5. Sex code ('1' = male, '2' = female, '0' = unknown)
  6. Phenotype value ('1' = control, '2' = case, '-9'/'0'/non-numeric = missing data if case/control)

The phenotype column can be quantitative as well; which is triggered when a numeric value is seen that is not one of the above qualitative codes.

  • $\begingroup$ Alright, so should I be able to indicate with a .fam file which samples are from the control group and which ones are from the case group? $\endgroup$ Commented Dec 15, 2021 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.