diversity-0.7.0.3: Return the diversity at each position by default for all sequences in a fasta file

Safe HaskellNone
LanguageHaskell98

Math.Diversity.Diversity

Description

Collection of functions pertaining to finding the diversity of samples.

Synopsis

Documentation

hamming :: String -> String -> Int Source

Takes two strings, returns Hamming distance

richness :: (Ord a, Ord b) => Map (a, b) c -> Int Source

Returns the richness of the observed data

diversity :: Ord a => Double -> [a] -> Double Source

Returns the diversity of a list of things

diversityOfMap :: Ord a => Double -> Map a Int -> Double Source

Returns the diversity of a map of the species and how many times it appears

chao1 :: Ord a => Map a Int -> Double Source

Returns the chao1 estimator of a map of the species and how many times it appears

chao2 :: (Ord a, Ord b) => Map (a, b) Int -> Double Source

Returns the chao2 estimator of a map of the sample labeled species (sample, species) and how many times it appears. This will calculate the overlap for you, so if you don't have the number of times it appears it does not matter, you can set it to 1 and get the same result as it's all about overlapping samples.

rarefactionCurve :: Bool -> Int -> Integer -> Integer -> Integer -> Map (Sample, Fragment) Int -> IO [(Int, (Double, Double))] Source

Returns the rarefaction curve for each position in a list

rarefactionSampleCurve :: Bool -> Int -> Int -> Int -> Map (Sample, Fragment) Int -> IO [(Int, (Double, Double))] Source

Returns the rarefaction curve for each position in a list

rarefactionViable :: [Double] -> Double Source

Calculates the percent of the curve that is above 95% of height of the curve

individualG :: Double -> Map (Sample, Fragment) Int -> Double Source

Returns the number of individuals needed to get the proportion g of the estimated total richness of the assemblage. Sobs / Sest < g < 1

sampleG :: Double -> Map (Sample, Fragment) Int -> Double Source

Returns the number of samples needed to get the proportion g of the estimated total richness of the assemblage. Sobs / Sest < g < 1

minRarefaction :: Bool -> Bool -> Int -> Map (Sample, Fragment) Int -> Double -> Int -> IO Int Source

Returns the number of samples needed before a new sample returns less than x new species. Warning, goes forever until threshold is met!