Trouble with PLINK's logistic regression analysis and covariates
2
0
Entering edit mode
8.2 years ago

Hi,

I am new to PLINK and I am having trouble using one of the commands. I am trying to perform logistic regression analysis on several bed, bim and fam files. Here is the command I put in:

plink \
  --bfile chr22.dose \
  --logistic \
  --covar COPD_NHW_Phenotype_PC_Final.txt \
  --covar-name FamilyID,PatientID, FatherID, MotherID, Sex, Affection, Status, Age_Enroll, EV=6.02683, EV=2.8176, EV=1.74892, EV=1.65407, EV=1.55682, EV=1.46005, EV=1.44006, EV=1.39075, EV=1.19516, EV=1.17052, \
  --out chr22.dose.output

I get back the following message and error:

Logging to chr22.dose.output.log.
Options in effect:
  --bfile chr22.dose
  --covar COPD_NHW_Phenotype_PC_Final.txt
  --covar-name FamilyID,PatientID, FatherID, MotherID, Sex, Affection, Status, Age_Enroll, EV=6.02683, EV=2.8176, EV=1.74892, EV=1.65407, EV=1.55682, EV=1.46005, EV=1.44006, EV=1.39075, EV=1.19516, EV=1.17052,
  --logistic
  --out chr22.dose.output

