GenerateNull: Generate a list of null sites.

Description Usage Arguments Details Value Author(s) Examples

View source: R/methods.R

Description

Generate a list of null sites. See 'Details'.

Usage

1
2
GenerateNull(txLoc, id = NULL, method = c("ntAbund", "perm"),
  nt = "C", showPb = TRUE)

Arguments

txLoc

A txLoc object.

id

A character string; identifier for null sites; if NULL then id = "null"; default is NULL.

method

A character string; specifies the method used to the generate null distribution; if method == "ntAbund" the position of all nucleotides specified by nt will be used as null sites; if method == "perm" (DEPRECATED, see 'Details') then null sites will be generated by uniform-randomly shuffling candidatepositions from locus within the corresponding transcript region; default is "ntAbund".

nt

A single character; if method == "ntAbund", use nt to derive distribution of null sites.

showPb

A logical scalar; if TRUE show a progress bar; default is TRUE.

Details

The function generates a null distribution of single-nucleotide sites across different transcript sections, and returns a txLoc object. Two different methods can be employed:

  1. method = "ntAbund": Null sites are generated based on the position of all non-modified nucleotides of type nt in those transcript sections that also contain a modified site of the same type and as specified in locus. For example, if locus contains a list of m$^6$A sites, the list of null sites consists of all non-methylated adenosines in those transcripts that contain at least one m$^6$A site.

  2. method = "perm": Null sites are generated by randomly permuting the position of sites from locus uniformly within the corresponding transcript section. Note that this will generate a list of null sites with the same abundance ratios across transcript sections as the list of sites from locus. It is therefore not useful for assessing an enrichment of sites within a particular transcript section. In fact, this method should not be used and is included purely for paedagogical purposes (to demonstrate the importance of a sensible null distribution). It is likely that this method will be removed from future RNAModR versions.

It is import to emphasise that any downstream enrichment analysis may depend critically on the choice of the null distribution. For example, a position permution-based null distribution may not be a valid null distribution, if the distribution of nucleotides is highly non-uniform across a transcript section. This is the case e.g. for the spatial distribution of cytosines within and across the 5'UTR, CDS and/or 3'UTR. In this case, a permutation- based distribution of cytosines will not give a sensible null distribution. Instead, a sensible null distribution can be derived from the position of all cytosines in the relevant transcript region containing the methylated cytosine site in locus. method = "ntAbund" generates a list of null sites using this approach.

Value

A txLoc object. See 'Details'.

Author(s)

Maurits Evers, maurits.evers@anu.edu.au

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
bedFile <- system.file("extdata",
                       "miCLIP_m6A_Linder2015_hg38.bed",
                       package = "RNAModR")
sites <- ReadBED(bedFile)
posSites <- SmartMap(sites, id = "m6A", refGenome = "hg38")
negSites <- GenerateNull(posSites, method = "ntAbund", nt = "A")

## End(Not run)

mevers/RNAModR documentation built on Nov. 17, 2019, 9:11 a.m.