Description Usage Arguments Value Author(s) Examples
Setup parameters for plotting summaries along genome tracks.
Result from this function can be passed to set_track_parameters
1 2 3 4 5 6 7 8 9 10 11 12 | ## S4 method for signature 'SummarizedExperiment'
set_summary_parameters(object, ranges,
assay_name = assayNames(object)[1], groups = colnames(object),
colors = "blue", showlegend = length(colors) > 1, boxpoints = c("all",
"Outliers", "false"), pointpos = 0, ytitle = "Expression", width = 0.3)
## S4 method for signature 'RangedSummarizedExperiment'
set_summary_parameters(object,
ranges = rowRanges(object), assay_name = assayNames(object)[1],
groups = NULL, colors = "blue", showlegend = length(colors) > 1,
boxpoints = c("all", "Outliers", "false"), pointpos = 0,
ytitle = "Expression", width = 0.3)
|
object |
SummarizedExperiment |
ranges |
ranges corresponding to rows of object |
assay_name |
name of assay to use |
groups |
either vector of group assignments of name of column in object colData that corresponds to vector of group assignments |
colors |
colors to use |
showlegend |
show the legend? |
boxpoints |
plot individual points? |
pointpos |
relative position of points to boxes |
ytitle |
name for yaxis |
width |
relative width of summary plots when plotting tracks |
... |
additional arguments |
object storing summary parameters, for use in
set_track_parameters
Alicia Schep and Justin Finkle
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 | library(GenomicRanges)
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
## we'll read in some RNA counts
data(rpkm_chr21)
## From the ranges of the rpkm object, we'll pull out the tss
chr21_promoters <- promoters(SummarizedExperiment::rowRanges(rpkm_chr21),
up = 1000, down = 1000)
## set summary parameters
summary_params <- set_summary_parameters(rpkm_chr21,
groups = "GROUP", ranges = chr21_promoters)
## We'll also read in some track data to plot
genomation_dir <- system.file("extdata", package = "genomationData")
samp.file <- file.path(genomation_dir,'SamplesInfo.txt')
samp.info <- read.table(samp.file, header=TRUE, sep="\t",
stringsAsFactors = FALSE)
samp.info$fileName <- file.path(genomation_dir, samp.info$fileName)
## Make track plotter using summary parametrs
track_params <- set_track_parameters(samp.info$fileName[1:3],
annotation = TxDb.Hsapiens.UCSC.hg19.knownGene,
track_names = samp.info$sampleName[1:3],
share_y = TRUE,
summary = summary_params)
if (interactive()){
plot_tracks(rownames(rpkm_chr21)[1:3], track_params)
plot(chr21_promoters[1:3], track_params)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.