This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Hardy-Weinberg equilibrium analysis in Plink for association study.

For association study what type of data file will be needed? I have Chromosome, position, Allele information, snp id. My queries are:

  1. To calculate allele frequency
  2. What should I consider case and control. If I have disease based parameters?
  3. What will be the data file in plink
  4. How can I calculate ODDS ratio
plink association study

1 answer

In order to work with Plink, you need to convert your variant calling output into one of the Plink formats (ped, bed, tped, etc.). You can do this in several ways. Bcftools and plink have functions that go from vcf to ped/bed, for example. About how to calculate allele freqs and HWE: https://www.cog-genomics.org/plink/1.9/basic_stats

Dear Pedro,

I don't have vcf file. I have case and control with growth parameters, rsid, chrom, position. I know the steps like QC which should give output Max Allele Frequency, frequency estimation followed with HWE (OR ratio and pvalue) and logistic regression. I would like to know how to read text file in plink. Plink shows --file mydata.

Then you can code a script to convert manually to tped format

The tabular file should contain 4+2n columns, where n = number of samples. The first 4 columns should be Chromosome, Variant ID, Genomic position (in centimorgans) and Base-pair position. The next pair are the calls for the first ind in the tfam file, the next pair the calls for the second ind, etc.

Log in to answer this question.