assemble_reads: Assemble sequences into a contig

View source: R/assemble_reads.R

assemble_readsR Documentation

Assemble sequences into a contig

Description

Perform Overlap-Layout-Consensus (OLC) to combine reads into a contig.

Usage

assemble_reads(vec, n_reads = NULL, msa_result = FALSE, 
    add_id = TRUE, min_len = 8L, min_pid = 85, consensus_min_len = 100)

Arguments

vec

A vector containing the sequences to be assembled.

n_reads

A integer vector to record the number of reads that are used to construct the sequences in vec. It can be ignored for general usage.

msa_result

A logical scalar specifying whether the multiple sequence alignment result is returned.

add_id

A logical scalar specifying whether Universally unique identifiers (UUID) are used to name the returned contigs. If it is FALSE, the names of the returned contigs will be the sequence indexs that are used in the assembly.

min_len

An integer specifying the minimum overlapping length in the step of overlapping reads.

min_pid

A numeric object specifying the minimum percentage of identity (PID) between the overlapping region.

consensus_min_len

An integer specifying the minimum length of the returned contigs.

Details

By default, the function does not return the reads that have no overlapping with others.

Value

A list that contains

consensus

A string vector containing assembled contigs

n_reads

An integer vector indicating the number of reads used to construct the contigs

If msa_result is TRUE, the list will have an extra slot.

msa

A character vector containing a view of MSA.

Author(s)

Cheuk-Ting Law

See Also

construct_contigs

Examples

seq <- c("ACTACGATCGTAGCTGCTGTGTATGCAT", "GCTGCTGTGTATGCATGCTGACGTCGT")
# ACTACGATCGTAGCTGCTGTGTATGCAT-----------
# ------------GCTGCTGTGTATGCATGCTGACGTCGT
assemble_reads(seq, consensus_min_len = 10, add_id = FALSE)

ctl43/TranSpotteR documentation built on Sept. 9, 2022, 5:49 p.m.