516866 MB RAM detected; reserving 258433 MB for main workspace.
Allocated 145368 MB successfully, after larger attempt(s) failed.
652195 variants loaded from .bim file.
5269 people (0 males, 0 females, 5269 ambiguous) loaded from .fam.
Ambiguous sex IDs written to chr22.dose.output.nosex .
Using 1 thread (no multithreaded calculations invoked.

Error: --covar file doesn't have a header line for --covar-name.

I've searched online and I can't find anything on this error. Can anyone please help me out?

Diego

Plink SNP GWAS • 6.8k views
ADD COMMENT
0
Entering edit mode

Post the first ten lines of COPD_NHW_Phenotype_PC_Final.txt.

ADD REPLY
0
Entering edit mode
Family ID       Patient ID      Father ID       Mother ID       Sex     Affection Status        Age_Enroll      EV = 6.02683    EV = 2.8176     EV = 1.74892    EV = 1.65407    EV = 1.55682    EV = 1.46005    EV = 1.44006    EV = 1.39075 
COPDGene_A01220 WG0117516-DNAA11_GS005261413RD                  1       0       57.5    -0.007512605    -0.012820598    -0.004879983    0.025435055     0.004947331     -0.007355293    -0.003296038    0.003340138     -0.032716866    -0.01
COPDGene_A04559 WG0117509-DNAG03_GS005291934RD                  1       0       52.1    -0.01147134     0.051274805     -0.007390259    0.005100506     0.005220221     -0.001276495    -0.003518743    -0.001657514    -0.013286697    -0.02
COPDGene_A05032 WG0117520-DNAD01_GS00522201XRD                  0       1       66.9    -0.006408793    0.001497303     -0.012935682    -0.00470666     0.003673016     -0.002200746    -0.005253198    0.013026227     0.004765291     -0.00
COPDGene_A05779 WG0117554-DNAG02_S-001023023                    0       1       57.8    -0.000327937    -0.009131555    0.01642668      0.012317617     -0.013601817    0.003708468     0.009020178     0.016711946     0.000854154     -0.01
COPDGene_A07157 WG0117508-DNAA04_GS005204353RD                  0       1       71.6    -0.00082518     -0.00516709     0.00748709      0.013504962     -0.00020616     0.00611136      0.005039274     0.031565566     0.003620531     0.013
COPDGene_A07385 WG0117552-DNAH04_S-001023165                    1       0       70.9    0.009356437     0.017223722     0.002700628     0.005383449     -0.002617253    -0.011164449    -0.000777176    0.016380215     0.000739365     -0.00C
OPDGene_A07406 WG0117652-DNAB06_S-001036919                    0       1       61.9    -0.005360755    -0.008164267    -0.012285158    0.003808289     0.014703391     0.008186209     -0.013219803    -0.022217068    -0.035664881    -0.00
COPDGene_A07466 WG0117482-DNAE02_GS010769550RD                  0       1       77.1    0.007348406     0.000907873     -0.000553854    0.015803624     0.021634317     0.00952734      0.001227569     0.012463894     -0.004593513    -0.01
COPDGene_A07688 WG0117512-DNAD02_GS005202058RD                  1       1       68.1    -0.004916379    0.025772344     0.011330522     0.00831186      0.006428147     -0.001998264    0.006493551     0.008381912     0.003852375     -0.01
ADD REPLY
0
Entering edit mode

First column should be FID.

Second column should be IID.

The Father and the Mother ID columns look empty. You can't have empty data. Add -9 or 0 if empty.

ADD REPLY
0
Entering edit mode

Family ID to EV = 1.39075 are all separate columns

ADD REPLY
0
Entering edit mode
8.2 years ago

You need to name your first two columns 'FID' and 'IID' .

ADD COMMENT
0
Entering edit mode

I would also lose all the spaces and "=" in the header

ADD REPLY
0
Entering edit mode

Thanks Christopher,

I've just tried that and got the following error:

Error: Missing --covar-name token in --covar file header line.

I've checked the top line of my covariate file, and don't see anything different there from what I put in my command line.

ADD REPLY
0
Entering edit mode

Post up your command line arguments and the header of your covar file again

ADD REPLY
0
Entering edit mode

The command:

plink \
  --bfile chr22.dose \
  --logistic \
  --covar COPD_NHW_Phenotype_PC_Final.txt \
  --covar-name FID IID Father_ID Mother_ID Sex Affection_Status Age_Enroll EV6.02683 EV2.8176 EV1.74892 EV1.65407 EV1.55682 EV1.46005 EV1.44006 EV1.39075 EV1.19516 EV1.17052 \
  --out chr22.dose.output

The header:

FID     IID     Father_ID       Mother_ID       Sex     Affection_Status        Age_Enroll      EV6.02683       EV2.8176        EV1.74892       EV1.65407       EV1.55682       EV1.46005       EV1.44006       EV1.39075    COPDGene_A01220 WG0117516-DNAA11_GS005261413RD                  1       0       57.5    -0.007512605    -0.012820598    -0.004879983    0.025435055     0.004947331     -0.007355293    -0.003296038    0.003340138     -0.03
COPDGene_A04559 WG0117509-DNAG03_GS005291934RD                  1       0       52.1    -0.01147134     0.051274805     -0.007390259    0.005100506     0.005220221     -0.001276495    -0.003518743    -0.001657514    -0.01COPDGene_A05032 WG0117520-DNAD01_GS00522201XRD                  0       1       66.9    -0.006408793    0.001497303     -0.012935682    -0.00470666     0.003673016     -0.002200746    -0.005253198    0.013026227     0.004
COPDGene_A05779 WG0117554-DNAG02_S-001023023                    0       1       57.8    -0.000327937    -0.009131555    0.01642668      0.012317617     -0.013601817    0.003708468     0.009020178     0.016711946     0.000COPDGene_A07157 WG0117508-DNAA04_GS005204353RD                  0       1       71.6    -0.00082518     -0.00516709     0.00748709      0.013504962     -0.00020616     0.00611136      0.005039274     0.031565566     0.003
COPDGene_A07385 WG0117552-DNAH04_S-001023165                    1       0       70.9    0.009356437     0.017223722     0.002700628     0.005383449     -0.002617253    -0.011164449    -0.000777176    0.016380215     0.000COPDGene_A07406 WG0117652-DNAB06_S-001036919                    0       1       61.9    -0.005360755    -0.008164267    -0.012285158    0.003808289     0.014703391     0.008186209     -0.013219803    -0.022217068    -0.03
COPDGene_A07466 WG0117482-DNAE02_GS010769550RD                  0       1       77.1    0.007348406     0.000907873     -0.000553854    0.015803624     0.021634317     0.00952734      0.001227569     0.012463894     -0.00COPDGene_A07688 WG0117512-DNAD02_GS005202058RD                  1       1       68.1    -0.004916379    0.025772344     0.011330522     0.00831186      0.006428147     -0.001998264    0.006493551     0.008381912     0.003
ADD REPLY
0
Entering edit mode

I would lose the "." characters in the header. Make sure all of you columns have a data entry (-9 if missing).

ADD REPLY
0
Entering edit mode
8.2 years ago

Add , between each covariate name.

Example from the website: plink --file mydata --covar c.txt --covar-name AGE,BMI-SMOKE,ALC

ADD COMMENT
0
Entering edit mode

Thanks,

Here is the new command I put in:

plink --bfile chr22.dose \
  --logistic \
  --covar COPD_NHW_Phenotype_PC_Final.txt \
  --covar-name FID, IID, Father_ID, Mother_ID, Sex, Affection_Status, Age_Enroll, EV6_02683, EV2_8176, EV1_74892, EV1_65407, EV1_55682, EV1_46005, EV1_44006, EV1_39075, EV1_19516, EV1_17052 \
  --out chr22.dose.output

The heading of the covariate file:

FID     IID     Father_ID       Mother_ID       Sex     Affection_Status        Age_Enroll      EV6_02683       EV2_8176        EV1_74892       EV1_65407       EV1_55682       EV1_46005       EV1_44006       EV1_39075       EV1_19516
COPDGene_A01220 WG0117516-DNAA11_GS005261413RD  -9      -9      1       0       57.5    -0.007512605    -0.012820598    -0.004879983    0.025435055     0.004947331     -0.007355293    -0.003296038    0.003340138     -0.032716866    -0.01
COPDGene_A04559 WG0117509-DNAG03_GS005291934RD  -9      -9      1       0       52.1    -0.01147134     0.051274805     -0.007390259    0.005100506     0.005220221     -0.001276495    -0.003518743    -0.001657514    -0.013286697    -0.02
COPDGene_A05032 WG0117520-DNAD01_GS00522201XRD  -9      -9      0       1       66.9    -0.006408793    0.001497303     -0.012935682    -0.00470666     0.003673016     -0.002200746    -0.005253198    0.013026227     0.004765291     -0.00
COPDGene_A05779 WG0117554-DNAG02_S-001023023    -9      -9      0       1       57.8    -0.000327937    -0.009131555    0.01642668      0.012317617     -0.013601817    0.003708468     0.009020178     0.016711946     0.000854154     -0.01
COPDGene_A07157 WG0117508-DNAA04_GS005204353RD  -9      -9      0       1       71.6    -0.00082518     -0.00516709     0.00748709      0.013504962     -0.00020616     0.00611136      0.005039274     0.031565566     0.003620531     0.013
COPDGene_A07385 WG0117552-DNAH04_S-001023165    -9      -9      1       0       70.9    0.009356437     0.017223722     0.002700628     0.005383449     -0.002617253    -0.011164449    -0.000777176    0.016380215     0.000739365     -0.00
COPDGene_A07406 WG0117652-DNAB06_S-001036919    -9      -9      0       1       61.9    -0.005360755    -0.008164267    -0.012285158    0.003808289     0.014703391     0.008186209     -0.013219803    -0.022217068    -0.035664881    -0.00
COPDGene_A07466 WG0117482-DNAE02_GS010769550RD  -9      -9      0       1       77.1    0.007348406     0.000907873     -0.000553854    0.015803624     0.021634317     0.00952734      0.001227569     0.012463894     -0.004593513    -0.01
COPDGene_A07688 WG0117512-DNAD02_GS005202058RD  -9      -9      1       1       68.1    -0.004916379    0.025772344     0.011330522     0.00831186      0.006428147     -0.001998264    0.006493551     0.008381912     0.003852375     -0.01

and the message and error:

Logging to chr22.dose.output.log.
Options in effect:
  --bfile chr22.dose
  --covar COPD_NHW_Phenotype_PC_Final.txt
  --covar-name FID, IID, Father_ID, Mother_ID, Sex, Affection_Status, Age_Enroll, EV6_02683, EV2_8176, EV1_74892, EV1_65407, EV1_55682, EV1_46005, EV1_44006, EV1_39075, EV1_19516, EV1_17052
  --logistic
  --out chr22.dose.output

516866 MB RAM detected; reserving 258433 MB for main workspace.
Allocated 145368 MB successfully, after larger attempt(s) failed.
652195 variants loaded from .bim file.
5269 people (0 males, 0 females, 5269 ambiguous) loaded from .fam.
Ambiguous sex IDs written to chr22.dose.output.nosex .
Using 1 thread (no multithreaded calculations invoked.
Error: Missing --covar-name token in --covar file header line.

I'm still getting this error.

Diego

ADD REPLY
0
Entering edit mode
  1. Remove the Father_ID and Mother_ID columns if they only have -9 value.
  2. Remove all the space in --covar-name FID,IID,Father_ID,Mother_ID,Sex,....
  3. Make sure these FID and IID match those in the fam file.
  4. Sex column is wrong. It should be 1 and 2 (1=male; 2=female; other=unknown) but you have 0 and 1.
  5. Affection_Status: Same thing.
ADD REPLY
0
Entering edit mode

Diego,

Why are you including "FID","IID" as covariates. It seems you have an awful lot of covariates, some of which I don't think you really want to include. Try running the same command on just "Age_Enroll" to see what happens. FID and IID are there for the purpose of sample identification only, you don't want to call them into your regression.

ADD REPLY

Login before adding your answer.

Traffic: 1955 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