merge_pairs {LocaTT} | R Documentation |
Merge Forward and Reverse DNA Sequence Reads
Description
Merges forward and reverse DNA sequence reads.
Usage
merge_pairs(forward_reads, reverse_reads, minimum_overlap = 10)
Arguments
forward_reads |
A character vector of forward DNA sequence reads. |
reverse_reads |
A character vector of reverse DNA sequence reads. |
minimum_overlap |
Numeric. The minimum length of an overlap that must be found between the end of the forward read and the start of the reverse complement of the reverse read in order for a read pair to be merged. The default is |
Details
For each pair of forward and reverse DNA sequence reads, the reverse complement of the reverse read is internally derived using the reverse_complement
function, and the read pair is merged into a single sequence if an overlap of at least the minimum length is found between the end of the forward read and the start of the reverse complement of the reverse read. If an overlap of the minimum length is not found, then an NA
is returned for the merged read pair.
Value
A character vector of merged DNA sequence read pairs. NA
s are returned for read pairs which could not be merged, which occurs when an overlap of at least the minimum length is not found between the end of the forward read and the start of the reverse complement of the reverse read.
Examples
merge_pairs(forward_reads=c("CCTTACGAATCCTGT","TTCTCCACCCGCGGATA","CGCCCGGAGTCCCTGTAGTA"),
reverse_reads=c("GACAAACAGGATTCG","CAATATCCGCGGGTG","TACTACAGGGACTCC"))