OpenMendel / OrdinalGWAS.jl

Genome-wide association studies (GWAS) for ordered categorical phenotypes
https://openmendel.github.io/OrdinalGWAS.jl/latest/
MIT License
21 stars 7 forks source link

Specifying null model w/out covariates? #32

Closed pmagwene closed 2 years ago

pmagwene commented 2 years ago

I'm interested in using OrdinalGWAS to simply fit the ordinal regression on SNPs withoutout additional covariates. What's the right way to specify the null model in this case when calling the ordinalgwas function?

I tried creating a dummy "sex" covariate (with all samples set to have the same value), but unsurprisingly this raises an error if the covariate is non-variable.

Hua-Zhou commented 2 years ago

@pmagwene Have you tried ordinalgwas(@formula(trait ~ sex), datadir * "covariate.txt", datadir * "hapmap3"), where the @formula(trait ~ sex) specifies an intercept-only null model?

pmagwene commented 2 years ago

For my usecase, sex is not an appropriate covariate.

Thinking about this a bit more, perhaps I could fit the model repeatedly, substituting a normally distributed random variable as a covariate. Sort of a permutation based approach with a non-informative covariate...

kose-y commented 2 years ago

@pmagwene I hope I'm not too late to weigh in. Actually, you can do ordinalgwas(@formula(trait ~ 0), datadir * "covariate.txt", datadir * "hapmap3")

kose-y commented 2 years ago

Updated the docs. Marking as resolved.