getGCpct: Function to get GC percentages at specific genomic positions

Description Usage Arguments Details Value Author(s) Examples

View source: R/getGCpct.R

Description

Computes the GC percentages for a set of genomic positions along a chromosome. The GC perentage is the proportion of GC nucleotides in a 1000 base window centered at the genomic position.

Usage

1
2
  getGCpct(chrom, pos, gbuild = c("hg19", "hg38", "hg18", "mm9", "mm10",
           "udef"), gcpctdb=NULL)

Arguments

chrom

Chromosome of interest. Only one chromosome can be specified at a time. For humans it can be 1-22, X(23), Y(24) or MT(25). For mouse it can be 1-19, X(20), Y(21) or MT(22).

pos

Genomic positions in the chromosome of interest

gbuild

Genome build. Available builds are hg18, hg19 and hg38 for humans and mm9 and mm10 for mouse. udef is for user-defined. If udef option is used the user must suppy the database.

gcpctdb

GC percentage database to be used for udef option.

Details

The GC percentage data base gcpctdb is a list of numeric vectors with the names corresponding to the chromosome it comes from. Only autosomes and the X chromosome should be used. For instance, if data from dog (canFam3) is to be analyzed the names should be 1 through 38 for the autosomes and X. The numeric vector gives the GC percentage for sliding windows of 1000 bases in steps of 100 i.e. 1-1000, 101-1100 etc. No interval can be skipped i.e, use NA if GC percentage cannot be calculated. Experimental code to generate the R object is at https://github.com/soccin/mkGCPct

Value

A vector of GC percentage values corresponding to the genomic positions.

Author(s)

Data generated by Nick Socci. Packaged by Venkat Seshan.

Examples

1
2
3
4
5
6
  pos <- sort(sample(249250000, 10))
  getGCpct(1, pos)
  getGCpct(1, pos, "hg18")
  # user defined
  data(hg18)
  getGCpct(1, pos, "udef", hg18)

veseshan/pctGCdata documentation built on May 3, 2019, 6:11 p.m.