frame {coil}R Documentation

Take a coi5p sequence and place it in reading frame.

Description

Take a coi5p sequence and place it in reading frame.

Usage

frame(x, ...)

## S3 method for class 'coi5p'
frame(x, ..., nt_PHMM = nt_coi_PHMM)

Arguments

x

A coi5p class object.

...

Additional arguments to be passed between methods.

nt_PHMM

The profile hidden Markov model against which the raw sequence should be compared. Default is the full COI-5P nucleotide PHMM (nt_coi_PHMM).

Details

This function compares the raw sequence against the nucleotide PHMM using the Viterbi algorithm (for details see Durbin et al. 1998, ISBN: 9780521629713). The path of hidden states produced by the comparison is used to establish the reading frame of the sequence. If leading insert states are present, the front of the sequence is trimmed to the first continuous set of match states and the sequence is re-compared to the nucleotide PHMM. This is done because spurious or outlier matches early in the sequence can lead to incorrect establishment of the reading frame. Realigning only the truncated version of the sequence to the PHMM improves correct reading frame establishment, although this can also result in the loss of a few bp of true barcode sequence on the peripherals of the sequence.

Value

An object of class "coi5p"

See Also

coi5p

subsetPHMM

Examples

#previously run function:
dat = coi5p(example_nt_string)

dat = frame(dat)

#additional components in output coi5p object:
dat$framed

[Package coil version 1.2.4 Index]