Description Usage Arguments Details Author(s) See Also Examples
Generates either X,Y or R,Theta cluster plots for specified SNP's.
1 2 3 4 5 6 7 8 9 10 11 | genoClusterPlot(intenData, genoData, plot.type = c("RTheta", "XY"),
snpID, main.txt = NULL, by.sex = FALSE,
scan.sel = NULL, scan.hilite = NULL,
start.axis.at.0 = FALSE,
colors = c("default", "neon", "primary"),
verbose = TRUE, ...)
genoClusterPlotByBatch(intenData, genoData, plot.type = c("RTheta", "XY"),
snpID, batchVar, main.txt = NULL, scan.sel = NULL,
colors = c("default", "neon", "primary"),
verbose = TRUE, ...)
|
intenData |
|
genoData |
|
plot.type |
The type of plots to generate. Possible values are "RTheta" (default) or "XY". |
snpID |
A numerical vector containing the SNP number for each plot. |
batchVar |
A character string indicating which annotation variable should be used as the batch. |
main.txt |
A character vector containing the title to give to each plot. |
by.sex |
Logical value specifying whether to indicate sex on the
plot. If |
scan.sel |
integer vector of scans to include in the plot. If |
scan.hilite |
integer vector of scans to highlight in the plot
with different colors. If |
start.axis.at.0 |
Logical for whether the min value of each axis should be 0. |
colors |
Color scheme to use for genotypes. "default" is colorblind safe (colorbrewer Set2), "neon" is bright orange/green/fuschia, and "primary" is red/green/blue. |
verbose |
Logical value specifying whether to show progress. |
... |
Other parameters to be passed directly to |
Either 'RTheta' (default) or 'XY' plots can be generated. R and Theta
values are computed from X and Y using the formulas r <- x+y
and
theta <- atan(y/x)*(2/pi)
.
If by.sex==TRUE
, females are indicated with circles and males
with crosses.
Caitlin McHugh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | # create data object
library(GWASdata)
data(illuminaScanADF, illuminaSnpADF)
xyfile <- system.file("extdata", "illumina_qxy.gds", package="GWASdata")
xy <- GdsIntensityReader(xyfile)
xyData <- IntensityData(xy, scanAnnot=illuminaScanADF, snpAnnot=illuminaSnpADF)
genofile <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
geno <- GdsGenotypeReader(genofile)
genoData <- GenotypeData(geno, scanAnnot=illuminaScanADF, snpAnnot=illuminaSnpADF)
# select first 9 snps
snpID <- illuminaSnpADF$snpID[1:9]
rsID <- illuminaSnpADF$rsID[1:9]
par(mfrow=c(3,3)) # plot 3x3
genoClusterPlot(xyData, genoData, snpID=snpID, main.txt=rsID)
# select samples
scan.sel <- illuminaScanADF$scanID[illuminaScanADF$race == "CEU"]
genoClusterPlot(xyData, genoData, snpID=snpID, main.txt=rsID,
scan.sel=scan.sel, by.sex=TRUE)
genoClusterPlot(xyData, genoData, snpID=snpID, main.txt=rsID,
scan.hilite=scan.sel)
close(xyData)
close(genoData)
## affy data - cluster plots by plate
data(affyScanADF, affySnpADF)
xyfile <- system.file("extdata", "affy_qxy.nc", package="GWASdata")
xy <- NcdfIntensityReader(xyfile)
xyData <- IntensityData(xy, scanAnnot=affyScanADF, snpAnnot=affySnpADF)
genofile <- system.file("extdata", "affy_geno.nc", package="GWASdata")
geno <- NcdfGenotypeReader(genofile)
genoData <- GenotypeData(geno, scanAnnot=affyScanADF, snpAnnot=affySnpADF)
# select first 9 snps
snpID <- affySnpADF$snpID[1:9]
rsID <- affySnpADF$rsID[1:9]
genoClusterPlotByBatch(xyData, genoData, snpID=snpID, main.txt=rsID,
batchVar="plate")
close(xyData)
close(genoData)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.