Description Usage Arguments Value Author(s) References
Use gradient descent algorithm to correct count matrix by linear transformation based on known sample matrix correction.
1 | scBatchCpp(c, w, d, m, max, step, tol, derif, verbose)
|
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. |
Returns the corrected count matrix.
Teng Fei. Email: tfei@emory.edu
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>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.