Learn R Programming

evobiR (version 1.0)

HetLevels: Calculates heterozygosity based on ambigous IUPAC nucleotide codes

Description

Some assemblers like AllPaths will use IUPAC codes to indicate polymorphic sites in an assembly. This function uses these to estimate the level of heterozygosity along a sequence.

Usage

HetLevels(fasta)

Arguments

fasta
A fasta formatted file that may contain 1 or more sequences.

Value

  • A matrix is returned listing the length of each sequence the number of polymorphic sites and the number of "n" sites.

Details

Ambiguity codes of "r", "y", "s", "w", "k", "m","b", "d", "h", "v" are counted as polymorphic sites with an "n" are not counted since they are often indicative of scaffolding not polymorphism.

References

http://www.uta.edu/karyodb/evobiR/

Examples

Run this code
HetLevels(fasta = system.file("assembly.fasta", package = "evobiR"))

Run the code above in your browser using DataLab