initTile {iGenomicViewer} | R Documentation |
The initTile function creates a tiled display image 'TIplot' object. A TIplot object holds all necessary elements to make a tiled display plot.
initTile(Z, bacDX, goodDX=NA, mapObj=NA, H=2, zlims=c(-0.5,0.5), smplDX=NA, ylabels=NA, xlabels=NA, x.axis.cex =0.5, y.axis.cex =0.5, xlab="samples", ylab="BAC location", ttl=NA, returnVl=TRUE, saveFlag=FALSE, saveName="TIplot.RData")
Z |
matrix of values for image. The number of rows and columns should be equal to the lenghts of bacDX and smplDX. If the matrix is larger the matrix will be subset based on bacDX and smplDX |
bacDX |
index of spot.ID's to graph. should correspond to index in mapObj. This will be used to determine the genomic start and stopping location of the plot |
goodDX |
range of acceptable y values. This is used as a way to removed spots of known bad quality. should correspond to locations in the mapObj$mapping.info object |
mapObj |
an object of the class mapobj. This object should be made with genomic starting and stopping locations not a central location |
H |
number of tracks to display per sample |
zlims |
minimum and maximum range for values in Z |
smplDX |
subset for x axis. If the second dimension of Z is larger than or equal to the length of smplDX, Z will be subset based on this index |
ylabels |
vector indicating labels for Y axis. Should be equal in length to the number of rows in Z [or Y] |
xlabels |
vector indicating labels for X axis. Should be equal in length to the number of columns in Z |
x.axis.cex |
display size of xlabels |
y.axis.cex |
display size of ylabels |
xlab |
main x axis label for plot |
ylab |
main y axis label for plot |
ttl |
main title for plot |
returnVl |
Should TIplot object be returned |
saveFlag |
Should TIplot object be saved |
saveName |
If saveFlag, path file name to save object |
The initTile function creates a tiled display image 'TIplot' object. A TIplot object holds all necessary elements to make a tiled display plot. The function takes in a matrix of values to display as a tiled image, Z,and a bacDX indicating the spot.IDs that should be used and correspond to the rows of Z. If Z has more rows than the length of bacDX, it is assumed that Z should be subset based on bacDX. The bacDX should refer to spot.IDs given in a mapObj. If no mapObj is used, the default package mapObj is used. It is also possible to subset Z based on a smplDX. If no smplDX is given it is assumed that all columns of Z should be used. The reasoning behind the tiled image is that there are spot.ID, BAC clones, etc. that span the genome. The different regions may overlap or not include certain regions across the entire genome. This viewer breaks the spot.IDs to show how they are covering a particular region.
If returnVl, an object of the class 'TIplot'
Assumes genomic location values on Y axis and samples on X axis
Lori A. Shepherd, Daniel P. Gaile
convertLoc
, TIplot
,
makeTile
, iGGVtiled
library("iGenomicViewer") # load data objects data(iGGVex) data(mapping.info) mapObj = mapping.info # create a subset range bacDX = 103:112 smplDX = 1:10 Z = mat[bacDX,smplDX] # make object TIplot = initTile(Z=Z, bacDX=bacDX, mapObj=mapObj, H=3,zlims=c(-0.5,0.5), ylabels=paste("Spot",bacDX, sep=""), xlabels=paste("smp",smplDX, sep=""), xlab="Samples", ylab="SpotID", ttl="tiledImage", returnVl=TRUE, saveFlag=FALSE, saveName="TIplot.RData")