DNAccf: Cross-correlation of DNA sequences

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/DNAccf.R

Description

Cross-correlation between sequences in an alignment to detect potentially incorrectly aligned sequences.

Usage

1
DNAccf(DNAbin, refSeq = 1, lag.max = NULL)

Arguments

DNAbin

An object of class DNAbin

refSeq

Numeric. The sequence that should be used as a reference. Default of 1, i.e. the first sequence. The option "random" can be given, which randomly selects a sequence.

lag.max

Numeric. The maximum lag at which to calculate the correlation between sequences. Default is 10*log10(N/m)where N is the number of observations and m the number of series (see ccf).

Details

This function can be used to detect incorrect alignment within a set of sequences.

By default, the function uses the first sequence as the reference for each subsequent sequence. When "random" is selected, the reference can usually be detected by having a correlation of 1.

Value

Returns a list with the following elements:

cor

Maximum correlation between the sequence and the reference.

lag

Numeric vector giving the lag at which the correlation is a maximum.

Author(s)

Samuel Brown <s_d_j_brown@hotmail.com>

See Also

ccf

Examples

1
2
data(dolomedes)
DNAccf(dolomedes)

spiderDev documentation built on May 2, 2019, 5:23 p.m.

Related to DNAccf in spiderDev...