plotTSSprecision {icetea} | R Documentation |
Plot precision of TSS detection from multiple samples (bed files) with respect to a given reference annotation.
Plot precision of TSS detection from multiple samples present within a
CapSet
object, with respect to a given reference annotation.
plotTSSprecision(reference, detectedTSS, distanceCutoff = 500, outFile = NULL, ...) ## S4 method for signature 'GRanges,character' plotTSSprecision(reference, detectedTSS, distanceCutoff = 500, outFile = NULL, sampleNames) ## S4 method for signature 'GRanges,CapSet' plotTSSprecision(reference, detectedTSS, distanceCutoff = 500, outFile = NULL, ...)
reference |
Reference Transcrips/Genes as a |
detectedTSS |
Either a CapSet object with TSS information (after running |
distanceCutoff |
integer. Maximum distance (in base pairs) from reference TSS to plot |
outFile |
character. Output file name (filename extention would be used to determine type) If outfile not specified, the plot would be returned on the screen |
... |
Additional arguments |
sampleNames |
character. Labels for input samples (in the same order as the input bed files) |
A ggplot object, or a file. Plot showing perent of TSS detected per sample with respect to their cumulative distance to TSS of the provided reference
# load a txdb object library("TxDb.Dmelanogaster.UCSC.dm6.ensGene") seqlevelsStyle(TxDb.Dmelanogaster.UCSC.dm6.ensGene) <- "ENSEMBL" transcripts <- transcripts(TxDb.Dmelanogaster.UCSC.dm6.ensGene) # Plotting the precision using a pre computed set of TSS (.bed files) : tssfile <- system.file("extdata", "testTSS_merged.bed", package = "icetea") plotTSSprecision(reference = transcripts, detectedTSS = tssfile, sampleNames = "testTSS", distanceCutoff = 500, outFile = "TSS_detection_precision.png") ## Plotting the precision using a CapSet object : library("TxDb.Dmelanogaster.UCSC.dm6.ensGene") seqlevelsStyle(TxDb.Dmelanogaster.UCSC.dm6.ensGene) <- "ENSEMBL" # only use chrX to make the analysis faster seqlevels(TxDb.Dmelanogaster.UCSC.dm6.ensGene) <- "X" transcripts <- transcripts(TxDb.Dmelanogaster.UCSC.dm6.ensGene) # load a previously saved CapSet object cs <- exampleCSobject() # plot plotTSSprecision(reference = transcripts, detectedTSS = cs, outFile = "TSS_detection_precision.png")