Skip to contents

An R wrapper around the PrediTale 'PrediTALE.jar preditale' module. Takes a list of TALE RVD sequences and a fasta file of DNA sequences and runs PrediTale.

Usage

preditale(
  rvd_seqs,
  subj_file,
  opt_param = "",
  output_dir = NULL,
  java_args = "-Xms512M -Xmx2G",
  predictor_path = .tantale_tool("preditale")
)

Arguments

rvd_seqs

Tale RVD sequences are supplied as either a fasta file (atomic character vector) with Tale info (name) in title and sequences of RVD as a space or '-' separated string or as a Biostrings XStringSet with sequences of RVD similarly formatted. See the PrediTale man page for how to encode RVDs present on aberrant repeats.

subj_file

Expects a character vector specifying the path to the fasta file holding subject DNA sequence(s).

opt_param

A single string of options for PrediTALE, as key=value pairs separated by spaces, such as "Strand=\"forward strand\"". The default, "", keeps PrediTALE's own: target sites on both strands (Strand) with a penalty of 0.01 on the reverse one (r), and a prediction threshold (t) from a significance level of 1e-4 (sl), estimated on a sub-sample of the subject sequences (b). The PrediTALE page lists the alternatives (a number of expected sites, n; dedicated background sequences, bs). The keys this function sets itself (TALEs, s, outdir) are refused: use rvd_seqs, subj_file and output_dir.

output_dir

Expects a character vector specifying the path to an output directory. If not supplied, output files will be temporary.

java_args

A single string of options for the Java virtual machine, placed before -jar. The default starts Java with 512 MB of memory and lets it grow to 2 GB; raise -Xmx if PrediTALE runs out of memory on a large subject.

predictor_path

Path to "PrediTALE.jar". The default is the copy tantale_setup() downloads; give a path to use another version.

Value

A tibble with one row per predicted EBE (effector binding element), the columns renamed from the tool's own output so that talvez and preditale return the same ones in the same order: tale_id, rvds, subj_seq_id, start, end, strand, ebe_seq and score, followed by the tool's own column: pval, the approximate p-value PrediTALE gives each site.

See also

Examples

# \donttest{
# Needs a Java runtime.
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)
head(preds)
#> # A tibble: 1 × 9
#>   tale_id   rvds            subj_seq_id start   end strand ebe_seq score    pval
#>   <chr>     <chr>           <chr>       <dbl> <dbl> <chr>  <chr>   <dbl>   <dbl>
#> 1 ROI_00001 NN-NG-NN-HD-HD… SWEET11p_9…   210   236 +      TATAAA… 0.242 5.86e-5
# }