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?
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:
- Family ID ('FID')
- Within-family ID ('IID'; cannot be '0')
- Within-family ID of father ('0' if father isn't in dataset)
- Within-family ID of mother ('0' if mother isn't in dataset)
- Sex code ('1' = male, '2' = female, '0' = unknown)
- 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.