How to update phenotype in .fam file.
1
0
Entering edit mode
3.4 years ago
geno89 ▴ 10

I am wondering if there is any way to update phenotype in my .fam file from reference .txt file un unix or in plink.

My .fam file looks like this

20481 20481 0 0 2 -9
20483 20483 0 0 1 1
20488 20488 0 0 2 1
20492 20492 0 0 1 1
20493 20493 0 0 1 -9
20498 20498 0 0 2 -9
20500 20500 0 0 2 1
20518 20518 0 0 2 -9
20520 20520 0 0 2 1
20523 20523 0 0 1 -9
20524 20524 0 0 2 1

and my reference plonk file looks like this: where the last two columns correspond to the phenotypes.

V1       V2     V3      V4      V6     V7_Pheno   V8
    2253792 20481   NA      DNA     1       Yes    2
    2253802 20483   NA      DNA     4       Yes    2
    2253816 20488   NA      DNA     0       No     1
    2253820 20493   NA      DNA     4       Yes    2
    2253821 20498   NA      DNA     0       No     1
    2253824 20520   NA      DNA     0       No     1
    2253826 20523   NA      DNA     3       Yes    2
    2253829 20524   NA      DNA     6       Yes    2
GWAS plink linux unix • 920 views
ADD COMMENT
0
Entering edit mode
3.4 years ago

Taking a rough guess from your reference file, I am guessing that the last two columns V7_Pheno and V8 are referring to the same thing, where 1 = No and 2 = Yes. Under this assumption, it wouldn't be hard to update the phenotypes by yourself. What. you could do is just parse through each line (using Python or whatnot) and then replace the last column with V8. If you need help with implementing this, let me know.

ADD COMMENT

Login before adding your answer.

Traffic: 1810 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6