getSignalVars {XBSeq} | R Documentation

## Estimate variance of the signal based on variance summation law

### Description

Based on variance of observed signal as well as background noise, estimate the variance of the true signal

### Usage

    getSignalVars(counts, bgcounts)

### Arguments

`counts` | A data frame or matrix which contains the observed signal (expression level) information for an experiment. Rows represent genes and Columns represent samples. Please refer details for more information.
`bgcounts` | A data frame or matrix which contains the background noise information for an experiment. Rows represent genes and Columns represent samples. Please refer details for more information.

### Details

Observed signal are the reads mapped to the exonic regions which can be obtained by applying HTSeq procedure with GTF files of exonic regions. Background noise are the reads mapped to the non-exonic regions which can be obtained by applying HTSeq procedure with GTF files of non-exonic regions we defined by certain criteria. Details regarding how to carry out the HTSeq procedure for observed signal as well as background noise can be found in the vignette of XBSeq. One example dataset is provided in `ExampleData`.

By assuming that the true signal and background noise are independent, the variance of the underneath signal (σ_s^2) can be estimated by applying variance summation law:

σ_s^2 = σ_x^2 + σ_b^2 - 2{ρ}{σ_x}{σ_b}

where σ_x^2 and σ_b^2 are variance for observed signal and background noise respectively.

### Value

A matrix with the same number of rows as `counts`. Rows represent the estimated variance of true signal for each gene.

### 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

`estimateSCV`

### Examples

       conditions <- factor(c(rep('C1', 3), rep('C2', 3)))
       data(ExampleData)
       data_var <- getSignalVars(Observed, Background)

[Package XBSeq version 1.20.0 Index]