get_gc: Compute GC content

get_gcR Documentation

Compute GC content

Description

Compute GC content for each bin

Usage

get_gc(ref, hgref = "hg19")

Arguments

ref

GRanges object returned from get_bam_bed

hgref

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

Value

gc

Vector of GC content for each bin/target

Author(s)

Rujin Wang rujin@email.unc.edu

Examples

## Not run: 
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")
bamdir <- bambedObj$bamdir
sampname_raw <- bambedObj$sampname
ref_raw <- bambedObj$ref

gc <- get_gc(ref_raw, hgref = "hg38")

## End(Not run)


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