XBplot {XBSeq} | R Documentation

## Examine the distribution of observed signal and background noise

### Description

Function to viewlize the distribution of observed signal X and background noise B across all genes for one specified sample

### Usage

    XBplot(XB, Samplenum = NULL, unit = c('counts', 'LogTPM'), Libsize = NULL, Genelength = NULL, xlab = 'log2 TPM', ylab = 'Frequencies', col = c('blue', 'red'), alpha =c(1, 0.6))

### Arguments

`XB` | An XBSeqDataSet object
`Samplenum` | An integer number to specify which sample to examine
`unit` | Whether to examine the distrbution in 'counts' unit or 'LogTPM' unit. 'LogTPM' is generally recommended
`Libsize` | A single integer indicating the library size of the sample. By default, the sum of all reads mapped to exonic regions are used.
`Genelength` | A numeric vector containing genelength information. Please make sure the length and order of the gene length information is the same as arrays in the XB object.
`xlab` | lab for x axis
`ylab` | Lable for y axis
`col` | A vector of two colours for observed signal and background noise
`alpha` | A vector of two numeric numbers indicating transparency

### Details

We strongly recommended users to apply XBplot to their datasets before differential expression analysis. According to our experience, for XBplot in 'logTPM' unit, the peak of distribution of background noise generally coinsides with the left hump of distribution of observed signal.

### Value

Plot of distribution of observed signal and background noise.

### Author(s)

Yuanhang Liu

### References

H. I. Chen, Y. Liu, Y. Zou, Z. Lai, D. Sarkar, Y. Huang, et al., "Differential expression analysis of RNA sequencing data by incorporating non-exonic mapped reads," BMC Genomics, vol. 16 Suppl 7, p. S14, Jun 11 2015.

### See Also

`ExampleData`

### Examples

       conditions <- c(rep('C1', 3), rep('C2', 3))
       data(ExampleData)
       XB <- XBSeqDataSet(Observed, Background, conditions)
       XBplot(XB, Samplenum = 1, unit = "LogTPM", Genelength = genelength[,2])

[Package XBSeq version 1.18.0 Index]