perform_qc: Quality control for cells and bins

Description Usage Arguments Value Author(s) Examples

View source: R/perform_qc.R

Description

Perform QC step on single cells and bins.

Usage

1
2
3
4
perform_qc(Y_raw, sampname_raw, ref_raw, QCmetric_raw,
        cov_thresh = 0, minCountQC = 20, 
        mapq20_thresh = 0.3, mapp_thresh = 0.9,
        gc_thresh = c(20, 80), nMAD = 3)

Arguments

Y_raw

raw read count matrix returned from get_coverage_scDNA

sampname_raw

sample names for quality control returned from get_bam_bed

ref_raw

raw GRanges object with corresponding GC content and mappability for quality control returned from get_bam_bed

QCmetric_raw

a QC metric for single cells returned from get_samp_QC

cov_thresh

scalar variable specifying the lower bound of read count summation of each cell. Default is 0

minCountQC

the minimum read coverage required for normalization and EM fitting. Defalut is 20

mapq20_thresh

scalar variable specifying the lower threshold of proportion of reads with mapping quality greater than 20. Default is 0.3

mapp_thresh

scalar variable specifying mappability of each genomic bin. Default is 0.9

gc_thresh

vector specifying the lower and upper bound of GC content threshold for quality control. Default is 20-80

nMAD

scalar variable specifying the number of MAD from the median of total read counts adjusted by library size for each cell. Default is 3

Value

A list with components

Y

read depth matrix after quality control

sampname

sample names after quality control

ref

A GRanges object specifying whole genomic bin positions after quality control

QCmetric

A data frame of QC metric for single cells after quality control

Author(s)

Rujin Wang rujin@email.unc.edu

Examples

1
2
3
4
5
6
Y_raw <- coverageObj.scopeDemo$Y
sampname_raw <- rownames(QCmetric.scopeDemo)
ref_raw <- ref.scopeDemo
QCmetric_raw <- QCmetric.scopeDemo
qcObj <- perform_qc(Y_raw = Y_raw, sampname_raw = sampname_raw,
                ref_raw = ref_raw, QCmetric_raw = QCmetric_raw)

SCOPE documentation built on Nov. 8, 2020, 5:27 p.m.