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 the C++ dependency
A bug fix regarding #14. Thanks @DaneseAnna for reporting the issue.
If you are experiencing an issue during the installation, it would be
possible due to multtest
package hasn’t been installed. If
so, please use the following snippet to install the package.
install.package("BiocManager") # can be omitted if you have installed the package
install.packages("multtest")
logFC
parameter value of
measure_gene_stats
to gene
will provide the
logFC
calculate by gene-level CPMs.join_count_and_design
function.calc_mappability()
provide total_reads
and
mapped_reads
columns.There are several updates.
measure_sgrna_stats
. The original name
run_estimation
has been deprecated.data.frame
with character
columns. In other words, you can useCurrently 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")
::install_github("hyunhwan-jeong/CB2") devtools
Alternatively, here is a one-liner command line for the installation.
Rscript -e "install.packages('devtools'); devtools::install_github('hyunhwan-jeong/CB2')"
<- system.file("extdata", "toydata",
FASTA "small_sample.fasta",
package = "CB2")
<- data.frame()
df_design for(g in c("Low", "High", "Base")) {
for(i in 1:2) {
<- system.file("extdata", "toydata",
FASTQ sprintf("%s%d.fastq", g, i),
package = "CB2")
<- rbind(df_design,
df_design data.frame(
group = g,
sample_name = sprintf("%s%d", g, i),
fastq_path = FASTQ,
stringsAsFactors = F)
)
}
}
<- system.file("extdata", "toydata", "sg2gene.csv", package="CB2")
MAP_FILE <- run_sgrna_quant(FASTA, df_design, MAP_FILE)
sgrna_count
<- measure_sgrna_stats(sgrna_count$count, df_design,
sgrna_stat "Base", "Low",
ge_id = "gene",
sg_id = "id")
<- measure_gene_stats(sgrna_stat) gene_stat
Or you could run the example with the following commented code.
<- run_sgrna_quant(FASTA, df_design)
sgrna_count <- measure_sgrna_stats(sgrna_count$count, df_design, "Base", "Low")
sgrna_stat <- measure_gene_stats(sgrna_stat) gene_stat
More detailed tutorial is available here!