pre_processRDS: Integrate the imformation of sgRNA into RDS file for the...

View source: R/pre_processRDS.R

pre_processRDSR Documentation

Integrate the imformation of sgRNA into RDS file for the further analysis.

Description

Pre-process the sgRNA count from previous step, and generate the sgRNA expression matrix.

Usage

pre_processRDS(BARCODE, RDS, normalize = TRUE, scale = TRUE) 

Arguments

BARCODE

A txt file to include cell identity information, generated from the cell identity collection step.

RDS

A Seurat object or local RDS file path that contains the scRNA-seq dataset. Note that the dataset has to be normalized and scaled.

normalize

Whether to perform normalization on sgRNA count matrix

scale

Whether to scale the normalized sgRNA count matrix

Value

Returns an updated Seurat object, with the following modifications:

- An added "sgrna_guide" assay that contains the normalized and scaled guide counts; - An added "sgrna" assay that contains the normalized and scaled target gene counts. Counts from different sgRNAs targeting the same gene are merged; - Several columns added to metadata to describe guide assignments (which can be overwritten by calling assign_cell_identity function later).

Examples

    ### BARCODE file contains cell identity information, generated from the cell identity collection step
    BARCODE <- system.file("extdata","barcode_rec.txt",package = "scMAGeCK")
    
    ### RDS can be a Seurat object or local RDS file path that contains the scRNA-seq dataset
    RDS <- system.file("extdata","singles_dox_mki67_v3.RDS",package = "scMAGeCK")
    
    Demo <- pre_processRDS(BARCODE = BARCODE, RDS = RDS)

weililab/scMAGeCK documentation built on Dec. 3, 2023, 11:18 p.m.