Introduction

Summary

scAnnotate is a supervised machine learning model for cell-type annotation.

For more details, see our paper: [scAnnotate: an automated cell type annotation tool for single-cell RNA-sequencing data].

Application of scAnnotate

For this tutorial, we’ll work with two subsets of the human Peripheral Blood Mononuclear Cells (PBMC) scRNA-seq dataset from the SeuratData package that were sequenced using two different platforms.

First, we’ll load the scAnnotate package.

library(scAnnotate)

Setting up the data

We assume that you have log-transformed (i.e. size-factor normalized) matrices for both the training and testing data, where each row is a cell and each column is a gene.

data(pbmc1)
data(pbmc2)

The example datasets are already log-transformed and normalized. You can find more details about the example datasets by typing the following commands into the R console:

?pbmc1
?pbmc2

Training and annotation

scAnnotate has two separate workflows with different batch effect removal steps based on the size of the training data. We suggest using Seurat for dataset with at most one rare cell population (at most one cell population less than 100 cells) and using Harmony for dataset with at least two rare cell populations (at least two cell populations less than 100 cells).

Our example datasets are already log-transformed and normalized.

Suppose your input gene expression data is in raw counts. In that case, our software will normalize the raw input data using the NormalizeData function from the Seurat package, via the “LogNormalize” method and a scale factor of 10,000. That normalizes the gene expression by each cell’s “sequencing depth” and applies a natural logarithmic transformation. When you input raw data, you should choose the parameter lognormalized=FALSE using the scAnnotate functions.

predict_label=scAnnotate(train=pbmc1,
                         test=pbmc2[,-1],
                         distribution="normal",
                         correction ="auto",
                         screening = "wilcox",
                         threshold=0,
                         lognormalized=TRUE)
