Question: PLINK: Change affection status
1
gravatar for bsmith030465
3.6 years ago by
bsmith030465120
United States
bsmith030465120 wrote:

Hi,

I need to change the affection status in my PLINK files (data1.bed, data1.bim, data1.fam) to '2' for all samples. To do this, I was thinking of:

1. Convert bed to ped using:

plink --bfile data1 --recode --tab --out data2

2. Copy data1.fam as data2.fam

3. Change the 6th column of both the data2.fam and data2.ped file so that the new affection status is '2' for everything

4. Convert the modified ped file back to bed using:

plink --ped data2.ped --map data2.map

 

Do these steps look complete and correct for what I am trying to do?

Thanks

plink • 2.9k views
ADD COMMENTlink modified 5 days ago by zx87546.2k • written 3.6 years ago by bsmith030465120

ok, thanks! That simplifies my job considerably!!

ADD REPLYlink written 3.6 years ago by bsmith030465120
1
gravatar for Maxime Lamontagne
3.6 years ago by
Québec
Maxime Lamontagne2.1k wrote:

You could:

1) Change the affected status in the fam file. Smaller file, less steps.

or

2) Use the option --pheno to use an alternate phenotype.

ADD COMMENTlink modified 3.6 years ago • written 3.6 years ago by Maxime Lamontagne2.1k

Yes, I could change the status in the fam file, but the old status would still remain in the bed file. Won't that be problematic for downstream analysis?

 

ADD REPLYlink written 3.6 years ago by bsmith030465120
1

No status in the bed file.

ADD REPLYlink written 3.6 years ago by Maxime Lamontagne2.1k
1
gravatar for morteza.mahmoudisaber
5 days ago by
Japan
morteza.mahmoudisaber70 wrote:

You can simply use the following code to get plink bed files with new phenotype:

plink --bfile PlinkBed --pheno replacementPhenotypes --make-bed  --out PlinkBedWithPheno
ADD COMMENTlink modified 5 days ago • written 5 days ago by morteza.mahmoudisaber70
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1098 users visited in the last hour