Skip to contents

Merge stats data.frame from two sestats results, specifically when one object has "all rows" and is intended only to produce the non-P-value statistics such as group mean, max group mean (mgm), fold, and logFC.

Usage

merge_statdf_all_test(
  sestats_all,
  sestats_test,
  exclude_from_all = "P.val|^hit ",
  ...
)

Arguments

sestats_all

list with sestats data from se_contrast_stats() which used "all rows" of the source data, along with define_hits=FALSE.

sestats_test

list with sestats data from se_contrast_stats() which used a subset of rows, usually "detected rows" for the statistical test.

exclude_from_all

character pattern used with jamba::unvigrep() to exclude colnames from sestats_all. Default 'P.val|^hit ' excludes P-values and hit columns.

...

additional arguments are ignored.

Value

list object in the same format as sestats_test, with only the elements 'stats_df' and 'stats_dfs' replaced with the expanded complete set of data.

Details

  • sestats_all should have all rows, not just those tested. It will specifically exclude stats columns with 'P.val' or '^hit ' in the name, using argument exclude_from_all.

  • sestats_test should have only the subset of rows tested.

This function may be used internally within jamses to automate the job of testing a subset of rows, but reporting summary values for all rows - including those rows not formally tested.