DataObj: DataObjClass: R6 Environment Object for CRISPR Data

Description Details Value Public fields Methods

Description

This function is an R6 object class to create an environment for data analysis. Use to load all data associated with a single-target negative selection CRISPR screen; stores all data with minimal processing, but checks for errors and data inconsistencies.

Details

All data objects in this class currently public, permitting operations without copying over the entire dataset in function calls. Normalization results and other preprocessing performed by ModelObjClass.

Value

DataObj(R6) of all data used in experiment. When applicable, raw count data is returned. Normalization should happen as ModelObj.

Public fields

init_counts

data.table of initial read counts.

dep_counts

data.table of depleted read counts.

master_counts

data.table of read counts from master library.

neg_control_file

Name of file containing negative control genes.

guide_covars

File name for sgRNA efficiency prediction features.

guide2gene_map

Index for gene targeted by each sgRNA.

init_total_reads

Total reads per initial sample.

dep_total_reads

Total reads per depleted sample.

cells_infected

Total number of cells infected per sample.

sample_masterlib

Index for which masterlibrary went to which sample.

sample_annotations

Sample annotations; used for partitioning test/ctrl.

Methods

Public methods


Method new()

Create a new DataObj

Usage
DataObj$new(
  masterFiles = NA,
  countFile,
  negCtrlFile = NA,
  cellsInfected = NA,
  guideCovarFile = NA,
  sampleInfoFile = NA,
  totalReads = NA,
  hasInitSeq = T,
  sampleMasterInfoFile = NA,
  useSamples = NA
)
Arguments
masterFiles

Vector of file names of master libraries. 1 column sgrna.

countFile

Text file with columns sgrna-name, gene, init_sample_1, dep_sample_1, etc.

negCtrlFile

Text file with first column containing names of negative control genes.

cellsInfected

Integer of total number of cells infected by masterlibrary in masterFile; defaults to 1e3 cells per guide in master library.

guideCovarFile

File with features to use in guide efficiency modelling.

sampleInfoFile

File with sample initial reads info and sample types (e.g. test/ctrl)

totalReads

Optional numeric value or vector with by-sample total read counts.

hasInitSeq

Default True; are counts for initial infected guides present in count file?

sampleMasterInfoFile

File mapping samples to masterlibrary files.

useSamples

Optional. Sample indices in countFile to analyze. Subsets data stored in object. Only depleted sample indices must be given; any initial samples will be auto-matched. Write messages and warnings to log file. @param message_vector String or table to write.


Method clone()

The objects of this class are cloneable with this method.

Usage
DataObj$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


CshlSiepelLab/ACE documentation built on Sept. 10, 2021, 11:21 p.m.