Last updated: 2018-10-04

workflowr checks: (Click a bullet for more information)
Expand here to see past versions:


Steps of the analysis

1. Setting up a database to hold variant/gene annotations and GWAS results

This script makes SQLite3 database holding two tables: one with annotations for each variant (provided by the Mackay lab), and one with annotations for each gene (from Bioconductor). Later on, we add the GWAS results to the database as well, allowing for memory-efficient processing of the results.

1. Estimating line mean fitness using Bayesian models

Using Bayesian mixed models implemented in the package brms to estimate the line means for our four fitness traits.

2. Running the GWAS

The script first performs quality control and imputation on the dataset of SNPs and indels for the DGRP. Second, it runs univariate and multivariate association tests on our four fitness traits using the software GEMMA.

3a. Applying adaptive shrinkage to the GWAS results

Here, we use the package mashr to perform multivariate adaptive shrinkage on the results of the univariate association tests. We ran mashr using two modes: canonical, and data-driven.

3b. Plots illustrating how adaptive shrinkage affected the results

This script generates some plots to check that mashr is performing as expected. The plots also led us to select the data-driven mashr results as the most conservative.

Results of the analysis

TWAS

Heritability - Correlated with selection experienced by the gene? Angatonism? - Correlated with sex-specificity?

eQTLs - Are there eQTLs with matching, independent, and opposite-sex effects? NEED TO RE-DO eQTL ANALYSIS A BIT - Are there more overlaps between the eQTLs and fitness QTLs than expected by chance? Correlation in p-vals?

Network - Modules are not correlated with fitness, so no evidence of selection on them? - Find the PCAs of the transcriptome, male vs female axis? Young vs old axis? - Are the modules heritable, and are there SNPs for eigengenes?

Predictions - eQTLs that affect transciption the same way in both sexes will have SA fitness effects for transcripts under SA selection (or concordant for concordant) We need: - Effect size for the eQTL on the transcript - Effect size for the eQTL on fitness - Effect size for the transcript on fitness - “Allele 1 made the transcript increase in both sexes, good for males and bad for females” - eQTLs that only affect transciption in one sex will have a more sex-specific fitness effect as well (not concordant, not antag) - eQTLs where the + and - alleles are swapped between sexes will be antagonistic or concordant, depending on sex-specific selection on that transcript - Transcripts will show the twin peaks relationship between sex bias in expression and SA selection - Genes targetted by dsx will be extra antagonistic


This reproducible R Markdown analysis was created with workflowr 1.1.1