Description Usage Arguments Value Author(s) Examples
Get overlaps using GenomicRanges findOverlaps for a bedgraph coverage file (*.bedgraph.gz) compared to RefSeq defined gene regions.
1 | GetBedGraphRefSeqOverlaps(bedgraph, refseq)
|
bedgraph |
GRanges of bedgraph coverage file (*.bedgraph.gz) created via bedtools genomecov -bga -split. |
refseq |
GRanges of refseq defined gene regions. |
Results are returned as a Hits object.
Nathaniel J. Madrid, Jason Byars
1 2 3 4 5 6 7 8 9 | refseq <- import.gff("RefSeq_hg19_exons_nodups_021114g1k.gff")
refseq$gene <- sub("_exon_[0-9]+", "", refseq$gene_id)
refseq$width <- width(refseq)
txlength <- tapply(refseq$width, refseq$gene, sum)
# Get file paths of aligned bedgraph files
# Coverage calculated w/ bedtools genomecov -bga -split
BedGraphFiles <- dir(path="/home/bedgraphs", full.names=T)
BedgraphList <- lapply(BedGraphFiles[1:3], function(bg) import.bedGraph(bg))
BedGraphRefSeqOverlapsList <- lapply(BedgraphList, function(bg) GetBedGraphRefSeqOverlaps(bg, refseq))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.