stereo.algorithm.single_r.SingleR.main#
- SingleR.main(ref_exp_data, ref_use_col='celltype', cluster_res_key=None, quantile=80, fine_tune_threshold=0.05, fine_tune_times=0, n_jobs=1, res_key='annotation', method='default', gpuid=0)[source]#
Single-cell recognition is a tool to automatically annotate a test sample by a reference sample.
- Parameters:
ref_exp_data (
StereoExpData
) – aStereoExpData
as reference data.ref_use_col (
str
) –ref_use_col
mean cluster-like or annotation result key in ref’sStereoExpData.tl.result
.cluster_res_key (
Optional
[str
]) – test’s cluster-like key inStereoExpData.tl.result
, If cluster_res_key is set, CPU will be used by default regardless of whether gpu acceleration is set or not.quantile (
int
) – quantile will influence scoring and fine_tune result.fine_tune_threshold (
float
) – while in fine_tuning, if result greater thanmax(result) - fine_tune_threshold
, will be filtered.fine_tune_times (
int
) – default to 0, meaning that it will fine_tune until results decreasing to only 1. If it is set to num(eg: 5), it will only loop only 5 times, and choose the first one.n_jobs (
int
) –joblib
parameter, will createn_jobs
num of threads to work.res_key (
str
) – default toannotation
, means the result will be stored as keyannotation
in thetl.result
.methods – whether to use GPU acceleration, if methods is
rapids
, it means using, It is not used by default.gpuid (
int
) – slots used by gpu, default to 0.
- Returns:
pandas.DataFrame