snp.plot | R Documentation |
Lower level function that makes a tile plot the given SNPs with the major allele colored dark and the minor allele light. Optionally, add SNPs that match a certain pattern and genes and a QTL score.
snp.plot(variants, col = c("black", "grey50", "white"), cluster = TRUE, ref, highlight,
pattern.snps, mgi, qtl)
variants |
Data.frame with variants as returned by |
col |
Color vector with SNP colors for no call, alternate allele and reference allele. |
cluster |
Boolean that indicates if the strains should be clustered. |
ref |
Chracter that is the reference strain to use. Must be present in the strains in variants. |
highlight |
Character vector with strain names to highlight in the plot. Strain names must be present in the strains in variants. |
pattern.snps |
Data.frame with SNPs that match some pattern. These will be plotted below the SNPs. |
mgi |
Data.frame with genes in the interval to be plotted. |
qtl |
data.frame with QTL values containing the chromosome, bp position and QTL score in column 1 to 3. Default = NULL. |
Different strains can be used as the reference strain by using the ref argument. Otherwise, the major allele is plotted dark and the minor allele lighter. The QTL values will be scaled within the plotting interval and drawn with black (low) and red (high). If a strain pattern is provided, the SNPs matching the pattern are plotted in orange and any genes that they intersect with are also colored orange. Otherwise, genes are colored blue.
Produces a tile plot with the locations along the horizontal axis and the strains in the SNP matrix along the vertical axis. Also, if a set of strains is given in the pattern argument, the SNPs that match that pattern are returned, categorized according to which gene they lie within.
Daniel Gatti
variant.plot
, get.mgi.features
, categorize.variants
## Not run:
data(qtl)
strains = get.strains()
variants = get.variants(chr = 7, start = 103, end = 105,
strains = strains[c(2,4,8,10,15:18)])
pattern.snps = get.pattern.variants(variants, strain.subset = c("C57BL/6J", "NOD/ShiLtJ",
"NZO/HlLtJ"))
mgi = get.mgi.features(chr = 7, start = 103, end = 105, source = "MGI", type = "gene")
variants = convert.variants.to.numeric(variants)
snp.plot(variants = variants, pattern.snps = pattern.snps, mgi = mgi, qtl = qtl)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.