View source: R/expression_processing.R
fix_frq_df | R Documentation |
fix_frq_df
Fix muscat-bug in fraction calculation in case that expression fraction would be NA / NaN. Change NA to 0.
fix_frq_df(sce, frq_celltype_samples)
sce |
SingleCellExperiment object of the scRNAseq data of interest. |
frq_celltype_samples |
Sample-average data frame output of 'get_muscat_exprs_frac' |
Fixed data frame with fraction of cells expressing a gene.
## Not run: library(dplyr) sample_id = "tumor" group_id = "pEMT" celltype_id = "celltype" frq_df = get_muscat_exprs_frac(sce, sample_id = sample_id, celltype_id = celltype_id, group_id = group_id) %>% .$frq_celltype_samples if(nrow(frq_df %>% dplyr::filter(is.na(fraction_sample))) > 0 | nrow(frq_df %>% dplyr::filter(is.nan(fraction_sample))) > 0) { frq_df = fix_frq_df(sce, frq_df) } ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.