Fetch the table of top markers that pass the filtering

getFindMarkerTopTable(
  inSCE,
  log2fcThreshold = 1,
  fdrThreshold = 0.05,
  minClustExprPerc = 0.7,
  maxCtrlExprPerc = 0.4,
  minMeanExpr = 1,
  topN = 10
)

findMarkerTopTable(
  inSCE,
  log2fcThreshold = 1,
  fdrThreshold = 0.05,
  minClustExprPerc = 0.7,
  maxCtrlExprPerc = 0.4,
  minMeanExpr = 1,
  topN = 10
)

Arguments

inSCE

SingleCellExperiment inherited object.

log2fcThreshold

Only use DEGs with the absolute values of log2FC larger than this value. Default 1

fdrThreshold

Only use DEGs with FDR value smaller than this value. Default 0.05

minClustExprPerc

A numeric scalar. The minimum cutoff of the percentage of cells in the cluster of interests that expressed the marker gene. Default 0.7.

maxCtrlExprPerc

A numeric scalar. The maximum cutoff of the percentage of cells out of the cluster (control group) that expressed the marker gene. Default 0.4.

minMeanExpr

A numeric scalar. The minimum cutoff of the mean expression value of the marker in the cluster of interests. Default 1.

topN

An integer. Only to fetch this number of top markers for each cluster in maximum, in terms of log2FC value. Use NULL to cancel the top N subscription. Default 10.

Value

An organized data.frame object, with the top marker gene information.

Details

Users have to run runFindMarker prior to using this function to extract a top marker table.

Examples

data("mouseBrainSubsetSCE", package = "singleCellTK")
mouseBrainSubsetSCE <- runFindMarker(mouseBrainSubsetSCE,
                                     useAssay = "logcounts",
                                     cluster = "level1class")
#> Sat Mar 18 10:27:51 2023 ... Identifying markers for cluster 'microglia', using DE method 'wilcox'
#> Sat Mar 18 10:27:52 2023 ... Identifying markers for cluster 'oligodendrocytes', using DE method 'wilcox'
#> Sat Mar 18 10:27:52 2023 ... Organizing findMarker result
getFindMarkerTopTable(mouseBrainSubsetSCE)
#>        Gene  Log2_FC       Pvalue          FDR      level1class clusterExprPerc
#> 1228   Apoe 4.439115 3.642815e-06 0.0001796628        microglia       1.0000000
#> 1114   Lyz2 3.873899 2.771660e-05 0.0004581158        microglia       0.8000000
#> 1130   C1qa 3.862682 6.733332e-07 0.0001720692        microglia       1.0000000
#> 1100    Pf4 3.466775 2.771660e-05 0.0004581158        microglia       0.8000000
#> 1112 Tyrobp 3.282906 6.733332e-07 0.0001720692        microglia       1.0000000
#> 1126   C1qb 3.281828 2.516695e-06 0.0001720692        microglia       0.9333333
#> 1182  Ccl12 3.151363 8.600798e-06 0.0002501837        microglia       0.8666667
#> 1127  Fcgr3 3.130255 2.516695e-06 0.0001720692        microglia       0.9333333
#> 1131  Fcrls 2.955799 6.755317e-07 0.0001720692        microglia       1.0000000
#> 1150   Mrc1 2.954606 2.757165e-05 0.0004581158        microglia       0.8000000
#> 1002    Mal 5.361403 7.495067e-06 0.0002501837 oligodendrocytes       1.0000000
#> 1048   Apod 5.311107 2.203822e-06 0.0001720692 oligodendrocytes       1.0000000
#> 897     Mog 5.161946 1.256717e-06 0.0001720692 oligodendrocytes       1.0000000
#> 906   Enpp2 4.327247 6.757710e-06 0.0002501837 oligodendrocytes       1.0000000
#> 936   Ugt8a 4.319125 2.403213e-06 0.0001720692 oligodendrocytes       1.0000000
#> 1014   Ermn 4.318830 1.865414e-06 0.0001720692 oligodendrocytes       1.0000000
#> 843    Mobp 4.075208 2.084154e-06 0.0001720692 oligodendrocytes       1.0000000
#> 1001   Qdpr 4.061774 1.641748e-06 0.0001720692 oligodendrocytes       1.0000000
#> 1017  Cryab 4.001140 1.743790e-06 0.0001720692 oligodendrocytes       1.0000000
#> 831  Tspan2 3.743799 3.649158e-06 0.0001796628 oligodendrocytes       1.0000000
#>      ControlExprPerc clusterAveExpr
#> 1228      0.33333333       5.076598
#> 1114      0.00000000       3.873899
#> 1130      0.00000000       3.862682
#> 1100      0.00000000       3.466775
#> 1112      0.00000000       3.282906
#> 1126      0.00000000       3.281828
#> 1182      0.00000000       3.151363
#> 1127      0.00000000       3.130255
#> 1131      0.00000000       2.955799
#> 1150      0.00000000       2.954606
#> 1002      0.40000000       6.370450
#> 1048      0.33333333       5.838233
#> 897       0.13333333       5.475308
#> 906       0.40000000       5.093370
#> 936       0.20000000       4.771216
#> 1014      0.26666667       4.663492
#> 843       0.26666667       4.430003
#> 1001      0.06666667       4.261774
#> 1017      0.20000000       4.306804
#> 831       0.20000000       4.155127