calc_mappability: A function to calculate the mappabilities of each NGS sample.

Description Usage Arguments Examples

View source: R/utils.R

Description

A function to calculate the mappabilities of each NGS sample.

Usage

1
calc_mappability(count_obj, df_design)

Arguments

count_obj

A list object is created by 'run_sgrna_quant'.

df_design

The table contains a study design.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)
calc_mappability(cb2_count, df_design)

CB2 documentation built on July 24, 2020, 5:08 p.m.