plotChimeras {CrispRVariants} | R Documentation

## Display a dot plot of chimeric alignments

### Description

Produces a dot plot of a set of chimeric alignments. For chimeric alignments, a single read is split into several, possibly overlapping alignmed blocks. Aligned sections of chimeric reads can be separated by large genomic distances, or on separate chromosomes. plotChimeras produces a dot plot, each aligned block highlighted, and chromosomes shown in different colours. Large gaps between aligned segments are collapsed and indicated on the plot with horizontal lines. The X-axis shows each base of the entire read. Note that the mapping to the fwd strand is shown if all strands agree. The chimeric alignments must be sorted!

### Usage

    plotChimeras(chimeric.alns, max.gap = 10, tick.sep = 20, text.size = 10,
      title.size = 16, gap.pad = 20, legend.title = "Chromosome",
      xangle = 90, wrt.forward = FALSE, annotate.within = 20,
      annotations = GenomicRanges::GRanges())

### Arguments

`chimeric.alns` | A GAlignments object containing only the chimeric reads to be plotted
`max.gap` | If aligned segments are separated by more than max.gap,
`tick.sep` | How many bases should separate tick labels on plot. Default 20.
`text.size` | Size of X and Y tick labels on plot. Default 12
`title.size` | Size of X and Y axis labels on plot. Default 16
`gap.pad` | How much should aligned blocks be separated by? (Default: 20)
`legend.title` | Title for the legend. Default "Chromosome"
`xangle` | Angle for x axis text (Default 90, i.e vertical)
`wrt.forward` | Should chimeric alignments where all members map to the negative strand be displayed with respect to the forward strand, i.e. as the cigar strand is written (TRUE), or the negative strand (FALSE) (Default: FALSE)
`annotate.within` | annot_aln ranges in "annotations" within n bases of a chimeric alignment (Default 50)
`annotations` | A list of GRanges. Any that overlap with the chimeric alignments are highlighed in the plot.

### Value

A ggplot2 dotplot of the chimeric alignments versus the reference sequence

### Author(s)

Helen Lindsay

### See Also

`findChimeras` for finding chimeric alignment sets.

### Examples

    bam_fname <- system.file("extdata", "gol_F1_clutch_2_embryo_4_s.bam",
                             package = "CrispRVariants")
    bam <- GenomicAlignments::readGAlignments(bam_fname, use.names = TRUE)
    # Choose a single chimeric read set to plot:
    chimeras <- bam[names(bam) == "AB3092"]

    # This read aligns in 3 pieces, all on chromosome 18.
    # The plot shows the alignment annot_alns a small duplication and
    # a long gap.
    plotChimeras(chimeras)

[Package CrispRVariants version 1.10.1 Index]