OverlapEditSites: Overlap bedgraph coverage file (*.bedgraph.gz) with known...

Description Usage Arguments Value Author(s) Examples

Description

Overlap bedgraph coverage file (*.bedgraph.gz) with known editing sites (e.g. from RADAR: Rigorously Annotated Database of A-to-I RNA editing or from DARNED: a DAtabase of RNa EDiting in humans) to obtain the number of RNA editing sites with coverage.

Usage

1
OverlapEditSites(BedGraphFilePath, EditsGRanges)

Arguments

BedGraphFilePath

location of bedgraph coverage file (*.bedgraph.gz) created via bedtools genomecov -bga -split.

EditsGRanges

GRanges object of known RNA edit sites.

Value

A data.frame containing the mcols data from a Hits object returned in findOverlaps.

Author(s)

Nathaniel J. Madrid, Jason Byars

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
radarFile <- "dependencies/Human_AG_all_hg19_v2.txt"
radar <- read.table(radarFile, header=T)

# fix contig names
radar$chromosome <- sub("chr","",radar$chromosome)
radar$chromosome[radar$chromosome=="M"] <- "MT" 
radarRanges <- with(radar, GRanges(seq=chromosome, ranges=IRanges(start=position,end=position), strand=strand, gene=gene,
                                   annot1=annot1, annot2=annot2, alu=alu., non_alu_repetitive=non_alu_repetitive.,
                                   conservation_chimp=conservation_chimp, conservation_rhesus,conservation_rhesus,
                                   conservation_mouse=conservation_mouse))

# sort so the seqlevels actually match
radarRanges <- sortSeqlevels(radarRanges)
radarRanges <- sort(radarRanges)
# Get file paths of bedgraph files
BedGraphFiles <- dir(path="/home/ubuntu/Projects/RNAseqPackage/bedgraphs", full.names=T)
RadarOverlapsDF <- do.call("cbind", mclapply(BedGraphFiles, function(f) OverlapEditSites(f, radarRanges), mc.cores=11))
colnames(RadarOverlapsDF) <- basename(BedGraphFiles)
RadarOverlapsDF <- cbind(as.data.frame(mcols(radarRanges)), as.data.frame(RadarOverlapsDF))
mcols(radarRanges) <- RadarOverlapsDF

njmadrid/RNAseqQuality documentation built on May 20, 2019, 3:32 p.m.