Usage Arguments Note Author(s) Examples
1 | TravisPlot(peak, TravisCoordsFromTxDb = NA, txdb = NA, genome = NA, saveToPDFprefix = NA)
|
peak |
|
TravisCoordsFromTxDb |
|
txdb |
|
genome |
|
saveToPDFprefix |
Please let me know if you have any questions.
Jia Meng < jia.meng@xjtlu.edu.cn >
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # Find the toy data files came with Travis package
bed3=system.file("extdata", "H3K4me3_mm10_1000peaks.bed", package="Travis")
bed12=system.file("extdata", "m6A_mm10_exomePeak_1000peaks_bed12.bed", package="Travis")
bam1=system.file("extdata", "SRR568477_mm10_XIST.bam", package="Travis")
bam2=system.file("extdata", "SRR1768320_mm10_XIST.bam", package="Travis")
# Read 4 different kinds of Genomic Features into R
H3K4me3 <- import.bed(bed3) # bed3 imported as GRanges
m6A <- BED12toGRangesList(bed12) # bed12 imported as GRangesList
SRR568477 <- readGAlignments(bam1) # bam imported as GAlignments
SRR1768320 <- readGAlignments(bam2) # bam imported as GAlignments
# put everything in a list with names
peak <- list(H3K4me3,m6A,SRR568477,SRR1768320)
names(peak) <- c("H3K4me3", "m6A", "BAM1", "BAM2")
# make TravisPlot
# show the transcriptomic view of 4 sets of genomic features
# OPTION 1
TravisPlot(peak,
genome="mm10",
saveToPDFprefix = "Toy")
# gene annotation will be downloaded automatically,
# and two PDF figures with prefix "Toy" will be saved
# in the current working directory
# OPTION 2
# It takes a few minutes to built TravisCoodinatesFromTxDb,
# so we may want to reuse it to save some time.
txdb <- makeTxDbFromUCSC(genome="mm10")
TravisCoordsFromTxDb <- makeTravisCoordsFromTxDb(txdb)
TravisPlot(peak[1:2],
TravisCoordsFromTxDb = TravisCoordsFromTxDb,
saveToPDFprefix = "Toy2")
TravisPlot(peak[3:4],
TravisCoordsFromTxDb = TravisCoordsFromTxDb,
saveToPDFprefix = "Toy3")
# OPTION 3
# The function may return the figures which you may resize
tp <- TravisPlot(peak, TravisCoordsFromTxDb = TravisCoordsFromTxDb)
tp[[1]] # Please ignore the warning message
tp[[2]] # Please ignore the warning message
tp[[1]] + ylim(-1,5) # reset the range of y axis
tp[[2]] + ylim(-1,5) # reset the range of y axis
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.