plotPredictions: Plots genomic data and predicted binding sites along a gene...

View source: R/Wimtrap.R

plotPredictionsR Documentation

Plots genomic data and predicted binding sites along a gene track

Description

Allows the vizualisation of the predicted binding sites on a given gene for the studied condition. The function plots three panels of gene tracks: (i) the different transcript models of the gene of interest; (ii) the predicted binding sites, annotated with their prediction score; and (iii), optionally, the signals of the genomic data that have been used to extract the predictive features at the location of the potential binding sites.

Usage

plotPredictions(
  TFBSpredictions,
  imported_genomic_data,
  gene,
  TFs = NULL,
  genomic_data = NULL,
  promoter_length = 2000,
  downstream_length = 2000
)

Arguments

imported_genomic_data

A list of GRanges objects as output by importGenomicData(). It includes at least the three GRanges named 'CDS', 'X5UTR' and 'X3UTR' that give the position of the coding sequence(s), 5'UTR and 3'UTR of the transcript models that are indicated in the 'name' metadata column.

gene

A character. Sets the name of the gene to be plotted. The system of nomenclature corresponds to that used to name the transcript models in the GRanges objects of imported_genomic_data.

TFs

NULL or a vector of characters indicating the transcription factors for which the predicted binding sites have to be plotted. By default, all the studied transcription factors will be considered.

genomic_data

NULL or a vector of characters allowing to name the genomic data for which the signal has to be plotted. The names that are accepted correspond to those of the GRanges objects listed in imported_genomic_data. By default, no genomic data is plotted.

promoter_length

A numeric allowing to set the start of the gene track (=lowest start among the transcript models of the considered gene - promoter_length). Default = 2000.

downstream_length

A numeric allowing to set the end of the gene track (=highest among the transcript models of the considered gene - downstreamr_length). Default = 2000.

TFBSprediction

A data.table as output by predictTFBS(). This data.table comprises the columns 'seqnames', 'start', 'end', 'width', 'strand', 'transcript', 'prediction.score', 'TF' and, optionally, the annotations with the predictive features extracted from the genomic data.

Value

A list of GenomeGraph tracks.

See Also

predictTFBS() to get predictions of transcription factor binding sites.

Examples

genomic_data.ex <- c(CE = system.file("extdata/conserved_elements_example.bed", package = "Wimtrap"),
                      DGF = system.file("extdata/DGF_example.bed", package = "Wimtrap"),
                      DHS = system.file("extdata/DHS_example.bed", package = "Wimtrap"),
                      X5UTR = system.file("extdata/x5utr_example.bed", package = "Wimtrap"),
                      CDS = system.file("extdata/cds_example.bed", package = "Wimtrap"),
                      Intron = system.file("extdata/intron_example.bed", package = "Wimtrap"),
                      X3UTR = system.file("extdata/x3utr_example.bed", package = "Wimtrap")
                     )
imported_genomic_data.ex <- importGenomicData(biomart = FALSE,
                                              genomic_data = genomic_data.ex,
                                              tss = system.file("extdata/tss_example.bed", package = "Wimtrap"),
                                              tts = system.file("extdata/tts_example.bed", package = "Wimtrap"))
TFBSdata.ex <- getTFBSdata(pfm = system.file("extdata/pfm_example.pfm", package = "Wimtrap"),
                           TFnames = c("PIF3", "TOC1"),
                           organism = NULL,
                           genome_sequence = system.file("extdata/genome_example.fa", package = "Wimtrap"),
                           imported_genomic_data = imported_genomic_data.ex)
TFBSmodel.ex <- buildTFBSmodel(TFBSdata = TFBSdata.ex,
                               ChIPpeaks = c(PIF3 = system.file("extdata/PIF3_example.bed", package = "Wimtrap"),
                                             TOC1 = system.file("extdata/TOC1_example.bed", package = "Wimtrap")),
                               TFs_validation = "PIF3")
PIF3BS.predictions <- predictTFBS(TFBSmodel.ex,
                                  TFBSdata.ex,
                                  studiedTFs = "PIF3")
plotPredictions(PIF3BS.predictions,
                imported_genomic_data.ex,
                gene = "AT1G01140",
                genomic_data = "DHS")

RiviereQuentin/Wimtrap documentation built on June 29, 2024, 7:17 p.m.