Question: PLINK: Change affection status
1
gravatar for bsmith030465
4.5 years ago by
bsmith030465150
United States
bsmith030465150 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 • 3.8k views
ADD COMMENTlink modified 11 months ago by zx87548.8k • written 4.5 years ago by bsmith030465150

ok, thanks! That simplifies my job considerably!!

ADD REPLYlink written 4.5 years ago by bsmith030465150
1
gravatar for Maxime Lamontagne
4.5 years ago by
Québec
Maxime Lamontagne2.2k 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 4.5 years ago • written 4.5 years ago by Maxime Lamontagne2.2k

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 4.5 years ago by bsmith030465150
1

No status in the bed file.

ADD REPLYlink written 4.5 years ago by Maxime Lamontagne2.2k
1
gravatar for morteza.mahmoudisaber
11 months 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 11 months ago • written 11 months 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: 766 users visited in the last hour