read_fold_change_matrix_file: Read in sample fold change matrix.

View source: R/fold_changes.R

read_fold_change_matrix_fileR Documentation

Read in sample fold change matrix.

Description

Read file containing fold change matrix into a data frame.

Usage

read_fold_change_matrix_file(
  filepath = NULL,
  file_separator = "\t",
  file_header = TRUE,
  id_column = 1,
  gene_column = NULL,
  fc_column = NULL,
  is_gene = FALSE,
  processed = FALSE,
  ...
)

Arguments

filepath

Character string specifying a file path.

file_separator

fold changes file separator.

file_header

fold changes file header.

id_column

the index of column containing unique sgRNA identifiers.

gene_column

the index of column containing gene symbols.

fc_column

vector indices of columns containing sample fold changes.

is_gene

logical of whether fold changes are at sgRNA or gene level.

processed

logical of whether to apply predefined column names.

...

additional read.delim parameters.

Details

Reads a fold change matrix file, as defined by filepath, into a data frame. Requires annotation column indices be defined. For sgRNA-level fold changes:

  • id_column - column containing guide (sgRNA) identifiers (Default = 1).

  • gene_column - column containing gene symbols/identifiers (Default = 2).

  • fc_columns - indices of columns containing sample fold changes.

For gene-level fold changes:

  • id_column - column containing guide (sgRNA) identifiers (Default = 1).

  • fc_columns - indices of columns containing sample fold changes.

There must also be one or more columns containing sample fold changes whose indices are indicated using fc_columns. If fc_columns is NULL then it is assumed that all columns except id_column and/or gene_column contain fold change data.

Assumes by default that the fold changes file has a header, as defined by file_header, and that it is tab-delimited, as defined by file_separator.

Value

a data frame containing sample fold changes


cancerit/RCRISPR documentation built on April 26, 2023, 10:12 p.m.