Skip to contents

Runs a TALE target (EBE) prediction tool over a set of TALE RVD sequences and a set of DNA sequences, and returns the predictions as a tibble.

Usage

tales_predict_targets(x, subj_file, method = c("talvez", "preditale"), ...)

Arguments

x

TALE RVD sequences: a tales object, the path to a fasta file, or a BStringSet. A tales is rendered with tales_rvd_strings, which drops the termini.

subj_file

Path to a fasta file of subject DNA sequence(s).

method

Which backend to use, "talvez" (default) or "preditale".

...

Passed to the chosen backend. See talvez (opt_param, talvez_dir, conda_bin) and preditale (opt_param, java_args, predictor_path); both accept output_dir. Note the two take different opt_param defaults, since the options are the tools' own.

Value

A tibble of EBE predictions with the columns both backends share (see talvez), then method, which tool produced them, then the tool's own column (rank for Talvez, pval for PrediTALE).

Details

talvez and preditale are independent programs, but the package normalises their outputs to a shared set of column names, so they can serve as interchangeable backends of one operation. This is that operation; talvez and preditale remain available and documented individually, and are where each tool's own options and citation live.

See also

Examples

# \donttest{
# Needs the tantale conda environment (for talvez) and a Java runtime
# (for preditale), both built on first use.
x <- tales_from_telltales(system.file("extdata", "tellTaleExampleOutput",
                                      package = "tantale"))
subj <- system.file("extdata", "cladeIII_sweet_promoters.fasta",
                    package = "tantale")
head(tales_predict_targets(x, subj_file = subj))
#> Invoking Talvez using the following command:
#> '/home/cunnac/mamba/envs/tantale/bin/perl' TALVEZ_3.2.pl -t 0 -l 19 -e mat1 -z
#> mat2 'rvdSeqsTalvez_f737a6c1e8d61.tsv' 'cladeIII_sweet_promoters.fasta'
#> # A tibble: 6 × 10
#>   tale_id   rvds       subj_seq_id start   end strand ebe_seq score method  rank
#>   <chr>     <chr>      <chr>       <dbl> <dbl> <chr>  <chr>   <dbl> <chr>  <dbl>
#> 1 ROI_00001 NN-NG-NN-… SWEET11p_9…   980  1006 -      TGTACC… 10.0  talvez     1
#> 2 ROI_00001 NN-NG-NN-… SWEET14p_N…   160   186 -      TGTTTC…  6.35 talvez     2
#> 3 ROI_00002 NN-HD-NI-… SWEET11p_9…  1395  1409 +      TGTACA…  6.96 talvez     1
#> 4 ROI_00002 NN-HD-NI-… SWEET11p_9…  1489  1503 +      TCCAGC…  6.66 talvez     2
#> 5 ROI_00002 NN-HD-NI-… SWEET11p_I…   135   149 +      TGCATC…  6.53 talvez     3
#> 6 ROI_00002 NN-HD-NI-… SWEET11p_B…   130   144 +      TGCATC…  6.53 talvez     4
head(tales_predict_targets(x, subj_file = subj, method = "preditale"))
#> # A tibble: 1 × 10
#>   tale_id   rvds     subj_seq_id start   end strand ebe_seq score method    pval
#>   <chr>     <chr>    <chr>       <dbl> <dbl> <chr>  <chr>   <dbl> <chr>    <dbl>
#> 1 ROI_00001 NN-NG-N… SWEET11p_9…   210   236 +      TATAAA… 0.242 predi… 5.86e-5
# }