Skip to contents

A much faster alternative to running tell_tales in correction mode on error-prone sequences such as ONT-assembled genomes: a wrapper around the Java TALE correction tool from this GitHub page. It takes an input fasta file and writes a file with corrected indels in TALE coding sequences using an approach described in the Erkes et al. paper. tell_tales can subsequently be run on the corrected sequences in no correction mode.

Usage

correct_tales(
  uncorrected_path,
  corrected_path = tempfile("corrected_tales_", fileext = ".fa"),
  hmm_path = .tantale_tool("talecorrection_hmm"),
  return_corrections = FALSE,
  conda_bin = "auto",
  java_args = ""
)

Arguments

uncorrected_path

Path to the input sequence file

corrected_path

Path of the output file. The default is a new file under tempdir(), which R deletes when the session ends: give a path to keep the corrected sequences.

hmm_path

Path to the folder containing the profile HMM files. The default points to the ones built from Xanthomonas oryzae pv. oryzae (Xoo) templates, in the tools tantale_setup() downloads; Xoc (X. oryzae pv. oryzicola) ones are in the sibling folder Xoc. Please see the GitHub page for instructions on building custom profiles.

return_corrections

Specify TRUE if you want the list of executed operations on the sequence as a tibble.

conda_bin

Path to your Conda binary file if you need to specify a path different from the one that is automatically searched by the reticulate package functions.

java_args

A single string of options for the Java virtual machine, placed before -jar. The default, "", leaves Java's own defaults (a heap of up to a quarter of the physical memory); give a -Xmx value, such as "-Xmx8G", if TALEcorrection runs out of memory. TALEcorrection itself takes no options beyond its inputs.

Value

A tibble if return_corrections is TRUE or the path to the corrected sequences file.

Examples

# \donttest{
# Needs nhmmer and a Java runtime.
subj <- system.file("extdata", "bai3_sample_tal_genomic_regions.fasta",
                    package = "tantale")
out_fa <- tempfile(fileext = ".fa")
correct_tales(uncorrected_path = subj, corrected_path = out_fa)
#> Running nHMMER
#> Performing TALEs cds correction on provided sequences.
#> [1] "/tmp/Rtmp17aOMt/fileae2b45f0d5e80.fa"
# }