Skip to contents

Counts the barcodes (shRNAs or sgRNAs) of each gene among the barcodes of a ScreenR object (the rows of the counts, with the gene given by the rowData), which are the barcodes used by the analyses. Annotated barcodes that are not in the count table are not counted. Use it to choose number_barcode (in find_camera_hit, find_roast_hit, find_time_hit and plot_barcode_hit) and min_barcodes (in find_gene_zscore_hit): shRNA libraries often have 5 to 25 barcodes per gene, CRISPR libraries 3 to 6 sgRNAs per gene (4 in Brunello and TKOv3).

Usage

barcodes_per_gene(screenR_Object)

Arguments

screenR_Object

A ScreenR object created with create_screenr_object.

Value

A tibble with the columns Gene and NBarcodes, ordered by gene.

Examples

object <- get0("object", envir = asNamespace("ScreenR"))
per_gene <- barcodes_per_gene(object)
head(per_gene)
#> # A tibble: 6 × 2
#>   Gene     NBarcodes
#>   <chr>        <int>
#> 1 Gene_1          10
#> 2 Gene_10         10
#> 3 Gene_100        10
#> 4 Gene_101        10
#> 5 Gene_102        10
#> 6 Gene_103        10
table(per_gene$NBarcodes)
#> 
#>   7   8   9  10  12  32 
#>   1   1  41 488   2   1