TODO

plotPermutationSamplesNormal(x, signature, samples, pointColor = "darkred")

Arguments

x

a list of class "splitTypeResults", the output object from runSubtypingfunction, to be graphed.

signature

a character string representing the signature that will be used to create the graph. The signature must be present in the object.

samples

a list of character string representing the names of the samples that will be used to create the graph. The samples must be present in the object.

pointColor

a character string representing the color of the dots representing the enrichment scores for the sampled values, obtained during the upscaling step, in the graph. Default: "darkred".

Value

a ggplot object that contains the density distribution of the enrichment score (shown as dashed lines) from the normal distribution calculated for each selected sample. The mean of the distribution is the enrichment score for the selected sample (shown as a vertical dotted line in the graph) while the standard deviation is obtained from the permutation step. The enrichment scores values sampled at the upscaling step are shown as dots in the graph.

Author

Astrid Deschênes

Examples


## Loading signatures
data("signaturesDemo")

## Load demo normalized expected counts for 30 patients
data("expNormalCountsDemo")

## Fix seed for reproducibility
set.seed(1221)

## Run classification on the 30 patients using 20 permutations on 75% of 
## the dataset, and 10 points per patient for the up-scaling step
results <- runSubtypingBimodal(geneLists=signaturesDemo, 
    expectedCountsMatrix=expNormalCountsDemo, 
    permRatio=0.75, permNbr=30, upscaleNbr=5)
#> number of iterations= 77 
#> number of iterations= 40 
    
## Graph the enrichment results from the permutation for 3 samples
plotPermutationSamplesNormal(x=results, 
    signature="2018_Tiriac_PDAC_PDO_basal-like_signature",
    samples=c("Patient_9", "Patient_25", "Patient_29"))
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` instead.
#> ℹ The deprecated feature was likely used in the splitTypeR package.
#>   Please report the issue at <https://github.com/adeschen/splitTypeR/issues>.