scBatchCpp: Correct RNA-seq count matrix subject to batch effects by...

Description Usage Arguments Value Author(s) References

View source: R/RcppExports.R

Description

Use gradient descent algorithm to correct count matrix by linear transformation based on known sample matrix correction.

Usage

1
scBatchCpp(c, w, d, m, max, step, tol, derif, verbose)

Arguments

c

The original p*n batch effect data with n subjects and p RNA-seq measurements.

w

An initial n*n weight matrix to conduct linear transformation. An usual choice is the identity matrix if not specified.

d

The n*n distance matrix obtained by QuantNorm.

m

Number of groups to be divided for coordinate gradient descent. 1 < m <= n.

max

Maximum number of the iteration if the tolerance is not reached.

step

Step size of the gradient descent algorithm.

tol

Stopping criteria of the algorithm. The algorithm stops if the step size is smaller than tol.

derif

Function to compute gradient of the loss function. For Pearson distance, use scBatch::derif.

verbose

Whether output the loss function after each iteration.

Value

Returns the corrected count matrix.

Author(s)

Teng Fei. Email: tfei@emory.edu

References

Fei and Yu (2020). scBatch: batch-effect correction of RNA-seq data through sample distance matrix adjustment. Bioinformatics, 36(10), 3115-3123. <https://doi.org/10.1093/bioinformatics/btaa097>


tengfei-emory/scBatch documentation built on June 6, 2021, 10:22 p.m.