read_sample_count_file: Read sample count file.

View source: R/sample_counts.R

read_sample_count_fileR Documentation

Read sample count file.

Description

Reads in an individual sample count file to a SampleCounts object.

Usage

read_sample_count_file(
  filepath = NULL,
  sample_name = NULL,
  id_column = 1,
  gene_column = 2,
  count_column = 3,
  file_separator = "\t",
  file_header = TRUE,
  strip_ids = FALSE,
  ...
)

Arguments

filepath

character string specifying a file path.

sample_name

the sample name.

id_column

the index of column containing unique sgRNA identifiers.

gene_column

the index of column containing gene symbols.

count_column

the index of column containing counts.

file_separator

count file separator.

file_header

whether count file(s) contain a header.

strip_ids

whether to make syntactically valid id names.

...

additional read.delim parameters.

Details

Reads a file containing guide counts for a single file and creates a SampleCounts-class object.

Expects at least three columns which are defined by their index:

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

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

  • count_column - column containing sample counts (Default = 3).

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

Value

a SampleCounts object.

See Also

SampleCounts-class


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