ccr.checkCounts: Check consistency between library annotation and count files.

View source: R/CRISPRcleanR.R

ccr.checkCountsR Documentation

Check consistency between library annotation and count files.

Description

This function takes as input the sgRNA library annotation and the counts matrix to ensure that they are consistent. This a utility function that runs automatically as part of the ccr.AnalysisPipeline.

Usage

  ccr.checkCounts(
    counts,
    libraryAnnotation,
    ncontrols = 1,
    min_reads = 30
  ) 

Arguments

counts

A data frame containing the raw sgRNA counts (usable as an alternative to providing the path to a tsv file, i.e. previous argument). This must have one row per sgRNA and the following columns/headers:

  • sgRNA: containing alphanumerical identifiers of the sgRNA under consideration;

  • gene: containing HGNC symbols of the genes targeted by the sgRNA under consideration;

followed by the columns containing the sgRNAs' counts for the controls and columns for library trasfected samples.

libraryAnnotation

A data frame containing a sgRNAs library. This data frame must include one named row per each sgRNA and the at least following mandatory columns/headers:

  • CODE: the unique ID of the sgRNA;

  • GENES: the gene symbol related to the sgRNA;

  • seq: the nucleotidic sequnce of the sgRNA without PAM

All the built-in libraries included in the package are already compliant with this structure.

ncontrols

A numerical value used by the ccr.NormfoldChanges indicating the number of control replicates (therefore columns to be considered as control counts after the first two, in the inputted tsv file). 1 by default. The parameter will not be considered when the input are FASTQ / BAM files. In this case, the counts obtained by the files listed in files_FASTQ_controls / files_BAM_controls parameters will be used as controls.

min_reads

A numerical value used by the ccr.NormfoldChanges to define a filter threshold value for sgRNAs, based on their average counts in the control sample. Specifically, it indicates the minimal number of counts that each individual sgRNA needs to have in the controls (on average) in order to be included in the output. 30 by default.

Value

A boolean value equal to TRUE if the function ends without errors.

Author(s)

Paolo Cremaschi (paolo.crmeaschi@fht.org)

See Also

ccr.AnalysisPipeline


francescojm/CRISPRcleanR documentation built on April 30, 2023, 5:41 a.m.