Users have to run runDEAnalysis() first, any of the wrapped functions of this generic function. Users can set further filters on the result. A data.frame object, with variables of Gene, Log2_FC, Pvalue, and FDR, will be returned.

getDEGTopTable(
  inSCE,
  useResult,
  labelBy = S4Vectors::metadata(inSCE)$featureDisplay,
  onlyPos = FALSE,
  log2fcThreshold = 0.25,
  fdrThreshold = 0.05,
  minGroup1MeanExp = NULL,
  maxGroup2MeanExp = NULL,
  minGroup1ExprPerc = NULL,
  maxGroup2ExprPerc = NULL
)

Arguments

inSCE

SingleCellExperiment inherited object, with of the singleCellTK DEG method performed in advance.

useResult

character. A string specifying the analysisName used when running a differential expression analysis function.

labelBy

A single character for a column of rowData(inSCE) as where to search for the labeling text. Leave NULL for rownames. Default metadata(inSCE)$featureDisplay (see setSCTKDisplayRow).

onlyPos

logical. Whether to only fetch DEG with positive log2_FC value. Default FALSE.

log2fcThreshold

numeric. Only fetch DEGs with the absolute values of log2FC larger than this value. Default 0.25.

fdrThreshold

numeric. Only fetch DEGs with FDR value smaller than this value. Default 0.05.

minGroup1MeanExp

numeric. Only fetch DEGs with mean expression in group1 greater then this value. Default NULL.

maxGroup2MeanExp

numeric. Only fetch DEGs with mean expression in group2 less then this value. Default NULL.

minGroup1ExprPerc

numeric. Only fetch DEGs expressed in greater then this fraction of cells in group1. Default NULL.

maxGroup2ExprPerc

numeric. Only fetch DEGs expressed in less then this fraction of cells in group2. Default NULL.

Value

A data.frame object of the top DEGs, with variables of Gene, Log2_FC, Pvalue, and FDR.

Examples

data("sceBatches")
sceBatches <- scaterlogNormCounts(sceBatches, "logcounts")
sce.w <- subsetSCECols(sceBatches, colData = "batch == 'w'")
sce.w <- runWilcox(sce.w, class = "cell_type", classGroup1 = "alpha",
                   groupName1 = "w.alpha", groupName2 = "w.beta",
                   analysisName = "w.aVSb")
