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) – a StereoExpData as reference data.

  • ref_use_col (str) – ref_use_col mean cluster-like or annotation result key in ref’s StereoExpData.tl.result.

  • cluster_res_key (Optional[str]) – test’s cluster-like key in StereoExpData.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 than max(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 create n_jobs num of threads to work.

  • res_key (str) – default to annotation, means the result will be stored as key annotation in the tl.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