orthrus_wrapper: All-in-one wrapper for Orthrus

View source: R/score.R

orthrus_wrapperR Documentation

All-in-one wrapper for Orthrus

Description

Takes in three .tsv files for per-replicate readcounts, a mapping of screens to replicates, and a list of screens to score, and scores all given screens before outputting results to a given folder. The format for each .tsv file is described below.

Usage

orthrus_wrapper(
  reads_file,
  sample_file,
  batch_file,
  output_folder,
  id_col1 = NULL,
  id_col2 = NULL,
  filter_names = NULL,
  filter_genes = NULL,
  min_reads = 30,
  max_reads = 10000,
  display_numbers = FALSE,
  negative_controls = NULL,
  test = "moderated-t",
  loess = TRUE,
  ignore_orientation = FALSE,
  neg_type = "Negative",
  pos_type = "Positive",
  fdr_method = "BY",
  fdr_threshold = 0.1,
  differential_threshold = 0.5,
  plot_type = "png"
)

Arguments

reads_file

Path to .tsv file where each row corresponds to a single guide construct that targets two genomic locations, which contains the columns gene1, gene2 and optionally the columns specified by id_col1 and id_col2.

sample_file

Path to .tsv file with three columns: Screen, Replicates, and NormalizeTo. Screen is the name of the screen, replicates are each technical replicate separated by semicolons, and NormalizeTo is either the screen to normalize against or NA if unnecessary (e.g. for T0 screens).

batch_file

Path to .tsv file mapping screens to their controls for scoring, with two columns for "Screen" and "Control." Screens to score against dervied null-models with the combn scoring mode must have their respective control labeled as "combn."

output_folder

Folder to output scored data and plots to.

id_col1

A column containing guide-specific indices, e.g. guide sequences or IDs, for guides in the column gene1 (optional, default NULL).

id_col2

A column containing guide-specific indices, e.g. guide sequences or IDs, for guides in the column gene2 (optional, default NULL).

filter_names

List of screen names to filter based on read counts by.

filter_genes

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

min_reads

Minimum number of reads to keep (default 30, anything below this value will be filtered out).

max_reads

Maximum number of reads to keep (default 10000, anything above this value will be filtered out).

display_numbers

Whether or not to include PCC values in heatmap (default TRUE).

negative_controls

List of negative control genes to append to default list of non-essential genes (default NULL).

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).

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).

neg_type

Label for significant effects with a negative differential effect (default "Negative").

pos_type

Label for significant effects with a positive differential effect (default "Positive").

fdr_method

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

fdr_threshold

Threshold below which to call gene effects as significant (default 0.1).

differential_threshold

Absolute value threshold on differential effects, below which gene effects are not called as significant (default 0.5).

plot_type

Type of plot to output, one of "png" or "pdf" (default "png").

Details

reads_file: A tab-separated file with readcounts for each guide and each replicate. In addition to numerical readcounts columns, genes must be labeled in columns named "gene1" and "gene2." Optionally, the dataset may also contain columns with guide-specific IDs, such as guide sequences, which the user can specify the names of in the parameters id_col1 and id_col2. These are required to compute matching guide-specific residuals when test is specified as "moderated-t." sample_file: batch_file:


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