View source: R/Sero_Placement_Functions.R
| Data_Preparation | R Documentation |
Takes a pre-aligned set of query sequences from the user and formats the query and reference sequence file into the appropriate formats for EPA-NG. This function executes the initial step of optimizing the order of the 7 16S reference sequences into the best possible orientation matching the user's query. The best orientation for each reference is calculated and then the reference sequences are re-sorted into the optimal orders. After this, the reference sequences are all concatenated and returned in a format ready for EPA-NG. In addition, the user's input query sequences are also concatenated and returned as a single FASTA line for input into EPA-NG. Note: It is required that the input query sequences are pre-aligned to the main reference file using MAFFT. Non-aligned sequences with varying sequence lengths will cause errors in downstream analysis steps. The mafft wrapper and epa-ng are adapted from wrapper functions from the "ips" package written by Cristoph Heibl. We would like to thank the authors for their work on this previously written code.
Data_Preparation(Aligned_Queries, Reference)
Aligned_Queries |
A data frame containing the pre-aligned query sequences. Important: This file should contain a set of 7 ASVs in a data frame file which have been aligned to the reference sequence database using MAFFT. The data frame should be structured as 7 rows x 2 columns, with the first column containing sequence names and the second column containing nucleotide sequences. |
Reference |
An organism name (currently accepts "Salmonella" or "E.coli") which lets the function know which reference file to select. The reference sequence files are provided as part of the package. |
A list with 2 elements containing the user's formatted sequences. List element 1 contains the concatenated query sequences. List element 2 contains the re-sorted and concatenated reference sequence file. Both of these will be used as inputs for the EPA-NG wrapper function.
Sequence_Outputs<-Data_Preparation(PathToAlignedQuery = "/path/to/your/file.fasta",Aligned_ReferenceFile = Full_16s_Data_Aligned)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.