transcriptWindow {ORFik} | R Documentation

## Make 100 bases size meta window for all libraries in experiment

### Description

Gives you binned meta coverage plots, either saved seperatly or all in one.

### Usage

    transcriptWindow(
      leaders,
      cds,
      trailers,
      df,
      outdir = NULL,
      scores = c("sum", "zscore"),
      allTogether = TRUE,
      colors = rep("skyblue4", nrow(df)),
      title = "Coverage metaplot",
      windowSize = min(100, min(widthPerGroup(leaders, FALSE)), min(widthPerGroup(cds,
        FALSE)), min(widthPerGroup(trailers, FALSE))),
      returnPlot = FALSE,
      dfr = NULL,
      idName = ""
    )

### Arguments

`leaders` | a `GRangesList` of leaders (5' UTRs)
`cds` | a `GRangesList` of coding sequences
`trailers` | a `GRangesList` of trailers (3' UTRs)
`df` | an ORFik `experiment`
`outdir` | directory to save to (default: NULL, no saving)
`scores` | scoring function (default: c("sum", "zscore")), see ?coverageScorings for possible scores.
`allTogether` | plot all coverage plots in 1 output? (defualt: TRUE)
`colors` | Which colors to use, default (skyblue4)
`title` | title of ggplot
`windowSize` | size of binned windows, default: 100
`returnPlot` | return plot from function, default False
`dfr` | an ORFik `experiment` of RNA-seq to normalize against
`idName` | A character ID to add to saved name of plot, if you make several plots in the same folder, and same experiment, like splitting transcripts in two groups like targets / nontargets etc. (default: "")

### Value

NULL, or ggplot object if returnPlot is TRUE

### Examples

    # Make ORFik experiment
    dir <- system.file("extdata", "", package = "ORFik")
    # 2. Pick an experiment name
    exper <- "ORFik"
    # 3. Pick .gff/.gtf location
    txdb <- system.file("extdata", "annotations.gtf", package = "ORFik")
    template <- create.experiment(dir = dir, exper, txdb = txdb,
                                  viewTemplate = FALSE)
    template$X5[6] <- "heart" # <- fix non unique row
    # read experiment
    df <- read.experiment(template)
    loadRegions(df) # Load leader, cds and trailers as GRangesList
    #transcriptWindow(leaders, cds, trailers, df, outdir = "directory_to_save")

[Package ORFik version 1.6.9 Index]