epi-sim-0.7.0: A library for simulating epidemics as birth-death processes.
Safe HaskellNone
LanguageHaskell2010

Epidemic.Types.Observations

Synopsis

Documentation

newtype Observation Source #

A wrapper for an EpidemicEvent to indicate that this is an even that was observed rather than just an event of the epidemic process.

Instances

Instances details
Eq Observation Source # 
Instance details

Defined in Epidemic.Types.Observations

Ord Observation Source # 
Instance details

Defined in Epidemic.Types.Observations

Show Observation Source # 
Instance details

Defined in Epidemic.Types.Observations

Generic Observation Source # 
Instance details

Defined in Epidemic.Types.Observations

Associated Types

type Rep Observation :: Type -> Type #

ToJSON Observation Source # 
Instance details

Defined in Epidemic.Types.Observations

FromJSON Observation Source # 
Instance details

Defined in Epidemic.Types.Observations

TimeStamp Observation Source # 
Instance details

Defined in Epidemic.Types.Observations

type Rep Observation Source # 
Instance details

Defined in Epidemic.Types.Observations

type Rep Observation = D1 ('MetaData "Observation" "Epidemic.Types.Observations" "epi-sim-0.7.0-DViI2uXntfg6JZVuToo6fh" 'True) (C1 ('MetaCons "Observation" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 EpidemicEvent)))

data ReconstructedTree Source #

A representation of the reconstructed tree, ie the tree where the leaves correspond to sequenced observations.

maybeReconstructedTree :: EpidemicTree -> Either String ReconstructedTree Source #

The reconstructed phylogeny obtained by pruning an EpidemicTree which contains represents the transmission tree of the epidemic. In the case where there are no sequenced samples in the epidemic then there is no tree to reconstruct which is why this function is in the either monad.

newtype PointProcessEvents Source #

A representation of the events that can be observed in an epidemic but which are not included in the reconstructed tree, ie the unsequenced observations.

pointProcessEvents :: EpidemicTree -> PointProcessEvents Source #

Extract the events from an epidemic tree which are observed but not part of the reconstructed tree, ie the ones that are not sequenced.

reconstructedTreeEvents :: ReconstructedTree -> [Observation] Source #

A sorted list of all of the observations in the reconstructed tree.

observedEvents :: [EpidemicEvent] -> Either String [Observation] Source #

The events that were observed during the epidemic, ie those in the reconstructed tree and any unsequenced samples. If this is not possible an error message will be returned.

aggregated :: [TimeInterval] -> [TimeInterval] -> [Observation] -> [Observation] Source #

Aggregate the sequenced and unsequenced individual level samples