#> Scaling features for provided objects
#> Finding all pairwise anchors
#> Running CCA
#> Merging objects
#> Finding neighborhoods
#> Finding anchors
#>  Found 2243 anchors
#> Filtering anchors
#>  Retained 1463 anchors
#> Merging dataset 1 into 2
#> Extracting anchors for merged samples
#> Finding integration vectors
#> Finding integration vector weights
#> Integrating data
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  FTL.1, LST1.1, FTH1.1, PSAP.1, CTSS.1, COTL1.1, CST3.1, AIF1.1, TYROBP.1, SERPINA1.1 
#>     IFITM3.1, FCGR3A.1, SAT1.1, FCER1G.1, CDKN1C.1, MAFB.1, LYN.1, MS4A7.1, TNFRSF1B.1, PECAM1.1 
#>     CD68.1, NEAT1.1, S100A6.1, CEBPB.1, S100A4.1, HCK.1, SPI1.1, POU2F2.1, FCN1.1, LINC01272.1 
#> Negative:  LST1.2, PSAP, CTSS.2, PSAP.2, CTSS, LST1, CST3, COTL1.2, CST3.2, AIF1.2 
#>     FTH1.2, AIF1, COTL1, FCGR3A, SERPINA1.2, SERPINA1, IFITM3, TYROBP.2, TYROBP, FTH1 
#>     FTL.2, SAT1.2, FCER1G.2, FCER1G, SAT1, CDKN1C.2, LYN.2, IFITM3.2, FCGR3A.2, CDKN1C 
#> PC_ 2 
#> Positive:  CD74.2, CD79A.1, HLA.DRA.2, CD79A.2, MS4A1.2, MS4A1.1, IGHM.2, IGHM.1, CCL5.2, NKG7.2 
#>     HLA.DRA.1, IGKC.2, BANK1.2, HLA.DRB1.2, IGKC.1, HLA.DPA1.2, CST7.2, IGHD.1, IGHD.2, HLA.DPB1.2 
#>     LTB.1, BANK1.1, LTB.2, PFN1.1, GZMH.2, PFN1.2, IGHG1.2, IGHG1.1, RPLP1.2, RPS21.2 
#> Negative:  CD74, HLA.DRA, CD79A, MS4A1, IGHM, CCL5, CCL5.1, NKG7, NKG7.1, HLA.DRB1 
#>     BANK1, IGKC, HLA.DPA1, HLA.DPB1, CST7, CST7.1, IGHD, LTB, CD37, RPLP1 
#>     PFN1, GZMH.1, RPS21, IGHG1, IGLC2, RPS6, IL32.1, GZMA.1, GNLY.1, CALM1 
#> PC_ 3 
#> Positive:  RPS26.2, RPS3.2, SRGN.2, S100A4.2, CD52.2, IL32.2, TRBC2.2, ETS1.2, CXCR4.2, ID2.2 
#>     RPS15A.2, RPS10.2, RPS21.2, RPS5.2, GZMH.2, RPS6.2, SYNE2.2, ZBTB7A.2, JUNB.2, RPLP1.2 
#>     S100A6.2, PTP4A2.2, HLA.DPB1, TNFAIP3.2, HCK.1, HLA.DRA, FOS.1, GZMA.2, TRBC1.2, FTL.2 
#> Negative:  CALM1.1, RPS15A.1, CD52.1, IL32, RPS21.1, RPS26.1, RPS5.1, HLA.DPB1.1, RPLP1.1, RPS6.1 
#>     RPS10.1, CD37.1, RPS3.1, SYNE2.1, GZMH, TRBC1.1, HLA.DPA1.1, SYNE2, S100A6, TRBC2.1 
#>     TNFAIP3.1, GZMH.1, PRF1, HLA.DRB1.1, IL32.1, LTB.2, PFN1.1, GZMB.1, HCK, HCK.2 
#> PC_ 4 
#> Positive:  RPS15A, RPS26, RPLP1, RPS3, RPS6, IL7R.2, RPS21, IGHD.2, IGHD.1, IGHM.2 
#>     IGHM.1, RPS10, GZMH, MALAT1, IL4R.2, NEAT1.2, DUSP1, DUSP1.2, IL4R.1, FOS.2 
#>     FCRL5.2, FCRL5.1, FOS, NEAT1, GZMB.1, GZMH.1, CD247.2, TNFRSF13C.1, ZBTB7A.2, TNFRSF13C.2 
#> Negative:  RPS6.2, RPS15A.2, RPLP1.2, IL7R.1, RPS21.2, IL7R, IGHD, RPS3.2, IGHM, GZMH.2 
#>     RPS26.1, IL4R, DUSP1.1, NEAT1.1, FOS.1, MALAT1.2, FCRL5, RPS6.1, MALAT1.1, S100A6.2 
#>     RPS3.1, CD247.1, RPLP1.1, RPS5.2, GZMB.2, TNFRSF13C, ZBTB7A.1, TCL1A, CXCR4.2, RPS10.2 
#> PC_ 5 
#> Positive:  IGHG1.1, IGHG1.2, TCL1A, RP5.887A10.1.1, RP5.887A10.1.2, IGHD, IL4R, NEAT1.2, IGHM, IGLC2.2 
#>     NEAT1, IGLC2.1, FOS.2, BANK1.2, FOS, MS4A1.1, MS4A1.2, FCRL5, CALM1.1, BANK1.1 
#>     PTP4A2.2, LINC01272.1, CD68.1, DUSP1.2, ZBTB7A.2, TRBC2, IGLC3.1, IGLC3.2, ZBTB7A, DUSP1 
#> Negative:  IGHG1, TCL1A.1, TCL1A.2, RP5.887A10.1, IGHD.1, IGHD.2, IL4R.2, IL4R.1, NEAT1.1, IGHM.1 
#>     IGHM.2, IGLC2, BANK1, FOS.1, MS4A1, FCRL5.1, FCRL5.2, ZBTB7A.1, LINC01272, LINC01272.2 
#>     CD68.2, CD68, PTP4A2.1, DUSP1.1, IGLC3, S100A6.2, CALM1, MALAT1.1, TRBC2.2, FCER1G
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  LST1, LST1.2, PSAP, PSAP.2, CTSS.2, CST3, CST3.2, COTL1.2, CTSS, AIF1.2 
#>     FTL.2, TYROBP, FTH1.2, IFITM3.2, FCGR3A, SERPINA1, SERPINA1.2, IFITM3, TYROBP.2, COTL1 
#>     AIF1, SAT1.2, FCER1G, SAT1, LYN.2, FCGR3A.2, CDKN1C.2, CDKN1C, MS4A7.2, MS4A7 
#> Negative:  FTL.1, FTH1.1, LST1.1, PSAP.1, CTSS.1, COTL1.1, CST3.1, AIF1.1, TYROBP.1, FCGR3A.1 
#>     IFITM3.1, SERPINA1.1, SAT1.1, FCER1G.1, CDKN1C.1, MS4A7.1, LYN.1, MAFB.1, PECAM1.1, S100A6.1 
#>     CD68.1, NEAT1.1, TNFRSF1B.1, SPI1.1, S100A4.1, CEBPB.1, HCK.1, POU2F2.1, NAP1L1.1, LINC01272.1 
#> PC_ 2 
#> Positive:  CD79A.1, HLA.DRA.2, CD79A.2, CD74.2, MS4A1.2, MS4A1.1, IGHM.1, IGHM.2, BANK1.2, CCL5.2 
#>     HLA.DPB1.2, NKG7.2, HLA.DRB1.2, IGKC.2, CD37.2, IGKC.1, HLA.DPA1.2, IGHD.1, IGHD.2, LTB.1 
#>     CST7.2, IGHG1.1, BANK1.1, IGLC2.2, IGLC2.1, GZMH.2, IGLC3.2, IGLC3.1, PFN1.2, IL32.2 
#> Negative:  CD74, HLA.DRA, CD79A, MS4A1, IGHM, HLA.DPA1, CCL5.1, BANK1, CCL5, NKG7 
#>     HLA.DRB1, IGKC, CD37, HLA.DPB1, LTB, IGHD, RPLP1, RPS21, PFN1, CST7 
#>     IGLC2, CST7.1, GZMH.1, CALM1, IGLC3, RPS6, NKG7.1, GZMH, TCL1A, IGHG1 
#> PC_ 3 
#> Positive:  RPS3.2, S100A4.2, SRGN.2, RPS26.2, MALAT1, RPS6.2, MALAT1.2, ETS1.2, CD52.2, CXCR4.2 
#>     RPS15A.2, PTP4A2.2, TRBC1.2, RPLP1.2, IL32.2, RPS21.2, ID2.2, RPS10.2, GZMA.2, GZMH.2 
#>     HLA.DPB1, CD8B.2, CD8A.2, TRBC2.2, SYNE2.2, RPS5.2, CALM1.2, DUSP1.2, CST7.2, CXCR4 
#> Negative:  CALM1.1, MALAT1.1, CD52.1, IL32, RPS15A.1, HLA.DPB1.1, PFN1.1, RPS5.1, RPS3.1, RPS26.1 
#>     RPLP1.1, RPS21.1, RPS6.1, GZMA, NKG7.1, TRBC1.1, CXCR4.1, ETS1.1, GZMH, SYNE2.1 
#>     CD8A, HLA.DPA1.1, S100A6, CD8B.1, CST7.1, TRBC2.1, PRF1, BIRC3.1, RPS10.1, FOS.2 
#> PC_ 4 
#> Positive:  RPLP1, RPS6, RPS15A, RPS21, RPS26, IL7R.2, IGHD.1, IGHD.2, RPS10, RPS3 
#>     GZMH, FCRL5.1, FCRL5.2, IGHM.2, CXCR4.1, NEAT1.2, IL4R.2, NEAT1, GZMH.1, IGHM.1 
#>     IL4R.1, DUSP1.2, DUSP1, TCL1A.2, TCL1A.1, CD247.2, PTP4A2.2, S100A6.1, RPS5, TNFRSF13C.2 
#> Negative:  RPS21.2, IGHD, IL7R.1, RPLP1.2, RPS6.2, GZMH.2, IL7R, FCRL5, IGHM, RPS26.1 
#>     CXCR4.2, NEAT1.1, RPS10.1, IL4R, CXCR4, DUSP1.1, RPS6.1, S100A6.2, RPS5.2, TCL1A 
#>     RPS21.1, CD247, RPS15A.2, PFN1.1, CD247.1, RPS10.2, RPLP1.1, FOS.1, RPS15A.1, RPS3.2 
#> PC_ 5 
#> Positive:  RP5.887A10.1, TCL1A.2, TCL1A.1, IGHD.1, IGHD.2, IGHG1, IL4R.2, IL4R.1, IGLC2, NEAT1.1 
#>     BANK1, IGHM.1, IGLC3, IGHM.2, MS4A1, BIRC3, IGKC.1, FCRL5.1, FCRL5.2, FOS.1 
#>     CD68, CD68.2, CXCR4.2, IGKC.2, CD37.1, PTP4A2.1, S100A6.2, MALAT1, ARL4C, LINC01272.2 
#> Negative:  RP5.887A10.1.2, RP5.887A10.1.1, TCL1A, IGHG1.1, IGHD, IL4R, IGLC2.1, IGLC2.2, NEAT1, NEAT1.2 
#>     IGHM, IGLC3.1, IGLC3.2, BANK1.2, BIRC3.1, BANK1.1, MS4A1.1, IGHG1.2, MS4A1.2, ETS1 
#>     FCRL5, IGKC, CD68.1, MALAT1.1, FOS, LINC01272.1, HLA.DRB1.1, PTP4A2.2, PTP4A2, DUSP1.2
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  LST1, LST1.2, CTSS.2, PSAP, PSAP.2, CTSS, COTL1.2, CST3, COTL1, CST3.2 
#>     AIF1.2, IFITM3, FCGR3A, SERPINA1, SERPINA1.2, IFITM3.2, SAT1, FTL.2, TYROBP, FCER1G 
#>     SAT1.2, TYROBP.2, FTH1, FTH1.2, CDKN1C.2, LYN.2, FCER1G.2, AIF1, MAFB, MAFB.2 
#> Negative:  LST1.1, FTH1.1, FTL.1, PSAP.1, CTSS.1, COTL1.1, CST3.1, TYROBP.1, AIF1.1, IFITM3.1 
#>     FCGR3A.1, SERPINA1.1, SAT1.1, FCER1G.1, LYN.1, CDKN1C.1, MAFB.1, MS4A7.1, PECAM1.1, TNFRSF1B.1 
#>     S100A6.1, CEBPB.1, CD68.1, NEAT1.1, SPI1.1, S100A4.1, HCK.1, POU2F2.1, FCN1.1, LINC01272.1 
#> PC_ 2 
#> Positive:  CD79A.2, CD79A.1, CD74.2, HLA.DRA.2, MS4A1.1, IGHM.2, MS4A1.2, IGHM.1, HLA.DRB1.2, BANK1.2 
#>     CCL5.2, HLA.DPA1.2, NKG7.2, HLA.DPB1.2, IGKC.1, CD37.2, IGHD.2, IGHD.1, IGKC.2, BANK1.1 
#>     LTB.1, HLA.DPB1.1, IGHG1.2, IGHG1.1, CST7.2, LTB.2, PFN1.2, IGLC2.1, IGLC2.2, CALM1.2 
#> Negative:  CD74, HLA.DRA, CD79A, MS4A1, IGHM, CCL5.1, BANK1, HLA.DPA1, NKG7, HLA.DRB1 
#>     HLA.DPB1, IGKC, IGHD, CCL5, CD37, LTB, RPLP1, NKG7.1, RPS21, PFN1 
#>     IGHG1, CST7, CST7.1, IGLC2, RPS6, GZMH.1, CALM1, IGLC3, IL32, TCL1A 
#> PC_ 3 
#> Positive:  S100A4.2, RPS3.2, CXCR4.2, RPS15A.2, RPS6.2, SRGN.2, CD52.2, ID2.2, IL32.2, PTP4A2.2 
#>     GZMH.2, RPS21.2, RPLP1.2, GZMA.2, RPS26.2, ETS1.2, TRBC2.2, TRBC2, RPS10.2, SYNE2.2 
#>     MALAT1.2, NAP1L1, CD8A.2, TRBC1.2, HCK.1, CD8B.2, HLA.DPA1, S100A6.2, CXCR4, CST7.2 
#> Negative:  RPS15A.1, IL32.1, CD52.1, TRBC2.1, CXCR4.1, RPS3.1, SYNE2, GZMH, RPS26.1, IL32 
#>     HLA.DPA1.1, RPS5.1, GZMA, RPS21.1, RPS6.1, RPLP1.1, GZMA.1, GZMH.1, CD37.1, CD8A.1 
#>     TRBC1.1, CD8B, RPS10.1, CALM1.1, HCK, HCK.2, MALAT1.1, CST7, TNFRSF1B, PFN1.1 
#> PC_ 4 
#> Positive:  RPS21.2, RPLP1.2, RPS15A.2, RPS6.2, IGHD, RPS3.2, NEAT1.1, FOS.1, IGHM, RPS26.2 
#>     DUSP1.1, FCRL5, RPS26.1, GZMH.2, CXCR4.2, RPLP1.1, S100A6.2, RPS10.2, RPS21.1, RPS10.1 
#>     IL7R.1, TCL1A, RPS3.1, RPS6.1, CXCR4, RPS5.2, CD247.1, BIRC3, PRF1, PRF1.1 
#> Negative:  RPLP1, RPS6, RPS21, RPS3, RPS26, RPS15A, IGHD.2, IGHD.1, RPS10, CXCR4.1 
#>     NEAT1.2, IGHM.2, IGHM.1, GZMH, FCRL5.2, FCRL5.1, DUSP1.2, FOS, DUSP1, NEAT1 
#>     MALAT1, TCL1A.2, TCL1A.1, FOS.2, S100A6.1, RPS5, IL7R.2, BIRC3.1, IL4R.1, CD247.2 
#> PC_ 5 
#> Positive:  RP5.887A10.1.2, RP5.887A10.1.1, IGHG1.2, IGHG1.1, TCL1A, IGHD, NEAT1.2, IGLC2.1, IGLC2.2, IGHM 
#>     NEAT1, LINC01272.1, FCRL5, ZBTB7A, ZBTB7A.2, IGKC, DUSP1.2, HLA.DRB1.1, BANK1.1, PFN1.1 
#>     MS4A1.2, IGLC3.2, IGLC3.1, BANK1.2, DUSP1, CALM1.1, CD68.1, FOS, MS4A1.1, FOS.2 
#> Negative:  RP5.887A10.1, IGHG1, TCL1A.2, TCL1A.1, IGHD.1, IGHD.2, NEAT1.1, IGLC2, IGHM.2, IGHM.1 
#>     IL4R.1, LINC01272, LINC01272.2, ZBTB7A.1, FCRL5.2, FCRL5.1, IGKC.2, IGKC.1, BANK1, FOS.1 
#>     DUSP1.1, IGLC3, MS4A1, CD68.2, CD68, NAP1L1, HLA.DPA1.2, GZMB.1, CD247, PTP4A2.1
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  FTL.1, FTH1.1, PSAP.1, CTSS.1, LST1.1, COTL1.1, CST3.1, AIF1.1, TYROBP.1, SERPINA1.1 
#>     FCGR3A.1, IFITM3.1, SAT1.1, FCER1G.1, CDKN1C.1, MS4A7.1, MAFB.1, TNFRSF1B.1, LYN.1, PECAM1.1 
#>     S100A6.1, CD68.1, NEAT1.1, SPI1.1, S100A4.1, CEBPB.1, HCK.1, FCN1.1, POU2F2.1, LINC01272.1 
#> Negative:  PSAP, PSAP.2, LST1.2, LST1, CTSS, CTSS.2, CST3.2, CST3, COTL1, COTL1.2 
#>     FTL.2, AIF1.2, AIF1, IFITM3, TYROBP, SERPINA1.2, SERPINA1, FCGR3A, SAT1.2, FTL 
#>     FTH1.2, TYROBP.2, SAT1, FCER1G, FCER1G.2, CDKN1C.2, CDKN1C, IFITM3.2, MS4A7.2, MS4A7 
#> PC_ 2 
#> Positive:  CD74.2, CD79A.2, CD79A.1, HLA.DRA.2, MS4A1.2, MS4A1.1, IGHM.1, IGHM.2, CCL5.2, NKG7.2 
#>     HLA.DRB1.2, BANK1.2, BANK1.1, HLA.DPB1.2, CD37.2, RPS21.2, IGKC.2, IGHD.2, IGHD.1, CST7.2 
#>     CD37.1, HLA.DPA1.2, IGKC.1, LTB.1, LTB.2, IGHG1.2, IGHG1.1, RPLP1.2, GZMH.2, IGLC2.1 
#> Negative:  CD74, HLA.DRA, CD79A, MS4A1, IGHM, CCL5, NKG7.1, NKG7, HLA.DPB1, BANK1 
#>     HLA.DPA1, CD37, CCL5.1, IGKC, HLA.DRB1, IGHD, LTB, CST7.1, CST7, RPLP1 
#>     RPS21, PFN1, GZMH, IGHG1, IL32.1, IGLC2, RPS6, IL32, IGLC3, FGFBP2.1 
#> PC_ 3 
#> Positive:  RPS15A.1, HLA.DPB1.1, RPS6.1, RPS26.1, RPS5.1, SYNE2, CD52.1, HLA.DPA1.1, RPS3.1, GZMH.1 
#>     IL32.1, PFN1.1, RPS21.1, CXCR4.1, TRBC2.1, IL32, ID2, TRBC1.1, SYNE2.1, RPLP1.1 
#>     CALM1.1, ETS1.1, GZMB, GZMH, GZMA.1, FOS.2, HCK, CD8A.1, TNFRSF1B, LTB.2 
#> Negative:  S100A4.2, PTP4A2.2, RPS26.2, RPS6.2, SRGN.2, ID2.2, RPS15A.2, CD52.2, CXCR4.2, SYNE2.2 
#>     NAP1L1, ETS1.2, GZMH.2, RPS3.2, IL32.2, RPS5.2, S100A6.2, TRBC1.2, DUSP1.2, IL7R.2 
#>     RPS15A, RPS10.2, HCK.1, HLA.DPA1, HLA.DPB1, MS4A7.1, FTH1.2, CST7.2, LINC01272.1, GZMA.2 
#> PC_ 4 
#> Positive:  RPLP1.2, RPS21.2, RPS3.2, RPS15A.2, RPLP1.1, IL7R, RPS10.1, RPS10.2, IGHD, GZMH.2 
#>     RPS6.2, RPS21.1, IGHM, RPS5.2, RPS26.1, FCRL5, RPS3.1, NEAT1.1, GZMB.2, CXCR4.2 
#>     TRBC2, RPS6.1, DUSP1.1, S100A6.2, RPS26.2, TNFRSF13C, CD247.1, PRF1, PRF1.1, GNLY.2 
#> Negative:  RPLP1, RPS21, RPS6, RPS3, RPS26, RPS15A, RPS10, GZMH.1, IGHD.2, IGHD.1 
#>     IGHM.1, IGHM.2, FCRL5.1, FCRL5.2, IL7R.2, GZMB, GZMH, CXCR4.1, NEAT1.2, S100A6.1 
#>     NEAT1, RPS5, DUSP1, DUSP1.2, TNFRSF13C.1, TNFRSF13C.2, GNLY, PRF1.2, GZMB.1, CD247.2 
#> PC_ 5 
#> Positive:  IGHG1.1, IGHG1.2, RP5.887A10.1.1, RP5.887A10.1.2, TCL1A, IGLC2.1, IGLC2.2, IGHD, IGLC3.1, IGLC3.2 
#>     IL4R, IGKC, NEAT1.2, IGHM, HLA.DRB1.1, NEAT1, FCRL5, MS4A1.2, MS4A1.1, ZBTB7A.2 
#>     BANK1.2, BANK1.1, CALM1.1, PTP4A2, LINC01272.1, PFN1.2, MALAT1.2, CD68.1, FOS.2, ZBTB7A 
#> Negative:  IGHG1, RP5.887A10.1, TCL1A.2, TCL1A.1, IGLC2, IGHD.2, IGHD.1, IGLC3, IL4R.1, IGKC.2 
#>     IL4R.2, IGKC.1, IGHM.1, IGHM.2, NEAT1.1, FCRL5.2, FCRL5.1, MS4A1, BANK1, TRBC2 
#>     FOS.1, ZBTB7A.1, LINC01272.2, LINC01272, NAP1L1, PTP4A2.1, CD68, CD68.2, HLA.DRB1.2, S100A6.2
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  LST1, LST1.2, PSAP.2, CTSS, PSAP, CTSS.2, COTL1.2, CST3, CST3.2, COTL1 
#>     AIF1.2, AIF1, FCGR3A, SERPINA1, SERPINA1.2, TYROBP, IFITM3, SAT1.2, FCER1G, SAT1 
#>     CDKN1C.2, LYN.2, FTH1.2, CDKN1C, MS4A7.2, FCER1G.2, TYROBP.2, FTH1, MAFB, MAFB.2 
#> Negative:  FTL.1, LST1.1, FTH1.1, PSAP.1, CTSS.1, COTL1.1, CST3.1, AIF1.1, TYROBP.1, SERPINA1.1 
#>     FCGR3A.1, IFITM3.1, SAT1.1, FCER1G.1, CDKN1C.1, MS4A7.1, LYN.1, MAFB.1, S100A6.1, PECAM1.1 
#>     TNFRSF1B.1, CEBPB.1, CD68.1, NEAT1.1, SPI1.1, S100A4.1, HCK.1, POU2F2.1, LINC01272.1, FCN1.1 
#> PC_ 2 
#> Positive:  CD74, HLA.DRA, CD79A, IGHM, MS4A1, CCL5.1, CCL5, NKG7.1, BANK1, NKG7 
#>     HLA.DRB1, IGKC, CD37, HLA.DPA1, IGHD, RPLP1, HLA.DPB1, LTB, CST7, RPS21 
#>     CST7.1, PFN1, IGHG1, GZMH.1, IGLC2, RPS6, IGLC3, GZMA, RPS5, FGFBP2 
#> Negative:  CD79A.2, CD79A.1, HLA.DRA.2, IGHM.2, IGHM.1, MS4A1.2, MS4A1.1, CD74.2, CCL5.2, NKG7.2 
#>     BANK1.1, BANK1.2, HLA.DRB1.2, IGKC.2, IGKC.1, HLA.DPB1.2, IGHD.2, IGHD.1, HLA.DPA1.2, LTB.2 
#>     CST7.2, LTB.1, IGHG1.1, IGHG1.2, GZMH.2, RPS21.2, IGLC2.2, IGLC2.1, RPLP1.2, IGLC3.1 
#> PC_ 3 
#> Positive:  CALM1.1, RPS15A.1, RPS26.1, HLA.DPB1.1, IL32.1, CD52.1, RPS6.1, PFN1.1, RPS3.1, RPLP1.1 
#>     IL32, RPS5.1, SYNE2, GZMH, ID2.1, RPS21.1, CD37.1, TRBC1, HLA.DPA1.1, CD8B 
#>     TRBC2.1, HLA.DRB1.1, CD8A.1, SRGN.1, TRBC1.1, GZMH.1, ETS1, S100A6, GZMA, TNFRSF1B 
#> Negative:  RPS3.2, RPS6.2, S100A4.2, RPS15A.2, IL32.2, MALAT1, SRGN.2, CD52.2, RPS26.2, RPS5.2 
#>     ETS1.2, SYNE2.2, GZMH.2, RPS21.2, ID2.2, S100A6.2, TRBC1.2, RPLP1.2, HLA.DPB1, HLA.DPA1 
#>     TRBC2.2, DUSP1, PTP4A2.2, CALM1.2, CD8B.2, FTL.2, CD8A.2, TNFRSF1B.1, GZMA.2, HCK.1 
#> PC_ 4 
#> Positive:  RPLP1.2, RPS21.2, IL7R, RPS15A.2, RPS10.2, IGHD, GZMH.2, IL7R.1, RPS21.1, DUSP1.1 
#>     IGHM, RPLP1.1, RPS6.2, NEAT1.1, RPS3.2, RPS10.1, FCRL5, RPS26.2, RPS26.1, GZMB.2 
#>     RPS6.1, S100A6.2, IL4R, FTL.2, RPS3.1, RPS5.2, IGKC, CD247.1, FOS.1, CXCR4.2 
#> Negative:  RPLP1, RPS21, RPS15A, RPS6, RPS26, RPS3, RPS10, IL7R.2, IGHD.2, IGHD.1 
#>     GZMH, IGHM.2, NEAT1.2, DUSP1.2, IGHM.1, DUSP1, GZMH.1, FCRL5.1, FCRL5.2, GZMB.1 
#>     CXCR4.1, NEAT1, MALAT1.2, IL4R.1, IL4R.2, S100A6.1, PTP4A2.2, ZBTB7A, RPS5, IL32.1 
#> PC_ 5 
#> Positive:  IGLC2, IGLC3, IGHG1, RP5.887A10.1, IL4R.1, IL4R.2, IGHD.1, IGHD.2, IGKC.2, IGKC.1 
#>     NEAT1.1, TCL1A.1, FCRL5.1, FCRL5.2, FOS.1, IGHM.1, ZBTB7A.1, IGHM.2, LINC01272, LINC01272.2 
#>     PTP4A2.1, MS4A1, DUSP1.1, BANK1, CD68.2, CD68, FCER1G.2, S100A6.2, FCER1G, MALAT1.1 
#> Negative:  IGLC2.2, IGLC2.1, IGLC3.1, IGLC3.2, IGHG1.2, IGHG1.1, RP5.887A10.1.2, RP5.887A10.1.1, IL4R, IGHD 
#>     IGKC, NEAT1.2, FCRL5, NEAT1, IGHM, FOS.2, PTP4A2, ZBTB7A.2, LINC01272.1, MS4A1.1 
#>     DUSP1, FOS, ZBTB7A, MS4A1.2, DUSP1.2, PTP4A2.2, ETS1, BANK1.1, CD68.1, BANK1.2
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  LST1, LST1.2, PSAP, COTL1.2, PSAP.2, COTL1, CST3, CST3.2, CTSS.2, CTSS 
#>     AIF1.2, FCGR3A, IFITM3, TYROBP.2, SERPINA1, SERPINA1.2, TYROBP, IFITM3.2, SAT1.2, SAT1 
#>     FTH1.2, FTL.2, LYN.2, CDKN1C.2, CDKN1C, AIF1, FCER1G, MS4A7, MS4A7.2, MAFB 
#> Negative:  FTL.1, FTH1.1, LST1.1, PSAP.1, COTL1.1, CTSS.1, CST3.1, IFITM3.1, AIF1.1, TYROBP.1 
#>     SERPINA1.1, FCGR3A.1, SAT1.1, FCER1G.1, CDKN1C.1, MS4A7.1, MAFB.1, LYN.1, PECAM1.1, CEBPB.1 
#>     TNFRSF1B.1, CD68.1, NEAT1.1, S100A6.1, SPI1.1, S100A4.1, HCK.1, POU2F2.1, LINC01272.1, FCN1.1 
#> PC_ 2 
#> Positive:  CD74, HLA.DRA, CD79A, IGHM, MS4A1, CCL5, CCL5.1, NKG7, BANK1, HLA.DPA1 
#>     IGKC, HLA.DRB1, HLA.DPB1, CD37, IGHD, CST7, CST7.1, LTB, RPLP1, RPS21 
#>     PFN1, IGHG1, GZMH, IL32, IGLC2, RPS6, IGLC3, FGFBP2.1, FGFBP2, GZMA 
#> Negative:  CD74.2, CD79A.1, CD79A.2, HLA.DRA.2, IGHM.2, IGHM.1, MS4A1.1, MS4A1.2, CCL5.2, BANK1.1 
#>     BANK1.2, HLA.DPB1.2, NKG7.2, HLA.DRB1.2, IGKC.1, IGKC.2, RPS21.2, IGHD.1, IGHD.2, CST7.2 
#>     LTB.1, LTB.2, CD37.2, GZMH.2, IGHG1.1, IGHG1.2, CD37.1, HLA.DPA1.2, IGLC2.2, IGLC2.1 
#> PC_ 3 
#> Positive:  RPS15A.1, CD52.1, NKG7.1, RPLP1.1, CALM1.1, HLA.DPB1.1, CXCR4.1, RPS5.1, TRBC1.1, GZMH.1 
#>     SYNE2, S100A6, RPS6.1, HLA.DPA1.1, TRBC1, IL32, PFN1.1, TRBC2.1, RPS21.1, ID2 
#>     RPS26.1, RPS3.1, GZMH, IL7R, GZMA, IL7R.1, CD37.1, HLA.DPB1.2, IL32.1, GZMA.1 
#> Negative:  CD52.2, S100A4.2, SRGN.2, CXCR4.2, RPS15A.2, RPS3.2, RPS10.2, S100A6.2, RPS6.2, TRBC1.2 
#>     ID2.2, GZMH.2, RPLP1.2, IL32.2, HLA.DPB1, SYNE2.2, RPS26.2, ETS1.2, IL7R.2, ID2.1 
#>     NAP1L1, GZMA.2, NKG7.2, CXCR4, TRBC2.2, CST7.2, HCK.1, GNAI2.2, LTB, CD8A.2 
#> PC_ 4 
#> Positive:  RPS26, RPLP1, RPS21, RPS15A, RPS6, RPS3, IGHD.2, IGHD.1, CXCR4.1, FOS.2 
#>     IL4R.2, DUSP1, GZMH.1, IGHM.2, IL4R.1, IGHM.1, NEAT1.2, FCRL5.2, FCRL5.1, IL7R.2 
#>     NEAT1, DUSP1.2, CD247.2, RPS10, GZMH, MALAT1.2, FOS, RPS5, PRF1.2, TCL1A.2 
#> Negative:  RPS21.2, RPLP1.2, RPS15A.2, RPS6.2, RPS26.2, RPS3.2, RPS26.1, IGHD, RPS3.1, IL7R.1 
#>     RPS21.1, RPS5.2, DUSP1.1, IL4R, RPS6.1, IGHM, FOS.1, NEAT1.1, CXCR4.2, FCRL5 
#>     RPLP1.1, GZMH.2, CXCR4, CD247, CD247.1, S100A6.2, MALAT1.1, PRF1, PRF1.1, TCL1A 
#> PC_ 5 
#> Positive:  TCL1A, RP5.887A10.1.2, RP5.887A10.1.1, IGHG1.2, IGHG1.1, IGHD, IGLC2.2, IGLC2.1, IL4R, IGLC3.2 
#>     IGLC3.1, NEAT1.2, NEAT1, IGHM, FCRL5, FOS, FOS.2, IGKC, MALAT1.2, CD68.1 
#>     BANK1.2, BANK1.1, LINC01272.1, MS4A1.2, MS4A1.1, ZBTB7A.2, DUSP1.2, CALM1.1, ZBTB7A, PTP4A2.2 
#> Negative:  TCL1A.1, TCL1A.2, RP5.887A10.1, IGHG1, IGHD.2, IGHD.1, IGLC2, IL4R.2, IL4R.1, IGLC3 
#>     NEAT1.1, IGHM.1, FOS.1, IGHM.2, FCRL5.2, FCRL5.1, IGKC.1, IGKC.2, CD68, CD68.2 
#>     TRBC2, BANK1, LINC01272.2, LINC01272, MS4A1, ZBTB7A.1, S100A6.2, SYNE2.2, CXCR4.2, NAP1L1
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  LST1.2, LST1, PSAP, PSAP.2, CTSS.2, CTSS, CST3, COTL1.2, FTL.2, CST3.2 
#>     AIF1.2, TYROBP, SERPINA1, SERPINA1.2, AIF1, FTL, FCGR3A, SAT1.2, SAT1, IFITM3 
#>     COTL1, FCER1G, LYN.2, CDKN1C.2, CDKN1C, FTH1.2, MS4A7.2, TYROBP.2, MAFB, MAFB.2 
#> Negative:  FTL.1, FTH1.1, LST1.1, PSAP.1, CTSS.1, COTL1.1, CST3.1, AIF1.1, TYROBP.1, IFITM3.1 
#>     SERPINA1.1, FCGR3A.1, SAT1.1, FCER1G.1, LYN.1, CDKN1C.1, MAFB.1, PECAM1.1, TNFRSF1B.1, S100A6.1 
#>     MS4A7.1, CD68.1, CEBPB.1, NEAT1.1, SPI1.1, S100A4.1, HCK.1, POU2F2.1, LINC01272.1, NAP1L1.1 
#> PC_ 2 
#> Positive:  CD79A.2, CD79A.1, HLA.DRA.2, MS4A1.1, MS4A1.2, IGHM.2, IGHM.1, CD74.2, CCL5.2, BANK1.1 
#>     BANK1.2, HLA.DPB1.2, NKG7.2, HLA.DRA.1, HLA.DPA1.2, IGHD.1, IGHD.2, IGKC.2, HLA.DRB1.2, IGKC.1 
#>     LTB.1, LTB.2, CD37.2, CST7.2, IGHG1.1, IGHG1.2, IGLC2.2, IGLC2.1, IGLC3.2, IGLC3.1 
#> Negative:  CD74, CD79A, HLA.DRA, MS4A1, IGHM, CCL5, BANK1, NKG7, NKG7.1, HLA.DPB1 
#>     CCL5.1, IGKC, IGHD, HLA.DPA1, HLA.DRB1, LTB, RPLP1, CD37, RPS21, IGHG1 
#>     CST7, CST7.1, IGLC2, PFN1, RPS6, GZMH.1, IGLC3, CALM1, TCL1A, IL32.1 
#> PC_ 3 
#> Positive:  RPS3.2, RPS6.2, SRGN.2, CD52.2, RPS15A.2, S100A4.2, ETS1.2, RPS26.2, ID2.2, MALAT1 
#>     PTP4A2.2, RPS21.2, TRBC2.2, CXCR4.2, CALM1.2, GZMH.2, RPLP1.2, SYNE2.2, NAP1L1, RPS10.2 
#>     PFN1, S100A6.2, IL32.2, CD8B.2, GZMA.2, TRBC1.2, HLA.DPA1, DUSP1, CST7.2, FOS.1 
#> Negative:  CD52.1, RPS3.1, RPS15A.1, RPS10.1, PFN1.1, RPS26.1, HLA.DPB1.1, RPS21.1, CALM1.1, RPLP1.1 
#>     RPS5.1, RPS6.1, SYNE2.1, CD37.1, GZMH, ID2, TRBC2.1, S100A6, CD8B, HLA.DPA1.1 
#>     IL32.1, GZMA, GZMH.1, IL32, FOS, PTP4A2.1, GZMA.1, CST7.1, TRBC1.1, HCK.2 
#> PC_ 4 
#> Positive:  RPLP1.2, IGHD, IL7R.1, RPS15A.2, IL7R, RPS21.2, IGHM, IL4R, GZMH.2, CXCR4.2 
#>     TCL1A, NEAT1.1, FOS.1, FCRL5, RPS6.2, DUSP1.1, RPS5.2, PFN1.1, RPS10.2, RPS26.2 
#>     RPLP1.1, RPS26.1, ZBTB7A.1, CD247.1, CD247, RPS6.1, S100A6.2, PTP4A2.1, MALAT1.1, RPS3.2 
#> Negative:  RPLP1, RPS15A, IGHD.1, IGHD.2, RPS26, IL7R.2, RPS21, RPS6, IGHM.2, IGHM.1 
#>     IL4R.2, IL4R.1, GZMH, RPS10, CXCR4.1, TCL1A.1, TCL1A.2, NEAT1, RPS3, FCRL5.1 
#>     FCRL5.2, GZMH.1, FOS.2, NEAT1.2, DUSP1.2, DUSP1, PTP4A2.2, ZBTB7A.2, MALAT1.2, PFN1 
#> PC_ 5 
#> Positive:  IGHG1, RP5.887A10.1, TCL1A.2, TCL1A.1, IGHD.1, IGHD.2, IL4R.2, IL4R.1, NEAT1.1, IGLC2 
#>     BANK1, MS4A1, ZBTB7A.1, IGHM.1, IGHM.2, LINC01272.2, LINC01272, FCRL5.2, FCRL5.1, DUSP1.1 
#>     PTP4A2.1, NAP1L1, HLA.DRB1.2, CD68, CD68.2, BIRC3, S100A6.2, FOS.1, IGLC3, FCER1G 
#> Negative:  IGHG1.2, IGHG1.1, RP5.887A10.1.1, RP5.887A10.1.2, TCL1A, IGHD, IL4R, NEAT1.2, IGLC2.1, IGLC2.2 
#>     NEAT1, MS4A1.2, BANK1.2, BANK1.1, HLA.DRB1.1, MS4A1.1, IGHM, ZBTB7A.2, LINC01272.1, DUSP1.2 
#>     BIRC3.1, FCRL5, ZBTB7A, PTP4A2, MALAT1.2, DUSP1, CD68.1, PFN1.2, IGLC3.1, IGLC3.2
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  LST1.1, FTL.1, PSAP.1, CTSS.1, FTH1.1, COTL1.1, CST3.1, AIF1.1, SERPINA1.1, TYROBP.1 
#>     FCGR3A.1, SAT1.1, IFITM3.1, FCER1G.1, CDKN1C.1, MAFB.1, LYN.1, TNFRSF1B.1, MS4A7.1, S100A6.1 
#>     PECAM1.1, NEAT1.1, CD68.1, CEBPB.1, S100A4.1, SPI1.1, HCK.1, FCN1.1, NAP1L1.1, LINC01272.1 
#> Negative:  LST1.2, LST1, PSAP.2, CTSS.2, CST3.2, CST3, CTSS, PSAP, COTL1.2, AIF1.2 
#>     TYROBP, SERPINA1, SERPINA1.2, IFITM3, AIF1, FCGR3A, SAT1, COTL1, SAT1.2, FTL.2 
#>     TYROBP.2, FTH1, FCER1G, FTL, FTH1.2, CDKN1C, LYN.2, MS4A7.2, MAFB, MAFB.2 
#> PC_ 2 
#> Positive:  CD79A.1, HLA.DRA.2, CD79A.2, CD74.2, MS4A1.1, MS4A1.2, IGHM.2, IGHM.1, HLA.DPB1.2, BANK1.2 
#>     BANK1.1, NKG7.2, CCL5.2, HLA.DRB1.2, HLA.DPA1.2, IGKC.2, IGKC.1, IGHD.1, IGHD.2, HLA.DPB1.1 
#>     PFN1.1, CST7.2, LTB.2, IGHG1.1, IGHG1.2, PFN1.2, RPS21.2, CD37.1, IGLC2.2, IGLC2.1 
#> Negative:  CD74, HLA.DRA, CD79A, MS4A1, IGHM, HLA.DPB1, HLA.DPA1, HLA.DRB1, BANK1, CCL5.1 
#>     NKG7, CCL5, NKG7.1, IGKC, CD37, IGHD, LTB, RPLP1, PFN1, CST7.1 
#>     IGHG1, RPS21, CST7, IGLC2, RPS6, CALM1, GZMH.1, IGLC3, TCL1A, RPS5 
#> PC_ 3 
#> Positive:  RPS15A.1, CALM1.1, RPS3.1, RPLP1.1, RPS5.1, RPS10.1, RPS26.1, CD52.1, TRBC1.1, IL32 
#>     RPS21.1, CD8A.1, SYNE2, HLA.DPA1.1, HLA.DPB1.1, PRF1, ETS1.1, RPS6.1, GZMH.1, GZMB.1 
#>     TRBC2.1, MS4A7, GZMA, PTP4A2.1, CST7, SRGN.1, SYNE2.1, ID2, GZMA.1, CD37.1 
#> Negative:  RPS3.2, RPS15A.2, SRGN.2, S100A4.2, CD52.2, ETS1.2, RPS26.2, IL32.2, CXCR4.2, PTP4A2.2 
#>     TRBC1.2, SYNE2.2, DUSP1, MALAT1.2, RPS10.2, RPS6.2, GZMH.2, RPLP1.2, ID2.2, RPS5.2 
#>     GZMA.2, PRF1.2, CST7.2, RPS3, MS4A7.1, RPS15A, GZMB.2, CD8A.2, HCK.1, IL7R.2 
#> PC_ 4 
#> Positive:  RPLP1.2, RPS21.2, RPS6.2, FOS.1, IGHD, RPS15A.2, IL7R.1, NEAT1.1, MALAT1.1, MALAT1.2 
#>     DUSP1.1, RPS26.1, IGHM, S100A6.2, RPS10.2, RPS5.2, RPS26.2, RPS6.1, CXCR4.2, IL4R 
#>     FCRL5, RPS21.1, ZBTB7A.1, GZMH.2, TCL1A, GZMB.2, BIRC3, CD247.1, TNFRSF13C, TRBC2 
#> Negative:  RPS26, RPLP1, RPS6, RPS21, FOS, FOS.2, MALAT1, IGHD.2, IGHD.1, RPS15A 
#>     RPS10, IL7R.2, IGHM.2, NEAT1, DUSP1.2, NEAT1.2, CXCR4.1, IGHM.1, DUSP1, IL4R.1 
#>     IL4R.2, GZMH.1, FCRL5.2, FCRL5.1, GZMB.1, ZBTB7A, RPS3, RPS5, S100A6.1, TCL1A.2 
#> PC_ 5 
#> Positive:  RP5.887A10.1, IGHG1, TCL1A.2, TCL1A.1, IGHD.2, IGHD.1, IL4R.1, IL4R.2, TRBC2, IGLC2 
#>     IGHM.1, IGHM.2, FCRL5.2, FCRL5.1, NEAT1.1, MS4A1, BANK1, IGLC3, ETS1.2, IGKC.2 
#>     IGKC.1, CD68, CD68.2, FOS.1, CALM1, MALAT1.2, ZBTB7A.1, LINC01272.2, LINC01272, NAP1L1 
#> Negative:  RP5.887A10.1.1, RP5.887A10.1.2, IGHG1.1, IGHG1.2, TCL1A, IGHD, IL4R, IGLC2.1, IGLC2.2, IGHM 
#>     NEAT1.2, FCRL5, MS4A1.2, MS4A1.1, BANK1.2, BANK1.1, IGLC3.2, IGLC3.1, CALM1.1, FOS.2 
#>     TRBC2.2, IGKC, CD68.1, DUSP1.2, ZBTB7A.2, PFN1.1, MALAT1, LINC01272.1, BIRC3.2, FOS
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  LST1.2, LST1, PSAP, PSAP.2, CTSS, CTSS.2, CST3, COTL1.2, CST3.2, FTL.2 
#>     AIF1, FTH1.2, COTL1, FCGR3A, AIF1.2, SERPINA1, SERPINA1.2, IFITM3, SAT1.2, FTL 
#>     FCER1G, FTH1, CDKN1C.2, LYN.2, SAT1, FCGR3A.2, CDKN1C, MS4A7.2, MAFB.2, MAFB 
#> Negative:  FTL.1, LST1.1, FTH1.1, PSAP.1, CTSS.1, COTL1.1, CST3.1, AIF1.1, FCGR3A.1, SERPINA1.1 
#>     IFITM3.1, SAT1.1, TYROBP.1, FCER1G.1, CDKN1C.1, MAFB.1, TNFRSF1B.1, PECAM1.1, CEBPB.1, MS4A7.1 
#>     CD68.1, LYN.1, NEAT1.1, S100A6.1, SPI1.1, S100A4.1, HCK.1, NAP1L1.1, LINC01272.1, FCN1.1 
#> PC_ 2 
#> Positive:  CD74, HLA.DRA, CD79A, MS4A1, IGHM, CCL5.1, BANK1, NKG7, NKG7.1, HLA.DRB1 
#>     IGKC, HLA.DPA1, CCL5, LTB, HLA.DPB1, CD37, IGHD, IGHG1, RPLP1, CST7.1 
#>     CST7, RPS21, PFN1, IGLC2, RPS6, CALM1, GZMH.1, IL32.1, IL32, GZMA.1 
#> Negative:  CD79A.2, CD79A.1, HLA.DRA.2, CD74.2, MS4A1.2, MS4A1.1, IGHM.1, IGHM.2, HLA.DPB1.2, CCL5.2 
#>     NKG7.2, BANK1.2, HLA.DPA1.2, CD37.2, LTB.2, IGKC.2, BANK1.1, LTB.1, IGHD.1, IGHD.2 
#>     IGKC.1, RPS21.2, IGHG1.1, HLA.DRB1.2, CST7.2, PFN1.1, IGLC2.2, IGLC2.1, IGHG1.2, IL32.2 
#> PC_ 3 
#> Positive:  CALM1.1, CD52.1, RPS15A.1, RPS3.1, RPLP1.1, RPS26.1, RPS10.1, HLA.DPB1.1, RPS6.1, CD37.1 
#>     RPS21.1, RPS5.1, CXCR4.1, SYNE2, GZMH, S100A6, ID2, HLA.DPA1.1, GZMA, TRBC1 
#>     TRBC2.1, IL32.1, IL32, TNFRSF1B, GZMH.1, GZMA.1, BIRC3.1, PTP4A2.1, HCK.2, HCK 
#> Negative:  RPS3.2, PTP4A2.2, S100A4.2, RPS15A.2, RPS26.2, RPS6.2, ETS1.2, SRGN.2, MALAT1, CD52.2 
#>     ID2.2, CALM1.2, RPLP1.2, RPS10.2, SYNE2.2, GZMH.2, HLA.DPB1, CXCR4.2, TRBC1.2, RPS5.2 
#>     S100A6.2, GZMA.2, IL32.2, HLA.DPA1, RPS3, HCK.1, LYN, TRBC2, FTL.2, RPS26 
#> PC_ 4 
#> Positive:  RPLP1, IL7R.2, RPS6, RPS15A, RPS26, RPS21, GZMH, FOS.2, CXCR4.1, NEAT1.2 
#>     RPS10, DUSP1.2, DUSP1, CD247.2, FOS, IGHD.1, IGHD.2, FCRL5.1, FCRL5.2, GZMH.1 
#>     NEAT1, RPS3, MALAT1.2, ZBTB7A, PTP4A2.2, TNFAIP3, GZMB, IGHM.2, IGHM.1, ZBTB7A.2 
#> Negative:  RPS21.2, IL7R.1, RPS15A.2, RPLP1.2, IL7R, RPS6.2, GZMH.2, FOS.1, NEAT1.1, DUSP1.1 
#>     CD247, IGHD, S100A6.2, FCRL5, RPS5.2, RPS3.2, CD247.1, CXCR4, GZMB.2, ZBTB7A.1 
#>     RPS26.1, RPS26.2, IGHM, TNFAIP3.2, RPS10.2, RPS21.1, PRF1, PRF1.1, TRBC2, IL4R 
#> PC_ 5 
#> Positive:  TCL1A, RP5.887A10.1.1, RP5.887A10.1.2, IGHG1.1, IGHG1.2, IGHD, IL4R, IGHM, FCRL5, IGLC2.1 
#>     IGLC2.2, BIRC3.1, NEAT1.2, BANK1.2, BANK1.1, MS4A1.1, IGKC, CD68.1, MS4A1.2, NEAT1 
#>     ETS1, IGLC3.2, FOS, FOS.2, PFN1.1, PFN1.2, CALM1.1, ZBTB7A, IGLC3.1, LINC01272.1 
#> Negative:  TCL1A.2, TCL1A.1, RP5.887A10.1, IGHG1, IGHD.2, IGHD.1, IL4R.2, IL4R.1, IGHM.2, FCRL5.2 
#>     FCRL5.1, IGHM.1, IGLC2, BANK1, NEAT1.1, MS4A1, CD68, IGLC3, CD68.2, IGKC.1 
#>     ETS1.2, IGKC.2, FOS.1, PFN1, HLA.DRB1.2, TRBC2, BIRC3, FTL.2, ZBTB7A.1, SYNE2.2
#> Warning: Non-unique features (rownames) present in the input matrix, making
#> unique
#> Centering and scaling data matrix
#> PC_ 1 
#> Positive:  FTL.1, FTH1.1, LST1.1, PSAP.1, CTSS.1, COTL1.1, CST3.1, AIF1.1, FCGR3A.1, TYROBP.1 
#>     IFITM3.1, SERPINA1.1, SAT1.1, MS4A7.1, LYN.1, MAFB.1, FCER1G.1, S100A6.1, TNFRSF1B.1, NEAT1.1 
#>     CDKN1C.1, PECAM1.1, CEBPB.1, CD68.1, SPI1.1, S100A4.1, HCK.1, NAP1L1.1, FCN1.1, LINC01272.1 
#> Negative:  LST1, LST1.2, PSAP.2, CTSS.2, PSAP, CTSS, CST3, COTL1.2, CST3.2, FCGR3A 
#>     AIF1, AIF1.2, FTH1.2, SERPINA1.2, SERPINA1, COTL1, FTL.2, SAT1.2, TYROBP, IFITM3 
#>     IFITM3.2, FCGR3A.2, FTH1, FCER1G.2, SAT1, CDKN1C.2, LYN.2, MS4A7.2, MS4A7, MAFB.2 
#> PC_ 2 
#> Positive:  CD74.2, CD79A.1, HLA.DRA.2, CD79A.2, MS4A1.1, IGHM.2, IGHM.1, MS4A1.2, CCL5.2, HLA.DRB1.2 
#>     BANK1.1, BANK1.2, HLA.DPB1.2, IGKC.1, NKG7.2, HLA.DPA1.2, IGKC.2, IGHD.2, IGHD.1, CD37.2 
#>     CST7.2, HLA.DPA1.1, IGHG1.1, IGHG1.2, LTB.2, CD37.1, IGLC2.1, IGLC2.2, GZMH.2, PFN1.1 
#> Negative:  CD74, HLA.DRA, CD79A, MS4A1, IGHM, CCL5.1, HLA.DRB1, CCL5, NKG7, HLA.DPA1 
#>     BANK1, HLA.DPB1, IGKC, CD37, IGHD, RPLP1, LTB, CST7, PFN1, RPS21 
#>     CST7.1, IGHG1, GZMH, RPS6, IGLC2, CALM1, GNLY, IGLC3, TCL1A, RPS5 
#> PC_ 3 
#> Positive:  MALAT1.1, IL32.1, RPS15A.1, RPS3.1, NKG7.1, RPS5.1, CALM1.1, RPS21.1, ETS1, PFN1.1 
#>     CD52.1, RPS6.1, GZMH.1, RPLP1.1, TRBC2, HLA.DPB1.1, HLA.DPA1.1, TRBC1.1, RPS10.1, RPS26.1 
#>     ID2, TRBC2.1, IL32, GZMH, SYNE2.1, S100A6, CD8B, HLA.DRB1.1, ETS1.1, GZMA 
#> Negative:  RPS3.2, RPS15A.2, RPS6.2, S100A4.2, SRGN.2, CD52.2, ETS1.2, RPLP1.2, RPS10.2, CXCR4.2 
#>     RPS5.2, IL32.2, RPS21.2, S100A6.2, MALAT1, SYNE2.2, PTP4A2.2, TRBC2.2, NAP1L1, GZMH.2 
#>     RPS26.2, ID2.2, CALM1.2, MALAT1.2, TRBC1.2, HCK.1, ID2.1, GNAI2.2, CD8B.2, HLA.DPA1 
#> PC_ 4 
#> Positive:  NEAT1.1, RPS26.1, DUSP1.1, IGHD, RPLP1.2, IL7R.1, RPLP1.1, RPS21.2, IGHM, GZMH.2 
#>     RPS6.2, RPS26.2, CXCR4.2, ZBTB7A.1, FCRL5, FOS.1, RPS6.1, IL7R, RPS10.1, RPS15A.2 
#>     LINC01272.2, LINC01272, IL4R, PFN1.1, RPS5.2, S100A6.2, CD247.1, RPS15A.1, PTP4A2.1, RPS21.1 
#> Negative:  RPLP1, RPS26, RPS6, RPS15A, NEAT1.2, DUSP1.2, NEAT1, RPS10, DUSP1, RPS21 
#>     IGHD.2, IGHD.1, RPS3, IL7R.2, IGHM.1, GZMH.1, ZBTB7A, IGHM.2, FCRL5.1, FCRL5.2 
#>     PTP4A2.2, CXCR4.1, FOS.2, GZMH, LINC01272.1, ZBTB7A.2, CD247.2, BIRC3.2, IL4R.2, BIRC3.1 
#> PC_ 5 
#> Positive:  TCL1A.2, TCL1A.1, RP5.887A10.1, IGHG1, IGHD.2, IGHD.1, IL4R.2, FCRL5.2, FCRL5.1, IGHM.2 
#>     NEAT1.1, IL4R.1, IGLC2, IGHM.1, LINC01272, LINC01272.2, NAP1L1, GZMB.1, ZBTB7A.1, CD68.2 
#>     CD68, CD247, MS4A1, DUSP1.1, BANK1, GZMB, S100A6.2, FOS.1, FCER1G.2, IGKC.1 
#> Negative:  TCL1A, RP5.887A10.1.2, RP5.887A10.1.1, IGHG1.1, IGHG1.2, IGHD, IL4R, NEAT1.2, FCRL5, IGHM 
#>     IGLC2.2, IGLC2.1, NEAT1, LINC01272.1, ZBTB7A, CD68.1, GZMB.2, DUSP1.2, MS4A1.1, MS4A1.2 
#>     JUNB.2, ZBTB7A.2, BANK1.2, BANK1.1, FOS.2, DUSP1, IGLC3.1, IGLC3.2, PFN1.2, CD247.2