#> Sat Mar 18 10:27:48 2023 ... Running DE with wilcox, Analysis name: w.aVSb
getDEGTopTable(sce.w, "w.aVSb")
#>               Gene     Log2_FC       Pvalue          FDR group1MeanExp
#> 2              GCG   9.1517909 2.368614e-19 4.737227e-18    18.2513675
#> 48              GC   7.1878882 4.658205e-15 5.822756e-14     8.7962925
#> 9           TM4SF4   6.4072019 2.739759e-13 2.490690e-12    10.2257508
#> 72            RGS4   5.4637919 9.524267e-10 6.349511e-09     9.3192184
#> 61            PDK4   4.5360064 2.535638e-07 1.056516e-06     8.4809718
#> 88             TTR   4.3825672 3.348780e-17 4.783971e-16    16.0047494
#> 68        SERPINA1   2.9853497 2.218207e-04 5.837387e-04     7.0352827
#> 78        KCNQ1OT1   2.6699417 6.608041e-04 1.501827e-03     6.0075125
#> 11            PENK   0.9654197 1.754329e-02 3.189689e-02     1.0147027
#> 97           SNX22  -1.1238276 3.454043e-03 6.908086e-03     7.8894950
#> 81            PKM2  -1.1729284 6.785609e-03 1.330512e-02     7.3410304
#> 96        C11orf10  -1.2673860 4.634275e-04 1.077738e-03     7.1695226
#> 73             FOS  -1.3535129 1.823620e-02 3.256465e-02     8.2410871
#> 64         C6orf62  -1.4303264 1.776495e-03 3.779777e-03    10.1448315
#> 85        C10orf58  -1.6580742 8.496465e-03 1.603107e-02     5.4053757
#> 40            VCAN  -1.6914180 2.586650e-04 6.632435e-04     0.1348696
#> 18    NM-001166106  -1.7095593 4.756783e-07 1.902713e-06     9.7766808
#> 43            MLL3  -1.7807672 4.587914e-04 1.077738e-03     7.7422834
#> 98  RPL17-C18ORF32  -1.7895368 8.133631e-06 2.804700e-05     6.8208473
#> 69             MLL  -1.8153392 1.348475e-03 2.996612e-03     5.9892851
#> 70          TUBA1A  -1.8223863 4.544070e-05 1.336491e-04     9.5849051
#> 87        KIAA0494  -1.8671111 2.676761e-02 4.696072e-02     4.5435264
#> 75            ROD1  -1.8832646 7.790889e-03 1.498248e-02     5.2421307
#> 20            EGR1  -2.0661563 3.793268e-04 9.251873e-04     9.0059561
#> 33             CHP  -2.0821137 2.684848e-04 6.712119e-04     8.0260864
#> 44           SRSF6  -2.0881730 1.189004e-05 3.835497e-05     9.5833679
#> 83        FLJ43390  -2.1821390 1.284192e-02 2.378134e-02     4.1766723
#> 99           TTC35  -2.2703597 1.915506e-03 3.990638e-03     3.9697651
#> 51         C2orf28  -2.3401725 1.039625e-04 2.809797e-04     6.7207090
#> 80            MLL5  -2.3693014 6.750971e-06 2.411061e-05     6.9113917
#> 79          TMEM85  -2.5089275 1.018119e-05 3.393730e-05     5.6858668
#> 63       LOC729013  -2.5631018 1.561273e-03 3.394072e-03     4.2301904
#> 39            RIN2  -2.6455051 1.481920e-06 5.488594e-06     9.2894285
#> 52        C14orf43  -2.6597468 2.774656e-03 5.662562e-03     4.0551095
#> 71            TLK1  -2.7498540 1.541148e-07 6.700642e-07     8.9463780
#> 32          SEC22B  -2.7715616 2.049612e-09 1.281007e-08     8.3433933
#> 26       LOC647979  -2.9204542 2.744513e-09 1.614419e-08     8.6952640
#> 66          C9orf5  -2.9296536 3.752854e-05 1.172767e-04     4.9630843
#> 22         SLC30A8  -3.0773276 1.216120e-08 6.080598e-08     9.5767369
#> 77          ZNF252  -3.1415988 6.620272e-05 1.838964e-04     2.7664542
#> 59           SC5DL  -3.2686407 4.937434e-05 1.410695e-04     4.8721506
#> 56            PTEN  -3.3372373 3.758369e-10 2.684550e-09     9.0773050
#> 53           ETNK1  -3.4238773 8.381062e-08 3.990982e-07     8.5213021
#> 67         FAM18B1  -3.4609207 5.739256e-09 3.020661e-08     5.7486900
#> 46          DPYSL2  -3.6028768 3.064074e-10 2.356980e-09     8.6913722
#> 100        C8orf83  -3.7073784 6.952554e-07 2.674059e-06     3.3887995
#> 89            SCGN  -3.8122943 3.019451e-14 3.354946e-13     8.7238794
#> 47            TSIX  -3.9086902 4.398954e-05 1.333016e-04     2.6458110
#> 34           MAP1B  -4.0106181 6.802842e-14 6.802842e-13     9.4915049
#> 28        C10orf46  -4.1172723 1.264781e-07 5.749006e-07     6.0973324
#> 37           G6PC2  -4.5526717 4.065000e-09 2.258333e-08     6.6388158
#> 86            RBP4  -5.5673377 4.757801e-11 3.964834e-10     0.6734410
#> 74         ADCYAP1  -9.5222344 3.683325e-21 3.683325e-19     0.4903626
#> 57            HADH -10.5612840 6.226069e-20 3.113034e-18     1.3295260
#> 16            IAPP -11.3726919 1.027650e-17 1.712751e-16     2.8707631
#> 1              INS -12.7028733 2.368614e-19 4.737227e-18     3.9112870
#> 29        INS-IGF2 -12.9324068 2.367422e-19 4.737227e-18     3.1557017
#>     group2MeanExp group1ExprPerc group2ExprPerc
#> 2      9.09957654      1.0000000          1.000
#> 48     1.60840430      0.9529412          0.550
#> 9      3.81854893      0.9647059          0.950
#> 72     3.85542656      0.9882353          0.675
#> 61     3.94496542      0.9411765          0.725
#> 88    11.62218219      1.0000000          0.950
#> 68     4.04993303      0.9176471          0.775
#> 78     3.33757081      0.8235294          0.600
#> 11     0.04928302      0.1764706          0.025
#> 97     9.01332262      0.9764706          1.000
#> 81     8.51395886      0.9529412          1.000
#> 96     8.43690863      0.9764706          0.975
#> 73     9.59460002      0.9411765          0.925
#> 64    11.57515787      1.0000000          1.000
#> 85     7.06344991      0.8352941          0.900
#> 40     1.82628761      0.1058824          0.350
#> 18    11.48624002      1.0000000          1.000
#> 43     9.52305067      0.9647059          0.975
#> 98     8.61038416      0.9882353          0.975
#> 69     7.80462426      0.9058824          0.950
#> 70    11.40729140      0.9882353          1.000
#> 87     6.41063752      0.8235294          0.850
#> 75     7.12539527      0.8941176          0.900
#> 20    11.07211242      0.9647059          0.950
#> 33    10.10820003      0.9647059          1.000
#> 44    11.67154094      0.9882353          1.000
#> 83     6.35881128      0.8000000          0.775
#> 99     6.24012476      0.7294118          0.875
#> 51     9.06088151      0.8705882          0.975
#> 80     9.28069305      0.9529412          1.000
#> 79     8.19479424      0.8823529          0.950
#> 63     6.79329220      0.6117647          0.850
#> 39    11.93493359      0.9529412          1.000
#> 52     6.71485637      0.6941176          0.850
#> 71    11.69623200      0.9882353          1.000
#> 32    11.11495483      1.0000000          1.000
#> 26    11.61571820      1.0000000          1.000
#> 66     7.89273792      0.8235294          0.900
#> 22    12.65406454      0.9764706          1.000
#> 77     5.90805298      0.5294118          0.825
#> 59     8.14079126      0.8352941          0.875
#> 56    12.41454230      0.9882353          1.000
#> 53    11.94517933      0.9764706          1.000
#> 67     9.20961064      0.8352941          0.975
#> 46    12.29424906      1.0000000          1.000
#> 100    7.09617794      0.6705882          0.925
#> 89    12.53617374      0.9764706          1.000
#> 47     6.55450124      0.4235294          0.725
#> 34    13.50212304      0.9882353          1.000
#> 28    10.21460475      0.8588235          0.925
#> 37    11.19148754      0.8941176          0.975
#> 86     6.24077871      0.3764706          0.800
#> 74    10.01259702      0.3058824          1.000
#> 57    11.89080997      0.5294118          1.000
#> 16    14.24345508      0.8588235          0.975
#> 1     16.61416028      0.9882353          1.000
#> 29    16.08810854      0.9647059          1.000