get_coverage_scDNA: Get read coverage from single-cell DNA sequencing

View source: R/get_coverage_scDNA.R

get_coverage_scDNAR Documentation

Get read coverage from single-cell DNA sequencing

Description

Get read coverage for each genomic bin across all single cells from scDNA-seq. Blacklist regions, such as segmental duplication regions and gaps near telomeres/centromeres will be masked prior to getting coverage.

Usage

get_coverage_scDNA(bambedObj, mapqthres, seq, hgref = "hg19")

Arguments

bambedObj

object returned from get_bam_bed

mapqthres

mapping quality threshold of reads

seq

the sequencing method to be used. This should be either 'paired-end' or 'single-end'

hgref

reference genome. This should be 'hg19', 'hg38' or 'mm10'. Default is human genome hg19.

Value

Y

Read depth matrix

Author(s)

Rujin Wang rujin@email.unc.edu

Examples

library(WGSmapp)
library(BSgenome.Hsapiens.UCSC.hg38)
bamfolder <- system.file('extdata', package = 'WGSmapp')
bamFile <- list.files(bamfolder, pattern = '*.dedup.bam$')
bamdir <- file.path(bamfolder, bamFile)
sampname_raw <- sapply(strsplit(bamFile, '.', fixed = TRUE), '[', 1)
bambedObj <- get_bam_bed(bamdir = bamdir,
                            sampname = sampname_raw, 
                            hgref = "hg38")

# Getting raw read depth
coverageObj <- get_coverage_scDNA(bambedObj,
                                mapqthres = 40,
                                seq = 'paired-end', 
                                hgref = "hg38")
Y_raw <- coverageObj$Y


rujinwang/SCOPE documentation built on Jan. 1, 2023, 5:40 a.m.