combinedGuitarPlot {Guitar}R Documentation

combinedGuitarPlot

Description

combine multiple GuitarPlots, especially when they are from different species and cannot directly handled with GuitarPlot function together.

Usage

combinedGuitarPlot(ct, comLength = c(0.136,0.459, 0.405))

Arguments

ct

Count of overlapping features, which is can be the output from GuitarPlot function. See example.

comLength

a vector of 3 elements,indicating the length of 5'UTR, CDS and 3'UTR in the figure. Default: c(0.136,0.459, 0.405), which is counted from the default setting of hg19 UCSC gene annotation.

Details

combine multiple GuitarPlots, especially when they are from different species.

Value

A figure showing the transcriptomic distribution of the genomic features will be generated. Post-editing with Adobe Illustrator or other graphic software is recommended.

Examples


# read genomic features
narrowPeak <- system.file(
  "extdata", "m6A_hg19_1000peaks_macs2.narrowPeak", 
  package="Guitar")

# bam imported as GAlignments
m6A_Bcell <- narrowPeaktoGRanges(narrowPeak) 

# generate a list of genomic features
m6A_Bcell_1 <- m6A_Bcell[1:300]
m6A_Bcell_2 <- m6A_Bcell[301:600]
m6A_Bcell_3 <- m6A_Bcell[601:900]
m6A_Bcell_4 <- m6A_Bcell[201:900]

# Make Guitar coordiantes
txdb_file <- system.file("extdata", "hg19_toy.sqlite", 
                         package="Guitar")
txdb <- loadDb(txdb_file)
gc_txdb <- makeGuitarCoordsFromTxDb(txdb,noBins =10)

# Guitar plot 1
feature1_hg19 <- list(m6A_Bcell_1, m6A_Bcell_2) 
names(feature1_hg19) <- c("m6A_1","m6A_2")
ct1 <- GuitarPlot(feature1_hg19, returnCount = TRUE,
           GuitarCoordsFromTxDb = gc_txdb)

# Guitar plot 2
feature2_hg19 <- list(m6A_Bcell_3, m6A_Bcell_4) 
names(feature2_hg19) <- c("m6A_3","m6A_4")
ct2 <- GuitarPlot(feature2_hg19, returnCount = TRUE,
           GuitarCoordsFromTxDb = gc_txdb)

# combine two Gutiar Plot
ct <- rbind(ct1,ct2)
combinedGuitarPlot(ct)


[Package Guitar version 1.18.0 Index]