Description Usage Arguments Details Value Note Author(s) See Also Examples
Visualise reads aligned to genome intervals
1 2 3 4 5 6 | plotAligned(x, y, chr, start, end, plus.col = "#00441b",
minus.col = "#283d78", gff, featureLegend = FALSE,
gffChrColumn = "seq_name", gffTypeColumn="type",
gffNameColumn="ID",
featureExclude = c("chromosome", "nucleotide_match", "insertion"),
showStrands="both", extraColors=NULL, ylim, highlight, main, ...)
|
x |
Object of class |
y |
This argument is only specified for compatibility with plot.default and not used in the function. |
chr |
string; on which chromosome is the region to plot |
start |
integer; start coordinate of the chromosome region to plot |
end |
integer; end coordinate of the chromosome region to plot |
plus.col |
which colour to use for the reads on the Plus strand |
minus.col |
which colour to use for the reads on the Plus strand |
gff |
Data frame containing annotation for genomic feature to be used to further annotate the plot. Note that it must include a column called “type” that indicates the type of each genomic feature (e.g. miRNA, gene etc.). |
featureLegend |
logical; should a legend that describes the colour code for the annotated genome features be appended at the bottom of the plot? |
gffChrColumn |
string; which column of the |
gffTypeColumn |
string; which column of the |
gffNameColumn |
what is the column of the gff data.frame called that holds the identifier of the element that should be displayed in the plot; default: “name” |
featureExclude |
character; which kinds of annotated genome
features specified in the |
showStrands |
string; which strands to show in the plot; defaults to “both”, but users can specify to show only the reads on “plus” or “minus” strand |
extraColors |
named character vector which allows the user to specify custom colours for feature types; colours must be specified in RGB format as hexadecimal strings starting with “#”, e.g. “#addfff” for light-blue |
ylim |
range of read numbers to plot (y-axis limits); if not specified they are computed from the data in the specified region |
highlight |
currently unused |
main |
string; main title to use for the plot |
... |
further arguments passed on to the more primitive plotting functions used |
This function implements the plot
method for objects
of class AlignedGenomeIntervals
.
Returns NULL
; this function is called for the side-effect of
creating the plot.
This function was inspired by and borrows source code from the
function plotAlongChrom
in package tilingArray
Joern Toedling, Wolfgang Huber
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 | A <- AlignedGenomeIntervals(
start=c(1,8,10,20), end=c(5,15,16,25),
chromosome=rep("chr1", each=4),
strand=c("+","+","+","+"),
sequence=c("ACATT","TATCGGAC","TCGGACT","GTAACG"),
reads=c(5L, 2L, 4L, 7L) )
M2 <- new("Genome_intervals_stranded",
rbind(c(2,6), c(1,15), c(20,30)),
closed = matrix(TRUE, ncol=2, nrow=3),
annotation = data.frame(
seq_name= factor(rep("chr1", 3)),
inter_base= logical(3),
strand=factor(rep("+", 3), levels=c("+","-")),
alias=c("miRNA1","gene1","tRNA1"),
type=c("miRNA","gene","tRNA")) )
if (interactive())
plot(A, M2, chr="chr1", start=0, end=35,
nameColum="alias", showStrands="plus")
if (interactive())
## use 'extraColors' to replace default colours (or to add new ones):
plot(A, M2, chr="chr1", start=0, end=35, nameColum="alias",
showStrands="plus", extraColors=c("tRNA"="#6666DD"))
## See also the examples in the vignette and on the manual page
## of the class 'AlignedGenomeIntervals'
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.