epa_ng_wrap: Wrapper function for EPA-NG

View source: R/Sero_Placement_Functions.R

epa_ng_wrapR Documentation

Wrapper function for EPA-NG

Description

Creates an R interface for using the command line tool EPA-NG in an R environment. It is required that EPA-NG is initially installed on the machine. Installation instructions for all platforms can be found at <https://github.com/Pbdas/epa-ng>. The installation path should be noted and may be needed as a variable in the wrapper function. This wrapper is an implementation of EPA-NG which will take the aligned and concatenated query sequences along with the aligned and concatenated reference sequence database and generate phylogenetic placement results. This wrapper is not currently designed to include all options available in EPA-NG since our implementation uses a limited range of required parameters.

Usage

epa_ng_wrap(exec, msa, query, Species, filter_max, file)

Arguments

exec

(Optional) The path on the machine in which the EPA-NG program is installed. This path will default to the default installation path if left blank (/usr/local/bin/epa-ng).

msa

A reference multiple sequence alignment in FASTA format. For serovar prediction usage, this MSA should be in the form of concatenated sequences.

query

A query sequence in FASTA format. For serovar prediction usage, this query sequence should be concatenated and pre-aligned to the MSA.

Species

A species name for the bacterial species being analyzed. This should be a text string, currently "Salmonella" and "E.coli" are accepted as possible species for EPA-NG analysis.

filter_max

(Optional) A number telling the EPA-NG function the maximum number of nodes to report in the placement results. We generally want to see all of the possible placement results, if left blank this option defaults to 100.

file

(Optional) A path to which the output jplace file should be saved. If left blank, the wrapper function will output the resulting jplace as an R environment object.

Value

A JSON placement (jplace) file containing the placement results. This file will report nodes where placements were made along with other relevant data, including pendant lengths and likelihood weight ratios for each placement.

Examples

Output.jplace<-epa_ng_wrap(msa = concatenated_references.fasta, query = query.fasta, Species = "Salmonella", filter_max = 100)

Dogrinev/Seroplacer documentation built on Jan. 28, 2024, 11:26 p.m.