Safe Haskell | None |
---|---|
Language | Haskell2010 |
A module to read and write allele sharing histograms, as defined here: https://rarecoal-docs.readthedocs.io/en/latest/rarecoal.html#histogram-files
Synopsis
- data RareAlleleHistogram = RareAlleleHistogram {
- raNames :: [String]
- raNVec :: [Int]
- raMinAf :: Int
- raMaxAf :: Int
- raConditionOn :: [Int]
- raExcludePatterns :: [SitePattern]
- raTotalNrSites :: Int64
- raCounts :: Map SitePattern Int64
- raJackknifeEstimates :: Maybe (Map SitePattern (Double, Double))
- readHistogramFromHandle :: MonadIO m => Handle -> m RareAlleleHistogram
- type SitePattern = [Int]
- readHistogram :: MonadIO m => FilePath -> m RareAlleleHistogram
- writeHistogramStdOut :: MonadIO m => RareAlleleHistogram -> m ()
- writeHistogramFile :: MonadIO m => FilePath -> RareAlleleHistogram -> m ()
- showSitePattern :: SitePattern -> String
Documentation
data RareAlleleHistogram Source #
A datatype to represent an Allele Sharing Histogram:
RareAlleleHistogram | |
|
Instances
Eq RareAlleleHistogram Source # | |
Defined in SequenceFormats.RareAlleleHistogram (==) :: RareAlleleHistogram -> RareAlleleHistogram -> Bool # (/=) :: RareAlleleHistogram -> RareAlleleHistogram -> Bool # | |
Show RareAlleleHistogram Source # | |
Defined in SequenceFormats.RareAlleleHistogram showsPrec :: Int -> RareAlleleHistogram -> ShowS # show :: RareAlleleHistogram -> String # showList :: [RareAlleleHistogram] -> ShowS # |
readHistogramFromHandle :: MonadIO m => Handle -> m RareAlleleHistogram Source #
Read a histogram from a File Handle.
type SitePattern = [Int] Source #
A simple type synonym for the SitePattern, represented as a list of Integers that represents each pattern across the branches.
readHistogram :: MonadIO m => FilePath -> m RareAlleleHistogram Source #
Read a histogram from a FilePath
writeHistogramStdOut :: MonadIO m => RareAlleleHistogram -> m () Source #
Write a histogram to the stdout
writeHistogramFile :: MonadIO m => FilePath -> RareAlleleHistogram -> m () Source #
Write a histogram to a file
showSitePattern :: SitePattern -> String Source #
A simple function to convert a pattern into a String.