Modified version of qtl2's plot_snpasso()
function to allow plotting of the haplotype's QTL peak (assuming the region is set around the peak) and to easily identify which gene the SNP with the highest LOD score overlap. A solid black vertical line represents the haplotype's QTL peak, while a solid violet-red line represents the SNP with the highest LOD score. An optional parameter, haplo_peak_drop, will plot dashed black lines to indicate the region where the haplotype's LOD score is within a certain drop of its QTL peak. If this paramter is given values, two violet-red lines may be plotted. One violet-red line is the SNP with the maximum LOD score within the QTL peak drop region and the second violet-red line is the SNP with the maximum LOD outside of the QTL peak drop region (only if the SNP inside the region does not have the overall maximum LOD score). Multiple lines may be plotted if multiple SNPs have the maximum LOD score. A second optional parameter, haplo_scan, allows plotting of the scan1()
output around the genomic interval after the scan1 object is filtered with scan1_snpasso_rng()
.
1 2 3 4 5 |
scan1output |
Output of |
snpinfo |
Data frame with SNP information with the following
columns (the last three are generally derived from with
|
max_peak |
Numeric value in Mbps of the location of the haplotype's QTL peak. This can be obtained from |
haplo_peak_drop |
A vector of length two containing the range of Mbps that have LOD scores within the QTL peak drop. This vector should be the output from |
haplo_scan |
A dataframe containing the haplotype's LOD score and position around the genomic interval. The first column should contain the haplotype's LOD score, while the second column should be titled 'pos' and contain the Mbps positions. This dataframe should be the output from |
genes |
Optional data frame containing gene information for
the region, with columns |
lodcolumn |
LOD score column to plot (a numeric index, or a character string for a column name). Only one value allowed. |
show_all_snps |
If TRUE, expand to show all SNPs. |
chr |
Vector of character strings with chromosome IDs to plot. |
add |
If TRUE, add to current plot (must have same map and chromosomes). |
drop_hilit |
SNPs with LOD score within this amount of the maximum SNP association will be highlighted. |
col_hilit |
Color of highlighted points |
col |
Color of other points |
gap |
Gap between chromosomes. |
minlod |
Minimum LOD to display. (Mostly for GWAS, in which
case using |
... |
Additional graphics parameters. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.