MSA_Trim: Trimming Query Sequences from MAFFT

View source: R/Sero_Placement_Functions.R

MSA_TrimR Documentation

Trimming Query Sequences from MAFFT

Description

This function will extract the aligned query sequences from the MAFFT alignment file. After initially aligning the query sequences to the pre-aligned reference sequence database, the last 7 sequences in the output FASTA file will be the newly aligned query sequences. This function will extract those 7 sequences and format them into the appropriate format for the Data_Preparation function. It is important to run this function as the Data Preparation function requires the sequences to be in a data frame, and not a DNAbin object or other format.

Usage

MSA_Trim(MSA, File)

Arguments

MSA

A multiple sequence alignment file outputted from the MAFFT alignment step. This MSA should contain a set of reference sequences with 7 appended query sequences at the end which will be extracted and reformatted.

File

(Optional) A path to which to save the aligned query sequences. If a path is provided, the queries will be saved as a .Rdata object with a data frame containing the query sequences.

Value

A data frame with 2 columns and 7 rows containing the names of the query sequences in the first column and the nucleotide sequences in the second column. These 7 sequences are the aligned queries submitted in the first MAFFT step of the protocol.

Examples

Aligned_Query_FASTA <- MSA_Trim(Output_FASTA)

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