Input

  1. train A data frame with cell type labels as the first column, followed by a gene expression matrix where each row is a cell and each column is a gene from the training dataset.
  2. test A gene expression matrix where each row is a cell and each column is a gene from the testing dataset.
  3. distribution A character string indicating the distribution assumption for positive gene expression levels. Should be one of “normal” (default), or “dep” (depth function?).
  4. correction A character string indicating the batch effect removal method of choice. Should be one of “auto” (default), “seurat”, or “harmony”. “auto” will automatically select the batch effect removal method that corresponds to scAnnotate’s recommended workflow for the given situation. That is, Seurat is selected for big data (i.e. all cell types have greater than 100 observations with at most one exception type, that has less than 100 and greater than 20 observations) and Harmony is selected for small data (i.e. all cell types have less than 100 observations)
  5. screening A character string indicating the gene screening method of choice. Should be one of “wilcox”(default) or “t.test”
  6. threshold A numeric value indicating the threshold used for probabilities to classify cells into classes. Should be number from “0” (default) to “1”. If there is no probability associated with any cell type that is higher than the threshold, the given cell will be labeled as “unassigned”.
  7. lognormalized A logical string indicate if both input data are log-normalized or not. TRUE (default) indicates input data are log-normalized, FALSE indicates input data are raw data.

Output

A vector containing the annotated cell type labels for the cells in the test data.

Check the prediction results by F1 score and accuracy

eva_cal(prediction = predict_label,cell_label = pbmc2[,1])
#>         B cell CD16+ monocyte Cytotoxic T cell mean F1 score  accuracy
#> [1,] 0.9383562      0.9283276        0.9170732      0.927919 0.9270186