Learn R Programming

EnvNJ (version 0.1.3)

ncd: Compute Normalized Compression Distances

Description

Computes normalized compression distances.

Usage

ncd(seq1, seq2)

Arguments

seq1

character string indicating the path to the first fasta file to be analyzed.

seq2

character string indicating the path to the second fasta file to be analyzed.

Value

A non-negative real value reflecting the dissimilarity between seq1 and seq2.

Details

The two fasta files must be in the working directory. This function use zpaq to compress files. Thus, the zpaq software must be installed on your system and in the search path for executables if you wish to use this function. NCD = (Z(xy) - min(Z(x), Z(y))) / max(Z(x), Z(y)) Where Z(x), Z(y) and Z(xy) are the lengths of the compressed versions of seq1, seq2 and the concatenated sequences 1 and 2, respectively.

See Also

ncdnj()

Examples

Run this code
# NOT RUN {
try(ncd(seq1 = "./A.fasta", seq2 = "./B.fasta"))
# }

Run the code above in your browser using DataLab