
Calculate counts-per-million (CPM) on raw counts in a multiOmicDataSet
Source:R/counts.R
calc_cpm.RdCalculate counts-per-million (CPM) on raw counts in a multiOmicDataSet
See also
Other moo methods:
batch_correct_counts(),
clean_raw_counts(),
diff_counts(),
extract_counts(),
filter_counts(),
filter_diff(),
normalize_counts(),
plot_corr_heatmap(),
plot_expr_heatmap(),
plot_histogram(),
plot_pca(),
plot_pca_2d(),
plot_pca_3d(),
plot_read_depth(),
plot_venn_diagram(),
plot_volcano_enhanced(),
plot_volcano_summary(),
run_deseq2(),
set_color_pal(),
set_default_colors()
Examples
sample_meta <- data.frame(
sample_id = c("KO_S3", "KO_S4", "WT_S1", "WT_S2"),
condition = factor(
c("knockout", "knockout", "wildtype", "wildtype"),
levels = c("wildtype", "knockout")
)
)
moo <- create_multiOmicDataSet_from_dataframes(sample_meta, gene_counts) |>
calc_cpm()
head(moo@counts$cpm)
#> gene_id KO_S3 KO_S4 WT_S1 WT_S2
#> 1 ENSG00000121410.11 0 0 0 0
#> 2 ENSG00000268895.5 0 0 0 0
#> 3 ENSG00000148584.15 0 0 0 0
#> 4 ENSG00000175899.14 0 0 0 0
#> 5 ENSG00000245105.3 0 0 0 0
#> 6 ENSG00000166535.20 0 0 0 0