Description Usage Arguments Value Warning See Also Examples
Generates a diagram which displays multiple insertion events
(as displayed using the insertionDiagram
function) around a
central genome
1 2 3 4 5 | multipleInsertionDiagram(insertion_data, genome_ideogram_data,
either_side = "default", track_height = 0.15, style = 1,
colour_set = nice_colours, coverage_rectangle = NULL,
coverage_data = NULL, label_data = NULL, label_colour = "black",
label_size = 1, xaxis_spacing = "start_end")
|
insertion_data |
A |
genome_ideogram_data |
Either a |
either_side |
How much extra of the genome should be shown around the
insertion site. See |
track_height |
The height (vertical distance around the circle) that will be taken up by this track. Should be a number between 0 (none) and 1 (entire circle) that will apply to all of the events. |
style |
How the original sequence and insertions are positioned around
the circle (style 1, 2, 3 or 4). Please see the examples of the
|
colour_set |
The set of colours that will be used to create the
diagram. For simplicity, it isn't possible to specify precisely the colour
of each sector and link in the diagram (but you can easily edit them by
saving the diagram in a vectorised format and opening it in any vector
graphics editing program). See |
coverage_rectangle |
A vector containing the name(s) of any sector(s) that you would like to depict as 'coverage rectangles': filled in shapes that are a plot of the coverage data over that sector. See the example below or the vignette for an example of this. |
coverage_data |
A GRanges (or data frame) containing the coverage data
to plot for those sectors in |
label_data |
Data frame or GRanges containing the
labels. If a GRanges, |
label_colour |
Colour of the labels, can be either a single value (applied to all labels) or a vector with the same length as the number of labels (for colour-coding). |
label_size |
Size of the labels. |
xaxis_spacing |
Space between the x axis labels, in degrees. Alternatively, the string 'start_end' will place a label at the start and end of each sector only. Accepts only a single value which will be applied to all events. |
Generates an image of the multiple insertion events provided.
Due to space limitations, it isn't possible to display more than 8 events or more than 3 events in the same quarter of the circle. If you have more events than this, please consider splitting them across two or more figures.
insertionDiagram
for a function which generates the
figures for each of the individual events and gmovizInitialise
for the function which draws the central genome
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 | ## the data
ideogram_data <- GRanges(
seqnames=paste0('chr', 1:6), ranges=IRanges(start=rep(0, 6),
end=rep(12000, 6)))
insertion_data <- GRanges(
seqnames = c('chr1', 'chr5'),
ranges = IRanges(start = c(4000, 2000), end = c(4100, 2200)),
name = c('ins1', 'ins5'), length = c(100, 200))
## the plot
multipleInsertionDiagram(insertion_data=insertion_data,
genome_ideogram_data=ideogram_data)
## with coverage and labels
example_labels <- GRanges(seqnames=c('chr1', 'chr5'),
ranges=IRanges(start=c(4000, 2000),
end=c(4120, 2200)),
label=c('Gene A', 'Gene B'),
colour=c('red', 'blue'))
example_coverage <- GRanges(
seqnames = c(rep('chr1', 100), rep('chr5', 100)),
ranges = IRanges(start=c(seq(4000, 4099, length.out=100),
seq(2000, 2199, length.out=100)),
end=c(seq(4001, 4100, length.out=100),
seq(2001, 2200, length.out=100))),
coverage=c(runif(100, 0, 25), runif(100, 0, 15)))
multipleInsertionDiagram(insertion_data=insertion_data,
genome_ideogram_data=ideogram_data,
label_data=example_labels,
label_colour=example_labels$colour,
coverage_rectangle=c('chr1', 'chr5'),
coverage_data=example_coverage)
## changing either_side and style
either_side_GRange <- GRanges('chr5', IRanges(1000, 3200))
multipleInsertionDiagram(insertion_data=insertion_data,
genome_ideogram_data=ideogram_data,
style=c('ins1'=1, 'ins5'=4),
either_side=list('ins1'=500,
'ins5'=either_side_GRange))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.