Skip to content

Commit

Permalink
Updated source code
Browse files Browse the repository at this point in the history
  • Loading branch information
corbinq committed Oct 5, 2020
1 parent a224ba8 commit 9203d3c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Binary file modified bin/yax_Linux_x86_64.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion doc/input_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ YAX requires the first 4 columns as shown above, where 1-3 (chr, start, end) spe
PC2 -0.0097 -0.0059 -0.0025 -0.0064
PC3 0.0067 0.0096 -0.0036 -0.0041
```
Covariate files should be white-space delimited. Uncompressed or GZIP/BGZIP-compressed white-space delimited text files are supported. Users are encouraged to verify that their covariate data matrix has full column rank.
Uncompressed or GZIP/BGZIP-compressed white-space delimited text files are supported for covariate data. Users are encouraged to verify that their covariate data matrix has full column rank.

## Genetic relatedness and kinship matrices
**Relevant flags:** `--grm {FILE}`, `--kin {FILE}`. <br />
Expand Down
4 changes: 2 additions & 2 deletions doc/mode_cis.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ cis-xQTL analysis in YAX uses either a) ordinary least squares (OLS) for unrelat
8. `resid_sd` : Square root of regression mean squared error under the null model.
9. `n_cis_variants` : Number of variants in the *cis* region (which were used to calculate `gene_pval`).

**QTL software concordance.** When no GRM is specified, YAX single-variant output is numerically equivalent to the R regression model `lm(traits[,j] ~ covariates + genotype[,k])` for each trait `j` and genotype `k`. YAX output is additionally equivalent to [FastQTL](http://fastqtl.sourceforge.net/) single-variant output. Note that some tools, such as [QTLtools](https://qtltools.github.io/qtltools/), instead fit the model `lm(residuals[,j] ~ genotype[,k])` where `residuals[,j] = resid(lm(traits[,j] ~ covariates))`. YAX can mimic this model if the flag `--no-resid-geno` is specified. This approach is slightly faster that standard OLS, but can cause [conservative p-values (loss of statistical power)](https://onlinelibrary.wiley.com/doi/abs/10.1002/gepi.22325).
**QTL software concordance.** When no GRM is specified, YAX single-variant output is numerically equivalent to the R regression model `lm(traits[,j] ~ covariates + genotype[,k])` for each trait `j` and genotype `k`. YAX output is additionally equivalent to [FastQTL](http://fastqtl.sourceforge.net/) single-variant output. Note that some tools, such as [QTLtools](https://qtltools.github.io/qtltools/), instead fit the model `lm(residuals[,j] ~ genotype[,k])` where `residuals[,j] = resid(lm(traits[,j] ~ covariates))`. YAX can mimic this model if the flag `--no-resid-geno` is specified. This approach is slightly faster than standard OLS, but can cause [conservative p-values (loss of statistical power)](https://onlinelibrary.wiley.com/doi/abs/10.1002/gepi.22325).
## LMM cis-xQTL analysis
**Example command:** <br />
`./yax cis --vcf {vcf} --bed {expression-file} --cov {covariate-file} --grm {grm-file} --prefix {out-name}` <br />
<br />
YAX uses a linear mixed model (LMM) to account for cryptic or familial relatedness in cis-eQTL analysis of the form <img src="https://render.githubusercontent.com/render/math?math=y = X\beta %2B g %2B \varepsilon "> where <img src="https://render.githubusercontent.com/render/math?math=g\sim\mathcal{N}(0,\tau^{2}\GRM)"> and <img src="https://render.githubusercontent.com/render/math?math=\varepsilon\sim\mathcal{N}(0,\sigma^{2}I)">. To use this feature, specify a genetic relatedness matrix (GRM) file to YAX using `--grm {grm-file}`. Output files and options are otherwise similar to those from OLS cis-xQTL analysis (when `--grm` is not specified). <br />
YAX uses a linear mixed model (LMM) to account for cryptic or familial relatedness in cis-eQTL analysis of the form <img src="https://render.githubusercontent.com/render/math?math=y = X\beta %2B g %2B \varepsilon "> where <img src="https://render.githubusercontent.com/render/math?math=g\sim\mathcal{N}(0,\tau^{2}\GRM)"> and <img src="https://render.githubusercontent.com/render/math?math=\varepsilon\sim\mathcal{N}(0,\sigma^{2}I)">. To use this feature, specify a genetic relatedness matrix (GRM) file to YAX using `--grm {grm-file}`. Output files and options are otherwise similar to those from OLS cis-xQTL analysis (when `--grm` is not specified). [See here](https://github.com/corbinq/yax/blob/master/doc/input_files.md) for accepted input file formats. <br />

**Example command:** <br />
`./yax cis --vcf {vcf} --bed {trait-file} --cov {covariate-file} --prefix {out-name} --long` <br />
Expand Down
4 changes: 2 additions & 2 deletions doc/mode_trans.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Similar to `yax cis` mode, trans-xQTL analysis in YAX (`yax trans`) uses either
**Example command:** <br />
`./yax trans --vcf {vcf} --bed {expression-file} --cov {covariate-file} --prefix {output-prefix}` <br />
<br />
**QTL software concordance.** When no GRM is specified, YAX single-variant output is equivalent to the R regression model `lm(traits[,j] ~ covariates + genotype[,k])` for each trait `j` and genotype `k`. YAX output is additionally equivalent to [FastQTL](http://fastqtl.sourceforge.net/) single-variant output. Note that some tools, such as [QTLtools](https://qtltools.github.io/qtltools/), instead fit the model `lm(residuals[,j] ~ genotype[,k])` where `residuals[,j] = resid(lm(traits[,j] ~ covariates))`. YAX can mimic this model if the flag `--no-resid-geno` is specified. This approach is slightly faster that standard OLS, but can cause [conservative p-values (loss of statistical power)](https://onlinelibrary.wiley.com/doi/abs/10.1002/gepi.22325).
**QTL software concordance.** When no GRM is specified, YAX single-variant output is equivalent to the R regression model `lm(traits[,j] ~ covariates + genotype[,k])` for each trait `j` and genotype `k`. YAX output is additionally equivalent to [FastQTL](http://fastqtl.sourceforge.net/) single-variant output. Note that some tools, such as [QTLtools](https://qtltools.github.io/qtltools/), instead fit the model `lm(residuals[,j] ~ genotype[,k])` where `residuals[,j] = resid(lm(traits[,j] ~ covariates))`. YAX can mimic this model if the flag `--no-resid-geno` is specified. This approach is slightly faster that standard OLS, but can cause [conservative p-values (loss of statistical power)](https://onlinelibrary.wiley.com/doi/abs/10.1002/gepi.22325). To see accepted input file formats, [please see here.](https://github.com/corbinq/yax/blob/master/doc/input_files.md)
## LMM trans-xQTL analysis
**Example command:** <br />
```
Expand All @@ -29,7 +29,7 @@ Similar to `yax cis` mode, trans-xQTL analysis in YAX (`yax trans`) uses either
./yax trans --vcf {vcf} --bed {expression-file} --cov {covariate-file} --grm {grm-file} --theta-file {theta-prefix}.theta.gz --prefix {output-prefix}
```
<br />
YAX uses a linear mixed model (LMM) to account for cryptic or familial relatedness in trans-eQTL analysis. To use this feature, specify a genetic relatedness matrix (GRM) file to YAX using `--grm {grm-file}`. <br />
YAX uses a linear mixed model (LMM) to account for cryptic or familial relatedness in trans-eQTL analysis. To use this feature, specify a genetic relatedness matrix (GRM) file to YAX using `--grm {grm-file}`. To see accepted input file formats, [please see here.](https://github.com/corbinq/yax/blob/master/doc/input_files.md) <br />
Unlike `yax cis`, LMM analysis in `yax trans` is divided into two steps. First, we estimate variance component parameters for all molecular traits under the null hypothesis (no single-variant genetic effects), and store these estimates for later use. Second, we use these estimates to quickly calculate trans-xQTL association statistics. When jobs are parallelizes across chromosomes, this 2-step approach saves substantial computational resources, as the null model for each molecular trait need only be estimated once. <br />

**LMM software concordance.** YAX's LMM estimates are consistent with the R packages [GMMAT](https://github.com/hanchenphd/GMMAT) and [GENESIS](http://www.bioconductor.org/packages/release/bioc/html/GENESIS.html) using AI-REML.
Expand Down

0 comments on commit 9203d3c

Please sign in to comment.