plotDistance2Codon {ribosomeProfilingQC} | R Documentation

## Metaplot of P site distribution

### Description

Metaplot of P site distribution in all the CDS aligned by the start codon or stop codon.

### Usage

    plotDistance2Codon(
      reads,
      start = TRUE,
      anchor = 50,
      col = c(Frame_0 = "#009E73", Frame_1 = "#D55E00", Frame_2 = "#0072B2")
    )

### Arguments

`reads` | Output of assignReadingFrame.
`start` | Plot for start codon or stop codon.
`anchor` | The maximal xlim or (min, max) position for plot.
`col` | Colors for different reading frame.

### Value

Invisible height of the barplot.

### Examples

    pcs <- readRDS(system.file("extdata", "samplePc.rds",
                   package="ribosomeProfilingQC"))
    plotDistance2Codon(pcs)
    #plotDistance2Codon(pcs, start=FALSE)
    #plotDistance2Codon(pcs, anchor=c(-10, 20))

[Package ribosomeProfilingQC version 1.2.1 Index]