qc_table <- as.data.frame(attr(metadata, "de_params")) datatable(qc_table, colnames = "", options = list(pageLength = 5))
Differential gene expression was performed on a total of r prettyNum(as.numeric(attr(metadata, "de_params")["n_genes"]),big.mark=",",scientific=FALSE)
genes which expressed a minimum of r as.numeric(attr(metadata, "de_params")["min_counts"])
count in at least r as.numeric(attr(metadata, "de_params")["min_cells_pc"])*100
percent of the cells. Differentially expressed genes (DEGs) were detected at a fold-change threshold of r as.numeric(attr(metadata, "report_params")["fc_threshold"])
and an adjusted p-value (padj) cut-off of r as.numeric(attr(metadata, "report_params")["pval_cutoff"])
was applied.
Up <- as.numeric(attr(metadata, "de_result")["Up"]) Down <- as.numeric(attr(metadata, "de_result")["Down"]) Total_gene <- as.numeric(attr(metadata, "de_params")["n_genes"]) Up_percent <- Up/Total_gene*100 Down_percent <- Down/Total_gene*100
r sprintf("\n\n**Up-regulated:** %g (%g%%) \n\n", Up, Up_percent)
r sprintf("\n\n**Down-regulated:** %g (%g%%) \n\n", Down, Down_percent)
metadata_plot <- attr(metadata, "plot")
fc_threshold <- as.numeric(attr(metadata, "report_params")["fc_threshold"]) pval_cutoff <- as.numeric(attr(metadata, "report_params")["pval_cutoff"]) #metadata_table <- metadata metadata_table <- metadata %>% dplyr::filter(!is.na(padj)) %>% dplyr::filter(!is.nan(logFC)) %>% dplyr::filter(padj <= pval_cutoff, abs(logFC) >= log2(fc_threshold)) %>% dplyr::mutate_at(c("pval", "logFC", "ci.hi", "ci.lo", "padj"), ~ as.numeric(format(., format = "e", digits = 2))) %>% dplyr::mutate_at("variance", ~ round(., 2)) # metadata_table$pval <- as.numeric(format(metadata_table$pval, format = "e", digits = 2)) # metadata_table$logFC <- as.numeric(format(metadata_table$logFC, format = "e", digits = 2)) # metadata_table$ci.hi <- as.numeric(format(metadata_table$ci.hi, format = "e", digits = 2)) # metadata_table$ci.lo <- as.numeric(format(metadata_table$ci.lo, format = "e", digits = 2)) # metadata_table$padj <- as.numeric(format(metadata_table$padj, format = "e", digits = 2)) datatable(metadata_table, rownames = FALSE, options = list(pageLength = 10, scrollX=T, autoWidth = TRUE, columnDefs = list(list(width = '500px', targets = 12))), escape = FALSE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.