h3abionet / h3agwas

GWAS Pipeline for H3Africa
Other
106 stars 66 forks source link

Using continuous phenotypic data for an association study #17

Closed PhilPalmer closed 5 years ago

PhilPalmer commented 5 years ago

Hi,

Is there any way to use the plink-assoc.nf (or rather assoc.nf) pipeline with continuous phenotypic data or phenotypic data with more factors than just case and control?

As I understand it currently the pipeline accepts a phenotype file eg sample.phe which looks like the following:

FID IID PAT MAT SEX PHE
1 1 0 0 1 2
2 2 0 0 1 1
3 3 0 0 1 2
4 4 0 0 1 2
5 5 0 0 2 2

Here the phenotype PHE is encoded as 1 = control & 2 = case. Am I able to use a phenotype with more than two values eg 1, 2, 3, 4... etc. Or can I use a phenotype with continuous values eg 1.23, 12.32, 7.32.. etc.

If it's not currently possible, do you have any idea how either this pipeline could be adapted or any other tools which may allow this to be done?

Many thanks in advance. Any help would be much appreciated

shaze commented 5 years ago

Yes, it is possible and in fact almost all our group's analyses use continuous traits.

You can put in anything that the underlying GWAS tool (e.g. PLINK, Gemma, BOLTLMM) accepts.

You need to have a data file with the first row being a header line. There should be FID IID columns tha match your PLINK data and then whatever other columns you want. In your config file you specify the the file name

Here is a sample config file

params {
        data = "data/data.csv"
    input_dir = "genotype/"
    input_pat = "glaucoma-qc"
    output_dir = "assoc"
    mperm = 100

    pheno = "bmi_c,pulse_avg"
    covariates = "sex,age"
    sexinfo_available = true
    assoc = 1
}

And I ran it thus

nextflow run -c test-assoc.config ../assoc.nf -profile slurm

You will see in my case the bmi_c and pulse_avg columns are quantitaive traits, as is age

Let me know if you need more help

shaze commented 5 years ago

NB I've just been making some modifications to the pipeline, so please do a pul to get the most recent version

PhilPalmer commented 5 years ago

Ah, that's great news, thank you for your help, prompt response & for making these updates.

I'll let you know if I have any more problems but will close this for now