prepareCoverageGC: get sequencing coverage and GC content for targeted regions

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/PreProcessingShow.R

Description

Given a bam file and a bed file containing targeted regions, return sequencing coverage and GC content for each targeted region

Usage

1
prepareCoverageGC(target_bed, bam, genome_assembly = "hg19")

Arguments

target_bed

A character, specify the path to the location of bed file containing targeted regions.

bam

character, path to the bam file. Please make sure that bam file is sorted, and the index bam is present

genome_assembly

A character, indicating the assembly number of your genome. Default:"hg19". To see available genome_assembly, use available.genomes from BSgenome package

Value

a GRanges object with at least two mcols: depth and GC, each range indicating a targeted region

Note

The bam file should be sorted and indexed.

Author(s)

Yu Kong

See Also

normalizeCoverage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## specify the path to the location of bed file
target = system.file("extdata","target.bed",package="MADSEQ")

## specify the path to the bam file
aneuploidy_bam = system.file("extdata","aneuploidy.bam",package="MADSEQ")
normal_bam = system.file("extdata","normal.bam",package="MADSEQ")

## prepare coverage data for the samples
aneuploidy_cov_gc = prepareCoverageGC(target,aneuploidy_bam,"hg19")
normal_cov_gc = prepareCoverageGC(target,normal_bam,"hg19")

MADSEQ documentation built on Nov. 8, 2020, 6:51 p.m.