Hello, I am preparing a phenotype file for a GWAS.
I have a large 44k participant txt file (containing all cohort participants). Column1=FID, Column=IID, Coumn3=pseudoID I want to create a 4th column with my phenotype of interest (1=case, 0=control, NA=all other participants). I have 2 separate text files that contain just a column with the pseudoID for my controls and antother txt file for my cases.
(1) How do i create a header for the 4th column?
(2) How do i join the pseudoID from the separate control and case txt file to create a 0 or 1 as required in the 4th column.
(3) How do the remaining empty rows in the 4th column become NA?
I will be using Regenie for the GWAS. Any help would be appreciated. Thank you.
You should include the first few lines from each file, and an example of what you want the outcome to look like.
44k participant file txt
Case txt
Control txt
The expected output Phenotype File result