binTrack: Visualization: generating tracks for 'igvR' (per bin)

View source: R/package.R

binTrackR Documentation

Visualization: generating tracks for igvR (per bin)

Description

This function outputs a list of GRanges format objects of binned ribosome P-site footprints, as well as test results. It can be used for igvR visualization.

Usage

binTrack(data, exon.anno)

Arguments

data

Data object from diffPatterbTest function or wrapper function RiboDiPA.

exon.anno

exons value from psiteMapping function. Genomic start and end coordinates, and other gene information is included. See psiteMapping for details.

Details

R package igvR is not implemented in RiboDiPA. Users need install igvR through Bioconductor or relevant source package. A simple illustration example of how to use it for igvR visualization is given below.

Value

A list of GRanges format objects. Each element is a GRanges object of the binned P-site footprint tracks with differential pattern test results.

Examples

data(result.pst)
data(data.psite)
tracks.bin <- binTrack(data = result.pst, 
    exon.anno = data.psite$exons)

# library(igvR)
# thred <- 0.05
# igv <- igvR()
# setBrowserWindowTitle(igv, "ribosome binned track example")
# setGenome(igv, "saccer3")

# for(track.name in names(tracks.bin)){
#     track.rep <- tracks.bin[[track.name]]
#     resize(track.rep, width(track.rep) + 1)
#     track <- GRangesQuantitativeTrack(trackName = paste(track.name,"binned"),
#         track.rep[,1], color = "black")
#     displayTrack(igv, track)
# }
# track.rep2 <- tracks.bin[[1]]
# sig.bin <- (values(track.rep2)[,5] <= thred)
# log10.padj <- - log10(values(track.rep2)[,5]) 
# mcols(track.rep2) <- data.frame(log10padj = log10.padj)
# track.rep2 <- track.rep2[which(sig.bin),]
# track <- GRangesQuantitativeTrack(trackName = "- log 10 of padj", 
#     track.rep2, color = "red", trackHeight = 40)
# displayTrack(igv, track)

jipingw/RiboDiPA documentation built on June 25, 2022, 4:47 p.m.