mapStatsScopes {CAGEr} | R Documentation

## mapStats scopes

### Description

Functions implementing the `scope` parameter of the `mapStats` function.

### Usage

    msScope_counts(libs)

    msScope_mapped(libs)

    msScope_qc(libs)

    msScope_steps(libs)

    msScope_all(libs)

    msScope_annotation(libs)

### Arguments

`libs` | A data frame containing metadata describing samples in sequence libraries.

### Details

The `counts` scope reports the number of molecules aligning in promoter, exon, intron and otherwise intergenic. regions.

The `mapped` scope reports the number of molecules aligning in promoter, exon, intron and otherwise intergenic, plus the number of PCR duplicates (mapped tags minus molecule counts), plus the number of non-properly paired mapped tags.

The `qc` scope reports the number of tags removed as tag dust, rRNA, spikes, plus the unmapped tags, plus the number of non-properly paired mapped tags, plus the number of PCR duplicates (mapped tags minus molecule counts), plus the number of unique molecule counts.

The `steps` scope reports the number of tags removed by cleaning, mapping, and deduplication, plus the number of unique molecule counts.

The legacy `all` scope reports the number of tags in promoters, exons, introns, or mapped elswhere, or removed because they match rRNA or are likely primer artefacts, normalised by the total nubmer of extracted tags.

The legacy `annotation` scope reports the number of tags in promoters, exons, introns, or mapped elswhere, or removed because they match rRNA or are likely primer artefacts, normalised by the total nubmer of mapped tags.

### Value

Returns a list with three elements: `libs` contains a modified version of the input data frame where columns have been reorganised as needed, `colums` contains the names of the columns to use for plotting and provides the order of the stacked bars of the `plotAnnot` function, `total` indicates the total counts used for normalising the data.

[Package CAGEr version 1.28.0 Index]