View source: R/model_result_interaction.r
TidySampleData | R Documentation |
TidySampleData convert data from PseudobulkList into a dataframe for each sample across cell types of the top differentially expressed genes for a contrast
TidySampleData(
av.exprs.list,
result.list,
P.Value.filter,
logFC.filter,
top_n_genes = NULL
)
av.exprs.list |
object returned by 'PseudobulkList' summed or average counts |
result.list |
object returned by object returned by 'GetContrastResultsRaw()' or 'GetContrastResults()' |
P.Value.filter |
filter results |
logFC.filter |
filter results |
top_n_genes |
instead of stat thresholds above, get expression of n genes specified by this param, subsets each celltype by the top n genes ranked by t statistic. |
a list of tidy dataframes by celltype
## Not run:
av = scglmmr::PseudobulkList(rawcounts = umi,
metadata = meta,
sample_col = "sample",
celltype_col = "celltype",
avg_or_sum = 'average')
fit_res = scglmmr::GetContrastResultsRaw(limma.fit.object.list = fit,
coefficient.number = 1,
contrast.name = "foldchangedifference")
le_expr = scglmmr::TopGenesTidySampleExprs(av.exprs.list = av, result.list = fit_res, P.Value.filter = 0.2, logFC.filter=0.1, top_n_genes = 20)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.