score_combn_vs_single: Scores conditions against a single control.

View source: R/score.R

score_combn_vs_singleR Documentation

Scores conditions against a single control.

Description

Scores guides for any number of condition screens against a multiplicative null model derived from single-gene effects (e.g. for comparing paralog double-knockouts to single-knockouts for each paralogous gene). Do NOT use this function if you would like to directly compare conditions against a control. In that case, call score_conditions_vs_control instead. After running this function, pass the resulting dataframe to call_combn_hits to call significant effects.

Usage

score_combn_vs_single(
  combn_guides,
  single_guides,
  screens,
  screen_names,
  min_guides = 3,
  test = "moderated-t",
  loess = TRUE,
  fdr_method = "BY",
  filter_genes = NULL,
  ignore_orientation = FALSE,
  collapse_single_targeting = TRUE,
  return_residuals = TRUE,
  verbose = FALSE
)

Arguments

combn_guides

A list of exonic-exonic guides returned from split_guides.

single_guides

A list of exonic-intergenic guides returned from split_guides.

screens

List of screens generated with add_screens.

screen_names

A list of screen names to score against a derived null model from single-gene effects.

min_guides

The minimum number of guides per gene pair required to score data (default 3).

test

Type of hypothesis testing to run. Must be one of "rank-sum" for Wilcoxon rank-sum testing or "moderated-t" for moderated t-testing (default "moderated-t").

loess

If true, loess-normalizes residuals before running hypothesis testing. Only works when test = "moderated-t" (default TRUE).

fdr_method

Type of FDR to compute. One of "BH", "BY" or "bonferroni" (default "BY").

filter_genes

List of genes to filter from scoring (default NULL).

ignore_orientation

If TRUE, aggregates guides across both orientations, returning only one p-value and FDR column with orientation2 p-values set to NA (default FALSE).

collapse_single_targeting

If TRUE, takes the mean of single-targeting controls when there are multiple controls that match a given gene pair (default TRUE).

return_residuals

If FALSE, doesn't return residuals dataframe (default TRUE). This is recommend if scoring large datasets and memory is a limitation.

verbose

If true, prints verbose output (default FALSE).

Value

A list containing two dataframes. The first entry, named "scored_data" in the list, contains scored data with separate columns given by the specified control and condition names. The second entry, named "residuals" in the list, is a dataframe containing control, condition and loess-normalized residuals for all guides.


HenryWard/orthrus documentation built on June 2, 2023, 10:28 p.m.