Body: <p>I have a large vcf file with both case and control samples in the file. I am planning to input the vcf into the --assoc function of plink with the --fam parameter that contains a .fam file that specifies which samples are case and which are control. I want to make a .fam file with the case and control samples labelled in the phenotype value column. How can I assign case/control to different samples for the .fam of my merged vcf? My big vcf file doesn't indicate whether the samples are case or control. I have two tsv files, one with a list of control samples and one with a list of case samples. Can I use these two files to specify in the .fam file which samples are case and which are control?</p>
  <p>Could I also set the specific gene mutation as the case and samples without the mutation as the control, and run an association test based on those parameters?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-23T18:13:51.800Z
Comments.Text: It would help to see what your control/case tsv files look like. Here is the .fam file specification, IDK if you have family information based on what you've posted so many of the entries may simply be zero.
Comments.UserDisplayName: Maximilian Press
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-23T18:24:39.377Z
Comments.Text: See this post for some information about preparing files: https://bioinformatics.stackexchange.com/questions/15385/making-plink-compatible-files-from-vcf-file-without-phenotype-information. If you have comfort with scripting tools such as python, you could just update the .fam file from your TSV files given that phenotype info is missing from your VCF.
Comments.UserDisplayName: Maximilian Press
Tags: <vcf><plink>
Title: Assigning case and control label to different samples of large merged file to input into a plink 1.9.0 association test
ThreadText: # Assigning case and control label to different samples of large merged file to input into a plink 1.9.0 association test
  
  (Asked by: username_0 on 2021-12-18)
  
  I have a large vcf file with both case and control samples in the file. I am planning to input the vcf into the --assoc function of plink with the --fam parameter that contains a .fam file that specifies which samples are case and which are control. I want to make a .fam file with the case and control samples labelled in the phenotype value column. How can I assign case/control to different samples for the .fam of my merged vcf? My big vcf file doesn't indicate whether the samples are case or control. I have two tsv files, one with a list of control samples and one with a list of case samples. Can I use these two files to specify in the .fam file which samples are case and which are control?
  
  Could I also set the specific gene mutation as the case and samples without the mutation as the control, and run an association test based on those parameters?
  
  **Tags:** vcf, plink
  
  > **Comments:**
  > **username_1**: It would help to see what your control/case tsv files look like. Here is the .fam file specification, IDK if you have family information based on what you've posted so many of the entries may simply be zero.  
  > **username_1**: See this post for some information about preparing files: https://bioinformatics.stackexchange.com/questions/15385/making-plink-compatible-files-from-vcf-file-without-phenotype-information. If you have comfort with scripting tools such as python, you could just update the .fam file from your TSV files given that phenotype info is missing from your VCF.  
  
  ---
  
  ## 0 answers
  
  