retrieve_guides_by_label: Splits guides by type

View source: R/load.R

retrieve_guides_by_labelR Documentation

Splits guides by type

Description

Gets all guides in each orientation for all unique gene pairs and the given columns. Assumes that orientation is determined by label columns which specify whether each guide targets an exonic region or an intergenic region. Exonic-targeting guides must be labeled as "exonic" and intergenic-targeting guides must be labeled as "intergenic". The column specified by label_col1 corresponds to the gene names specified by the column gene_col1, and similarly for label_col2 and gene_col2.

Usage

retrieve_guides_by_label(
  df,
  gene_pairs,
  screens,
  label_col1,
  label_col2,
  id_col1 = NULL,
  id_col2 = NULL
)

Arguments

df

A dataframe where each row corresponds to a single guide construct that targets two genes, which contains the columns named in the variables gene_col1, gene_col2, label_col1, label_col2 and replicate columns in screens.

gene_pairs

Dataframe returned by unique_gene_pairs.

screens

List of screens generated with add_screens.

label_col1

A column specify whether the guide in gene_col1 targeted an exonic or intergenic region, which must be labeled as "exonic" or "intergenic".

label_col2

See above, but for gene_col2.

id_col1

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

id_col2

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

Value

A list indexed by unique gene pairs that contains the gene names in the keys "gene1" and "gene2". Each column contained in each screen's replicates has its guide values stored in two keys, one for each orientation. For instance, the column "DMSO_T15" will have its values stored in the keys "orient1_DMSO_T15" and "orient2_DMSO_T15". The guide type is additionally contained in the key "guide_type".


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