Question: plink linear regression
0
gravatar for AQ7
3.0 years ago by
AQ730
AQ730 wrote:

Goodmorning everyone,

I'm trying to use plink 1.07 for a linear regression analysis with several COVs. I'm using a ped where i have cases (1) and controls (2) but when I start the analysis I get a message telling me that plink sees 0 cases and 0 controls, How is it possible? maybe for linear regression we must indicate which are cases and controls in another way? thanks a lot for you help. I attach here my command line:

plink --file mydata --linear --genotypic --covar mycovar.txt

thanks a lot

plink • 2.4k views
ADD COMMENTlink written 3.0 years ago by AQ730

good morning, information on the covariates file can be found here: https://www.cog-genomics.org/plink/1.9/input#covar

I think that the problem could be more to do with your FAM file. What are the contents of mydata.fam? You may have to create a custom FAM, depending on the source of your data.

ADD REPLYlink written 3.0 years ago by Kevin Blighe69k

thanks a lot for you answer my fam file is like that:

id1 id1 0   0   0   1
id22    id22    0   0   0   1
id23    id23    0   0   0   1
id24    id24    0   0   0   2
id25    id25    0   0   0   2
id26    id26    0   0   0   2
ADD REPLYlink written 3.0 years ago by AQ730
2

You need to add --allow-no-sex to your command line, since plink 1.x throws out phenotypes of missing-sex samples by default.

ADD REPLYlink written 3.0 years ago by chrchang5237.6k
1

Sorry I've not seen your comment yestarday!!! It works adding --allow-no-sex, really thanks a lot

ADD REPLYlink written 3.0 years ago by AQ730

AQ7, can you confirm that this works so that others will benefit?

ADD REPLYlink written 3.0 years ago by Kevin Blighe69k
1

Yes Kevin It works!! thanks a lot for your patience and fast help

ADD REPLYlink written 3.0 years ago by AQ730

Okay, FAM looks good. When you run PLINK, it is definitely using this file? - otherwise, specify it with the --fam flag.

The only other thing that I can think of is that the FID and IIDs in your genotype PED file do not exactly match those in the FAM or in mycovar.txt. The minimum information required for the covariates file is FID and IID, and then obviously a covariate of interest.

All FIDs and IIDs have to be the exact same, across:

  • PED file
  • FAM file
  • Covariates file
ADD REPLYlink written 3.0 years ago by Kevin Blighe69k

thanks Kevin, I've checked and yes thay are in the same order, I even try the same command line specifying --bed --fam --bim but i always get 0 cases and 0 controls output.... my covar file looks like that

id1 id1 1.838223051 0   23.42402344 0.016650571 14.98884412
id22    id22    21.25832224 0   37.92276964 0.009986684 2.536617843
id23    id23    22.41528527 0   38.83230144 0.003328673 5.981625724
id24    id24    9.410159111 0.359496705 58.1951934  0   0.692364024
id25    id25    2.416616737 0   73.21083816 0   0.276279875
id26    id26    27.49484056 0   55.18274416 0.003328673 1.208308368
ADD REPLYlink written 3.0 years ago by AQ730

Which version are you using? Does it not even run as plink --file mydata --linear ?

ADD REPLYlink written 3.0 years ago by Kevin Blighe69k

I get the same result even with just this command you suggested me. So with all NA at the end and with 0 cases and 0 controls in log file. :(

ADD REPLYlink written 3.0 years ago by AQ730

i'm using version 1.07

ADD REPLYlink written 3.0 years ago by AQ730

...and mydata.ped - how does that look?

ADD REPLYlink written 3.0 years ago by Kevin Blighe69k
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: 1165 users visited in the last hour
_