Learn R Programming

SomatiCA (version 2.2.0)

GCcount: Calculate the GC content of given window size for a chromosome.

Description

The function downloads the .fa.gz of a given chromosome from UCSC genome browser and calculate the GC content for given window size.

Usage

GCcount(chr, binsize, url)

Arguments

chr
chromosome name. e.g. "chr1".
binsize
window size. e.g. 1000000.
url
diretory of human genome assembly. e.g."http://hgdownload.soe.ucsc.edu/goldenPath/hg19/chromosomes/".

Value

A GRanges object.
chr
A character vector. Chromosome information.
interval1
An integer vector. Start position of each bin.
interval2
An integer vector. End position of each bin.
GC
A numeric vector. GC content of each bin.

Examples

Run this code
chr <- "chr1"
url <- "http://hgdownload.soe.ucsc.edu/goldenPath/hg19/chromosomes/"
#downloding speed may depend on the machine and internet
#test <- GCcount(chr, 10000, url)

Run the code above in your browser using DataLab