DensityContainer
.
plotTV( ..., regions, gtf=NA, scale="global", cluster="none", control = F, peak_windows = 0, ex_windows=100,
bin_method="mean", show_names=T, label_size=1, zero_alpha=0.5, colr=c("white","blue", "red"),
colr_df="redgreen", colour_spread=c(0.05,0.05), key_limit="auto", key_limit_rna="auto",
set_zero="center", rowv=NA, gclust="peaks", norm_readc=T, no_key=F, stranded_peak=T,
ck_size=c(2,1), remove_lowex=0, verbose=1, showPlot=T, name_width=2, pre_mRNA=F)
matrix
can be supplied. The elements will be plotted in the order they were passed with the expression profiles and the peak profiles on the right hand and the left hand side respectively. The spliced slot determines about the kind of plot. If a matrix
is provided, it will be plotted as a heatmap.
gtf2gr
.
cluster
defining the amount of clusters. A colour coded bar will be plotted to the left. For hierarchical clustering the options hc_sp and hc_pe for spearman or pearson correlation coefficient based distances respectively, or hc_rm for distances based on row means are accepted and the results will be displayed as a dendrogram.
plotTV(ex1.ChIP,ex2.ChIP,ex3.RNA_KO,control=c(ex1.Input,ex2.Input,ex3.RNA_WT)
. The content will be treated as background densities and subtracted from the matching experiment.
TRUE
, peak labels and transcript IDs will be displayed on the left and the right of the plot respectively.
matrix
is provided and uses greenred(100)
from gplots by default. If changed, the arguments should be formatted analogous to colr
.
bin_method
.
bin_method
.
cluster
is not set to none, this character string determines the cluster group. If set to expression or peaks, only the expression profile or peak profile data sets will be used to perform the clustering respectively. All data sets passed will be reordered based on the results of the clustering. If set to both, all data sets will be treated as one matrix and clustered altogether.
TRUE
, all sample groups will be normalized based on the map mass which is defined here as all mapped reads after quality filtering multiplied by their individual read length.
TRUE
, no color keys will be displayed.
TRUE
and strand informations are provided in regions
, peak profiles will flipped if located on the negative strand.
c(height,width)
FALSE
, plotting will be suppressed and only the TVResults will be returned.
Plots a false color image using the image
function similar to heatmap.2
of gplots but based on read densities.
There are 2 different kind of plots, that can be combined or plotted individually: expression profiles and peak profiles.
FALSE
. The image consists of color coded, optionally total read normalized read pileups as a stacked false color image with one peak per row. The size of the peaks is soleley relying on the genomic range passed with peaks
. If strand information is available through peaks
, all peaks on the reverse strand will be reversed.
TRUE
, an expression profile will be plotted. First, each expression profile will be normalized to the total amount of reads of the source BAM/SAM file and reduced to ex_windows
as calculated by the approx
function. The optional clustering will then be performed and subsequently all expression profiles will be scaled across rows so that each row has a mean of zero and standard deviation of one.
TRUE
, one matrix
can be provided. The data will be scaled analogous to Expression profile plots and plotted as a heatmap using the image
command.
TRUE
or a matrix
are combined with DensityContainer with the spliced slot set to FALSE
, the peak profiles will be plotted on the left and the expression plots will be plotted on the right. The gclust
argument determines the clustered groups.
exbam<-dir(system.file("extdata", package="TransView"),full=TRUE,patt="bam$")
exls<-dir(system.file("extdata", package="TransView"),full=TRUE,patt="xls$")
exden.ctrl<-parseReads(exbam[1],verbose=0)
exden.chip<-parseReads(exbam[2],verbose=0)
peaks<-macs2gr(exls,psize=500)
cluster_res<-plotTV(exden.chip,exden.ctrl,regions=peaks,cluster=5,norm_readc=FALSE,showPlot=FALSE)
summary(cluster_res)
Run the code above in your browser using DataLab