This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How is it possible to create a .fam file with PLINK with phenotypic data (for GEMMA)?

I want to use GEMMA to calculate association mapping. But I need a .fam file to run the GEMMA program. Like this:

gemma -bfile plink -bslmm 1 -o bslmm.output

I started to create the plink files with my genetic info with this:

vcftools --vcf output.vcf --plink --out ./plink/output_in_plink

To create a bim, fam and bed:

plink --file output_in_plink --make-bed

This is creating a .fam, but since this is from the vcf file, I'm not able to get the phenotypic data.

plink2 --vcf output.vcf  --allow-extra-chr  --maf 0.05 --recode --out myplink

Should it be something like this?:

plink --vcf output.vcf --pheno pheno.txt --assoc --maf 0.05 --out run1

I tried this:

plink --file pheno.txt --make-bed

But it's giving me the error below:

@----------------------------------------------------------@
|        PLINK!       |     v1.07      |   10/Aug/2009     |
|----------------------------------------------------------|
|  (C) 2009 Shaun Purcell, GNU General Public License, v2  |
|----------------------------------------------------------|
|  For documentation, citation & bug-report instructions:  |
|        http://pngu.mgh.harvard.edu/purcell/plink/        |
@----------------------------------------------------------@

Skipping web check... [ --noweb ] 
Writing this text to log file [ plink.log ]
Analysis started: Fri Dec 23 23:29:41 2016

Options in effect:
    --noweb
    --file pheno.txt
    --make-bed


ERROR: No file [ pheno.txt.ped ] exists.

How can I solve this?

How should I prepare my files for GEMMA?

plink fam vcftools gemma

1 answer

Take a look at my answer here, linkage disequilibrium analysis , where I mention how you can create a custom FAM when you are converting from VCF/BCF to PLINK. You also need to specify a sample ordering file when converting

I would not use VCFtools to do anything specific in relation to PLINK.

If you need specific assistance, reply here and I will give a more detailed answer for you. I have done this conversion countless times and know every error that could occur.

Kevin

Log in to answer this question.