Learn R Programming

polyRAD (version 2.0.0)

MergeIdenticalHaplotypes: Merge Alleles with Identical DNA Sequences

Description

If any alleles within a locus have identical alleleNucleotides values (including those identical based on IUPAC ambiguity codes), this function merges those alleles, summing their read depths. This function is primarily intended to be used internally in cases where tags vary in length within a locus, resulting in truncated alleleNucleotides.

Usage

MergeIdenticalHaplotypes(object, ...)

Value

A RADdata object identical to object, but with alleles merged.

Arguments

object

A RADdata object.

...

Additional arguments (none implemented).

Author

Lindsay V. Clark

See Also

MergeRareHaplotypes, readProcessIsoloci

Examples

Run this code
data(exampleRAD)
# change a haplotype for this example
exampleRAD$alleleNucleotides[5] <- "GY"

nAlleles(exampleRAD)
exampleRAD <- MergeIdenticalHaplotypes(exampleRAD)
nAlleles(exampleRAD)

Run the code above in your browser using DataLab