heatMapRegion {ORFik} | R Documentation

## Create heatmap around specified position

### Description

Simplified input space for easier abstraction of coverage heatmaps
Pick your region and plot
Input CAGE file if you use TSS and want improved 5' annotation.

### Usage

    heatMapRegion(
      df,
      region = "TIS",
      outdir = "default",
      scores = c("transcriptNormalized", "sum"),
      type = "ofst",
      cage = NULL,
      format = ".png",
      acceptedLengths = 21:75,
      upstream = c(50, 30),
      downstream = c(29, 69),
      shifting = c("5prime", "3prime")
    )

### Arguments

`df` | an ORFik `experiment`
`region` | a character, default "TIS", can be any combination of the set: c("TSS", "TIS", "TTS"), which are: Transcription start site (5' end of mrna), Translation initation site (5' end of CDS), Translation termination site (3' end of CDS)
`outdir` | a character path, default: "default", saves to: `paste0(dirname(df$filepath[1]), "/QC_STATS/heatmaps/")`, a created folder within the ORFik experiment data folder for plots. Change if you want custom location.
`scores` | character vector, default c("transcriptNormalized", "sum"), either of zscore, transcriptNormalized, sum, mean, median, .. see ?coverageScorings for info and more alternatives.
`type` | character, default: "ofst". Type of library: either "default", usually bam format (the one you gave to experiment), "pshifted" pshifted reads, "ofst", "bed", "bedo" optimized bed, or "wig"
`cage` | a character path to library file or a `GRanges`, `GAlignments` preloaded file of CAGE data. Only used if "TSS" is defined as region, to redefine 5' leaders.
`format` | a character, default ".png", alternative ".pdf"
`acceptedLengths` | an integer vector (NULL), the read lengths accepted. Default NULL, means all lengths accepted.
`upstream` | 2 integers, default c(50, 30), how long upstream from 0 should window extend (first index is 5' end extension, second is 3' end extension)
`downstream` | 2 integers, default c(29, 69), how long upstream from 0 should window extend (first index is 5' end extension, second is 3' end extension)
`shifting` | a character, default c("5prime", "3prime"), can also be either or NULL (no shifting of reads)

### Value

invisible(NULL), plots are saved

### See Also

Other heatmaps: `coverageHeatMap()`, `heatMapL()`, `heatMap_single()`

### Examples

    df <- ORFik.template.experiment()[3,] # Only third library
    #heatMapRegion(df, "TIS", outdir = "PATH/TO/SAVE/)
    # Do also TSS, add cage for specific TSS
    # heatMapRegion(df, c("TSS", "TIS"), cage = "path/to/cage.bed")

    # Do on pshifted reads instead of original files
    # outputLibs(df, type = "pshifted")
    # heatMapRegion(df, "TIS")

[Package ORFik version 1.8.6 Index]