internal: Internal functions of scClassifR package

Description Usage Arguments Value

Description

Check if a scClassifR object is valid

Filter cells from ambiguous chars and non applicable cells in a Seurat object

Filter cells from ambiguous chars and non applicable cells in a SingleCellExperiment object

Construct a uniform tag vector for all forms of labels in a Seurat object

Construct a uniform tag vector for all forms of labels in a SingleCellExperiment object

Process parent classifier in a Seurat object

Process parent classifier in a SingleCellExperiment object

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
checkObjectValidity(object)

checkCellTypeValidity(cell_type)

checkFeaturesValidity(features)

checkParentValidity(parent)

checkPThresValidity(p_thres)

checkClassifierValidity(clf)

parent(classifier) <- value

clf(classifier) <- value

features(classifier) <- value

balance_dataset(mat, tag)

train_func(mat, tag)

transform_to_zscore(mat)

load_models(path_to_models)

select_features(mat, features)

check_parent_child_coherence(
  obj,
  pos_parent,
  parent_cell,
  cell_type,
  target_cell_type,
  ...
)

filter_cells(obj, tag_slot)

## S4 method for signature 'Seurat'
filter_cells(obj, tag_slot)

## S4 method for signature 'SingleCellExperiment'
filter_cells(obj, tag_slot)

construct_tag_vect(obj, cell_type, ...)

## S4 method for signature 'Seurat'
construct_tag_vect(obj, cell_type, tag_slot)

## S4 method for signature 'SingleCellExperiment'
construct_tag_vect(obj, cell_type, tag_slot)

process_parent_clf(
  obj,
  parent_tag_slot,
  parent_cell_type,
  parent_clf,
  path_to_models,
  zscore = TRUE,
  ...
)

## S4 method for signature 'Seurat'
process_parent_clf(
  obj,
  parent_tag_slot,
  parent_cell_type,
  parent_clf,
  path_to_models,
  zscore = TRUE,
  seurat_assay,
  seurat_slot,
  ...
)

## S4 method for signature 'SingleCellExperiment'
process_parent_clf(
  obj,
  parent_tag_slot,
  parent_cell_type,
  parent_clf,
  path_to_models,
  zscore = TRUE,
  sce_assay,
  ...
)

make_prediction(mat, classifier, pred_cells, ignore_ambiguous_result = TRUE)

simplify_prediction(meta.data, full_pred, classifiers)

verify_parent(mat, classifier, meta.data)

test_performance(mat, classifier, tag)

classify_clust(clusts, most_probable_cell_type)

Arguments

object

The request classifier to check.

cell_type

name of cell type

features

list of selected features

parent

Classifier parent to check.

p_thres

Classifier probability threshold to check.

clf

Classifier to check.

classifier

classifier

value

the new classifier

mat

expression matrix

tag

tag of data

path_to_models

path to databases, or by default

obj

object

pos_parent

a vector indicating parent clf prediction

parent_cell

name of parent cell type

target_cell_type

alternative cell types (in case of testing clf)

...

arguments passed to other methods

tag_slot

tag slot in SingleCellExperiment object indicating cell type

parent_tag_slot

string, name of annotation tag slot in object indicating pre-assigned/predicted parent cell type

parent_cell_type

name of parent cell type

parent_clf

scClassifR object corresponding to classification model for the parent cell type

zscore

boolean indicating the transformation of gene expression in object to zscore or not

seurat_assay

name of assay to use in Seurat object

seurat_slot

type of expression data to use in Seurat object

sce_assay

name of assay to use in SingleCellExperiment object

pred_cells

a whole prediction for all cells

ignore_ambiguous_result

whether ignore ambigouous result

meta.data

object meta data

full_pred

full prediction

classifiers

classifiers

clusts

cluster info

most_probable_cell_type

predicted cell type

Value

TRUE if the classifier is valid or the reason why it is not

TRUE if the cell type is valid or the reason why it is not.

TRUE if the features is valid or the reason why it is not.

TRUE if the parent is valid or the reason why it is not.

TRUE if the p_thres is valid or the reason why it is not.

TRUE if the classifier is valid or the reason why it is not.

scClassifR object with the new parent.

scClassifR object with the new trained classifier.

scClassifR object with the new features.

a list of balanced count matrix and corresponding tags of balanced count matrix

the classification model (caret object)

row wise center-scaled count matrix

list of classifiers

filtered matrix

list of adjusted object and adjusted tag slot

adjusted Seurat object

adjusted SingleCellExperiment object

a binary vector for cell tag

list of cells which are positive to parent clf

prediction

simplified prediction

applicable matrix

clf performance


grisslab/scClassifR documentation built on Oct. 27, 2021, 12:13 p.m.