Runs the "predict" and "analyze" steps of AnnoTALE on a fasta file
Source:R/annotale.R
run_annotale_predict.RdAn R wrapper around the
AnnoTALE 'AnnoTALE.jar
predict' and 'AnnoTALE.jar analyze' shell calls.
run_annotale_build completes the AnnoTALE workflow.
Usage
run_annotale_predict(
fasta_file,
output_dir = tempfile("annotale_predict_"),
prefix = NULL,
opt_param = "Sensitive=false",
java_args = "",
annotale_jar = .tantale_tool("annotale")
)Arguments
- fasta_file
Path to a fasta file of the DNA sequences (e.g. a genome assembly) to search for TALEs.
- output_dir
Directory where output will be written, created if it does not exist. The default is a new directory under
tempdir(), which R deletes when the session ends: give a path to keep the results.- prefix
A scalar character vector containing a prefix that will be appended to TALE names by AnnoTALE. If not supplied, the function will try to guess the prefix from the input file name.
- opt_param
A single string of options for the predict stage, as
key=valuepairs separated by spaces. AnnoTALE predict has one:Sensitive,falseby default;"Sensitive=true"runs its sensitive scan. The keys this function sets itself (g,s,outdir) are refused: usefasta_file,prefixandoutput_dir. The analyze stage has no option of its own beyond a run name.- java_args
A single string of options for the Java virtual machine, placed before
-jarin both stages. The default,"", leaves Java's own defaults (a heap of up to a quarter of the physical memory); give a-Xmxvalue, such as"-Xmx8G", if AnnoTALE runs out of memory.- annotale_jar
Path to the AnnoTALE jar file. The default is the copy
tantale_setup()downloads; give a path to use another version.
Value
output_dir, invisibly, so that the call can be passed
straight to tales_from_annotale(). If either stage exits with a
non-zero status, the
function stops with an error of class
tantale_error_annotale_failed.
See also
Other external TALE tools:
run_annotale_assign(),
run_annotale_build(),
run_annotale_load_classes()
Examples
# \donttest{
# Needs a Java runtime, and the tools and genomes tantale_setup() downloads.
fasta <- tantale_genome("MAI1")
out <- file.path(tempdir(), "annotale_predict_example")
run_annotale_predict(fasta, output_dir = out)
#> Running AnnoTALE predict for "MAI1"
#> java -jar
#> '/home/cunnac/snap/codium/495/.local/share/R/tantale/tools-1/AnnoTALEcli-1.5.jar'
#> predict Sensitive=false
#> g='/home/cunnac/snap/codium/495/.local/share/R/tantale/genomes-1/MAI1.fa'
#> s='MAI1' outdir='/tmp/RtmpEQXqY1/annotale_predict_example/Predict'
#> Running AnnoTALE analyze for "MAI1"
#> java -jar
#> '/home/cunnac/snap/codium/495/.local/share/R/tantale/tools-1/AnnoTALEcli-1.5.jar'
#> analyze
#> t='/tmp/RtmpEQXqY1/annotale_predict_example/Predict/TALE_DNA_sequences_(MAI1).fasta'
#> outdir='/tmp/RtmpEQXqY1/annotale_predict_example/Analyze'
list.files(file.path(out, "Predict"))
#> [1] "GFF__TALE_predictions_(MAI1).gff3" "Genbank__TALE_predictions_(MAI1).gb"
#> [3] "TALE_DNA_sequences_(MAI1).fasta" "TALE_protein_sequences_(MAI1).fasta"
#> [5] "protocol_predict.txt"
# }