getGCcontent: Get the GC content of target ranges from a reference FASTA...

Description Usage Arguments Value Examples

Description

A short function using scanFa from the Rsamtools package on a target GRanges and a reference FASTA file

Usage

1
  getGCcontent(target, reference.file)

Arguments

target

GRanges object

reference.file

the path to the reference FASTA file

Value

Returns a vector of the ratio of G and C basepairs to total basepairs (not counting N's).

Examples

1
2
3
4
5
  target.file <- system.file("extdata","targets.bed",package="exomeCopy")
  target.df <- read.delim(target.file,header=FALSE,col.names=c("seqname","start","end")) 
  target <- GRanges(seqname=target.df$seqname,IRanges(start=target.df$start+1,end=target.df$end))
  reference.file <- system.file("extdata","reference.fa",package="exomeCopy")
  GCcontent <- getGCcontent(target, reference.file)


Search within the exomeCopy package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.