Skip to content
No description, website, or topics provided.
R C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R removed gzstream.h because of the Windows compatibility problem. Dec 16, 2019
data Evers et al. data fix, and comment a test. May 16, 2019
inst now CB2 supports gzipped FASTQ files. Dec 9, 2019
man removed gzstream.h because of the Windows compatibility problem. Dec 16, 2019
src removed gzstream.h because of the Windows compatibility problem. Dec 16, 2019
tests have implemented the parallelized quantification. Dec 10, 2019
vignettes change plot_count_distribution and added a new vignette. Dec 11, 2019
.DS_Store removed gzstream.h because of the Windows compatibility problem. Dec 16, 2019
.Rbuildignore
.gitignore fixed a silly bug. Sep 20, 2019
CB2.Rproj
DESCRIPTION removed gzstream.h because of the Windows compatibility problem. Dec 16, 2019
LICENSE edit meta information Jan 31, 2019
NAMESPACE removed gzstream.h because of the Windows compatibility problem. Dec 16, 2019
README.md Update README.md Dec 16, 2019

README.md

What is CB2

CB2(CRISPRBetaBinomial) is a new algorithm for analyzing CRISPR data based on beta-binomial distribution. We provide CB2 as a R package, and the interal algorithms of CB2 are also implemented in CRISPRCloud.

Update

December 16, 2019

  • Regarding #4, CB2 now supports gzipped FASTQ file.
  • Regarding #5, calc_mappability() provide total_reads and mapped_reads columns.

July 2, 2019

There are several updates.

  • We have change the function name for the sgRNA-level test to measure_sgrna_stats. The original name run_estimation has been deprecated.
  • CB2 now supports a data.frame with character columns. In other words, you can use

How to install

Currently CB2 is now on CRAN, and you can install it using install.package function.

install.package("CB2")

Installation Github version of CB2 can be done using the following lines of code in your R terminal.

install.packages("devtools")
devtools::install_github("LiuzLab/CB2")

Alternatively, here is a one-liner command line for the installation.

Rscript -e "install.packages('devtools'); devtools::install_github('LiuzLab/CB2')"

A simple example how to use CB2 in R

FASTA <- system.file("extdata", "toydata",
                     "small_sample.fasta",
                     package = "CB2")
df_design <- data.frame()
for(g in c("Low", "High", "Base")) {
  for(i in 1:2) {
    FASTQ <- system.file("extdata", "toydata",
                         sprintf("%s%d.fastq", g, i), 
                         package = "CB2")
    df_design <- rbind(df_design, 
      data.frame(
        group = g, 
        sample_name = sprintf("%s%d", g, i),
        fastq_path = FASTQ, 
        stringsAsFactors = F)
      )
  }
}

MAP_FILE <- system.file("extdata", "toydata", "sg2gene.csv", package="CB2")
sgrna_count <- run_sgrna_quant(FASTA, df_design, MAP_FILE)
  
sgrna_stat <- measure_sgrna_stats(sgrna_count$count, df_design, 
                                  "Base", "Low", 
                                  ge_id = "gene",
                                  sg_id = "id")
gene_stat <- measure_gene_stats(sgrna_stat)

Or you could run the example with the following commented code.

sgrna_count <- run_sgrna_quant(FASTA, df_design)
sgrna_stat <- measure_sgrna_stats(sgrna_count$count, df_design, "Base", "Low")
gene_stat <- measure_gene_stats(sgrna_stat)

More detailed tutorial is available here!

You can’t perform that action at this time.