NathanSkene / EWCE

Expression Weighted Celltype Enrichment. See the package website for up-to-date instructions on usage.
https://nathanskene.github.io/EWCE/index.html
53 stars 25 forks source link

`generate_bootstrap_plots`: address warning #42

Closed bschilder closed 2 years ago

bschilder commented 2 years ago
ctd <- ewceData::ctd()
example_genelist <- ewceData::example_genelist()
level <- 1
reps <- 10

 full_results <-
        EWCE::bootstrap_enrichment_test(
            sct_data = ctd,
            sctSpecies = "mouse",
            hits = example_genelist,
            genelistSpecies = "human",
            reps = reps,
            annotLevel = level)

 boot_plot_dir1 <- EWCE::generate_bootstrap_plots(
        sct_data = ctd,
        sctSpecies = "mouse",
        hits = example_genelist,
        genelistSpecies = "human",
        annotLevel = level,
        full_results = full_results,
        listFileName = "VignetteGraphs",
        savePath = tempdir()
    )
Warning messages: 1: Transformation introduced infinite values in continuous y-axis
bschilder commented 2 years ago

Was occurring because sometimes val was 0, so logging it with log10() generated Inf values.

Solution: use log1p instead