CB2 (version 1.1)

run_sgrna_quant: A function to run a sgRNA quantification algorithm from NGS sample

Description

A function to run a sgRNA quantification algorithm from NGS sample

Usage

run_sgrna_quant(lib_path, design)

Arguments

lib_path

The path of the annotation file.

design

A table contains the study design. It must contain `fastq_path` and `sample_name.`

Value

It will return a list, and the list contains two elements. The first element (`count`) is a data frame contains the result of the quantification for each sample. The second element (`total`) is a numeric vector contains the total number of reads of each sample.

Examples

Run this code
# NOT RUN {
library(CB2)
library(magrittr)
library(tibble)
library(dplyr)
library(glue)
FASTA <- system.file("extdata", "toydata", "small_sample.fasta", package = "CB2")
ex_path <- system.file("extdata", "toydata", package = "CB2")

df_design <- tribble(
  ~group, ~sample_name,
  "Base", "Base1",  
  "Base", "Base2", 
  "High", "High1",
  "High", "High2") %>% 
    mutate(fastq_path = glue("{ex_path}/{sample_name}.fastq"))

cb2_count <- run_sgrna_quant(FASTA, df_design)

# }

Run the code above in your browser using DataLab