retrieve_guides_by_gene: Retrieve guide values for gene pairs

View source: R/load.R

retrieve_guides_by_geneR Documentation

Retrieve guide values for gene pairs

Description

Gets all guides in each orientation for all gene pairs and the given columns, assuming that guide orientation is determined by the gene name columns. Must be run after unique_gene_pairs to take the dataframe returned from that function as input.

Usage

retrieve_guides_by_gene(
  df,
  gene_pairs,
  screens,
  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 gene1, gene2 and optionally the columns specified by id_col1 and id_col2.

gene_pairs

Dataframe returned by unique_gene_pairs.

screens

List of screens generated with add_screens.

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

Value

A list indexed by unique gene pairs that contains the gene names in the keys "gene1" and "gene2". Each column specified in guide_cols 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".


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