Skip to contents

This function enables visual inspection of TALE target predictions results that are located within a specified subject DNA sequence region

Usage

plot_target_preds(preds, subj_file, filter_range)

Arguments

preds

A tibble of prediction results obtained with preditale or talvez or a custom table in this format.

subj_file

The fasta file of subject DNA sequences that was used to predict DNA binding elements.

filter_range

A length one genomic ranges in the form of a properly formatted character string (eg. "chr2:56-125") or an atomic GenomicRanges object. This argument specifies the DNA region that will be plotted together with predicted binding TALEs RVD sequences whose predicted EBE lies entirely within.

Value

Returns a ggplot object that can be further altered using ggplot2 package functions.

Details

RVDs sequences predicted to target an EBE on the sense strand of the DNA sequence are plotted on top of the double stranded DNA sequence in parallel to its cognate EBE which is highlighted on the corresponding strand of the DNA sequence. Those predicted to target an EBE on the opposite strand are displayed below.

Each RVD sits in a box whose colour says how strongly the RVD is expected to bind the base at that position, compared with the other three bases. The RVDs labelled "OO" correspond to the first non-canonical repeat also called repeat zero in TALE protein sequences.

Numeric values inside the boxes located immediately to the right of the TALE labels reflect prediction scores.

See also

Examples

# \donttest{
# Needs a Java runtime, for preditale().
x <- tales_from_telltales(system.file("extdata", "tellTaleExampleOutput",
                                      package = "tantale"))
rvds <- tales_rvd_strings(x)
subj <- system.file("extdata", "cladeIII_sweet_promoters.fasta",
                    package = "tantale")
preds <- preditale(rvd_seqs = rvds, subj_file = subj)
best <- preds[order(-preds$score), ][1, ]
# The site with 10 bp on either side
plot_target_preds(preds = best, subj_file = subj,
                  filter_range = paste0(best$subj_seq_id, ":",
                                        best$start - 10, "-", best$end + 10))

# }