prepareCoverageGC {MADSEQ} | R Documentation

## get sequencing coverage and GC content for targeted regions

### Description

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

### Usage

    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

    ## 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")

[Package MADSEQ version 1.10.0 Index]