StoatPlot provides a set of lightweight and user-friendly tools for visualizing GWAS results generated by the STOAT tool. It includes functions for generating:
- Manhattan plots
- Q-Q plots
- P-value histograms
- Genotype-based boxplots
- Paths length distribution
- Snarl type histogram
These tools facilitate the visual inspection of association signals and support downstream interpretation of GWAS outputs.
# Install from GitHub
# install.packages("BiocManager")
BiocManager::install("Pa-Tou/stoat_plot")If you are having problem, another option is to follow the
install.Rscript (used to install the package in the Docker container). This script is supposed to be run from the root of this folder, so you would have clone the repo first.
| Function | Description |
|---|---|
summary_stoat() |
Print summary information on GWAS results |
manhattan_plot() |
Manhattan plot for GWAS results |
qq_plot() |
Q-Q plot for p-values |
plot_pvalue_hist() |
Histogram of p-values from GWAS |
genotype_boxplots() |
Boxplots of phenotype values by genotype |
path_length_distribution() |
Dot Plot of Path Length Frequencies |
snarl_type_histogram() |
Dot Plot of snarl type histogram |
See the vignettes for examples on how to use it:
- Soon
A minimal example, to plot the QQ-plot and Manhattan plot, would look like this:
assoc = import_assoc('stoat_output/stoat.assoc.pvalues.tsv.gz')
qq_plot(assoc)
manhattan_plot(assoc)To speed up the visualization of associations, genotype_boxplots() extracts the relevant genotypes from an indexed and bgzipped TSV file.
To index a snarl_genotypes.tsv.gz (output of stoat vcf or stoat graph) with bgzip and tabix:
(zcat snarl_genotypes.tsv.gz | head -10000 | grep "^#"; zgrep -v "^#" snarl_genotypes.tsv.gz | sort -k3,3n -k4,4n -k5,5n) | bgzip > snarl_genotypes.sorted.tsv.gz
tabix -f -c "#" -s 3 -b 4 -e 5 snarl_genotypes.sorted.tsv.gzYou can then use the snarl_genotypes.sorted.tsv.gz file as input to the genotype_boxplots function (genotype_file parameter).
Feel free to open issues or submit pull requests. Contributions are welcome!
This package is licensed under the GNU General Public License v3.0 (GPL-3).