| prepseudobulk | R Documentation |
Synthesize pseudo-bulk RNA-seq data for RNA reference generation.
prepseudobulk(
Seuratobj,
targetcelltypes = NULL,
celltypecolname = "annotation",
pseudobulknum = 10,
samplebalance = FALSE,
pseudobulkpercent = 0.9,
threads = 1,
savefile = FALSE
)
Seuratobj |
An object of class Seurat generated with the |
targetcelltypes |
The cell types in |
celltypecolname |
In the "meta.data" slot of |
pseudobulknum |
The scRNA-seq cell counts contained in |
samplebalance |
During generating the pseudo-bulk RNA-seq data, the number of single cells can be sampled is always different for each cell type. If want to adjust this bias and make the single cell numbers used to make pseudo-bulk RNA-seq data same for different cell types, set this parameter as TRUE. Then, the cell types with too many candidate cells will be down-sampled while the ones with much fewer cells will be over-sampled. The down-sampling is performed using bootstrapping, and the over-sampling is conducted with SMOTE (Synthetic Minority Over-sampling Technique). This is a time-consuming step and the default value of this parameter is FALSE. |
pseudobulkpercent |
If the parameter |
threads |
Number of threads need to be used. Its default value is 1. |
savefile |
Whether need to save the generated pseudo-bulk matrix as an rds file in the working directory automatically. Default is FALSE. |
A pseudo-bulk RNA-seq matrix with pseudo-bulk samples as columns and
genes as features. The gene values in this matrix are pseudo-bulk RNA-seq
read counts. This matrix can be transferred to the functions scRef,
scDeconv, or epDeconv. Their parameter pseudobulkdat
can accept this matrix, so that they can skip their own pseudo-bulk data
synthesis step and directly use this matrix as their pseudo-bulk data to
further generate the RNA deconvolution reference. Because if the scRNA-seq
dataset need to be converted to the RNA referece is large, generating the
pseudo-bulk data can be time-consuming and if the scRNA-seq data need to
be repeatedly used to deconvolve different datasets, to avoid repeating
this pseudo-bulk data generation process, this function can be used to
synthesize and save the data in advance, then the data can be repeatedly
used and the synthesis step can always be skipped.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.