Skip to contents

Create volcano plot with EnhancedVolcano

Usage

plotEnhancedVolcano(result, group, ...)

Arguments

result

Data frame table returned by runMarkerDEG or runPairwiseDEG.

group

Selection of one group available from result$group. If only one group is available from result, default NULL uses it.

...

Arguments passed to EnhancedVolcano::EnhancedVolcano(), except that toptable, lab, x and y are prefilled by this wrapper.

Value

ggplot

Examples

# \donttest{
if (requireNamespace("EnhancedVolcano", quietly = TRUE)) {
    defaultCluster(pbmc) <- pbmcPlot$leiden_cluster
    # Test the DEG between "stim" and "ctrl", within each cluster
    result <- runPairwiseDEG(
        pbmc,
        groupTest = "stim",
        groupCtrl = "ctrl",
        variable1 = "dataset",
        splitBy = "defaultCluster"
    )
    plotEnhancedVolcano(result, "0.stim")
}
#>  Storing given cluster labels to `cellMeta(x)` field: "defaultCluster".
#>  Running DEG within: "0"
#>  Calling pairwise DESeq2 Wald test
#>  Calling pairwise DESeq2 Wald test ... done
#> 
#>  Running DEG within: "1"
#>  Calling pairwise DESeq2 Wald test
#> -- note: fitType='parametric', but the dispersion trend was not well captured by the
#>    function: y = a/x + b, and a local regression fit was automatically substituted.
#>    specify fitType='local' or 'mean' to avoid this message next time.
#>  Calling pairwise DESeq2 Wald test ... done
#> 
#>  Running DEG within: "2"
#>  Calling pairwise DESeq2 Wald test
#>  Calling pairwise DESeq2 Wald test ... done
#> 
#>  Running DEG within: "3"
#>  Calling pairwise DESeq2 Wald test
#>  Calling pairwise DESeq2 Wald test ... done
#> 
#>  Running DEG within: "4"
#>  Calling pairwise DESeq2 Wald test
#>  Calling pairwise DESeq2 Wald test ... done
#> 
#>  Running DEG within: "5"
#>  Calling pairwise DESeq2 Wald test
#>  Calling pairwise DESeq2 Wald test ... done
#> 
#>  Running DEG within: "6"
#>  Calling pairwise DESeq2 Wald test
#>  Calling pairwise DESeq2 Wald test ... done
#> 
#>  Running DEG within: "7"
#>  Calling pairwise DESeq2 Wald test
#> ! Ignoring replicates (size in bracket) with too few cells: "others.ctrl.rep1 (2)"
#>  Calling pairwise DESeq2 Wald test

#>  Consider decrease minCellPerRep to exclude less replicates or/and lower nPsdRep to generate larger pseudo-replicates.
#>  Calling pairwise DESeq2 Wald test

#>  Error when computing on "7.stim": Too few replicates with more than 3 cells (`minCellPerRep`) for condition "others".
#>  Calling pairwise DESeq2 Wald test

#> ! Empty result returned for this test.
#>  Calling pairwise DESeq2 Wald test

#>  Calling pairwise DESeq2 Wald test ... failed
#> 

# }