epi-sim-0.2.2.0: A library for simulating epidemics as birth-death processes.

Safe HaskellNone
LanguageHaskell2010

Epidemic.Types.Events

Synopsis

Documentation

data EpidemicEvent Source #

Events that can occur in an epidemic with their absolute time.

Constructors

Infection Time Person Person

infection time, infector, infectee

Removal Time Person

removal without observation

Sampling Time Person

removal and inclusion in phylogeny

Catastrophe Time People

scheduled sampling of lineages

Occurrence Time Person

removal and observed by not in phylogeny

Disaster Time People

scheduled occurrence of lineages

Instances
Eq EpidemicEvent Source # 
Instance details

Defined in Epidemic.Types.Events

Ord EpidemicEvent Source #

Epidemic Events are ordered based on which occurred first.

Instance details

Defined in Epidemic.Types.Events

Show EpidemicEvent Source # 
Instance details

Defined in Epidemic.Types.Events

Generic EpidemicEvent Source # 
Instance details

Defined in Epidemic.Types.Events

Associated Types

type Rep EpidemicEvent :: Type -> Type #

ToJSON EpidemicEvent Source # 
Instance details

Defined in Epidemic.Types.Events

FromJSON EpidemicEvent Source # 
Instance details

Defined in Epidemic.Types.Events

FromRecord EpidemicEvent Source # 
Instance details

Defined in Epidemic.Types.Events

ToRecord EpidemicEvent Source # 
Instance details

Defined in Epidemic.Types.Events

type Rep EpidemicEvent Source # 
Instance details

Defined in Epidemic.Types.Events

type Rep EpidemicEvent = D1 (MetaData "EpidemicEvent" "Epidemic.Types.Events" "epi-sim-0.2.2.0-Ha1De45mQngC03CdEKHswB" False) ((C1 (MetaCons "Infection" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Time) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Person) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Person))) :+: (C1 (MetaCons "Removal" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Time) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Person)) :+: C1 (MetaCons "Sampling" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Time) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Person)))) :+: (C1 (MetaCons "Catastrophe" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Time) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 People)) :+: (C1 (MetaCons "Occurrence" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Time) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Person)) :+: C1 (MetaCons "Disaster" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Time) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 People)))))

data EpidemicTree Source #

A representation of the whole transmission tree in a realisation of an epidemic including the unobserved leaves. Lineages that are still extant are modelled as shoots and contain a Person as their data rather than an event.

Constructors

Branch EpidemicEvent EpidemicTree EpidemicTree

Internal node representing infection event

Leaf EpidemicEvent

External node representing removal event

Shoot Person

External node representing extant lineages

maybeEpidemicTree Source #

Arguments

:: [EpidemicEvent]

ordered epidemic events

-> Maybe EpidemicTree 

A tree representation of the epidemic events.

eventTime :: EpidemicEvent -> Time Source #

The absolute time an event occurred.

maybeReconstructedTree :: EpidemicTree -> Maybe ReconstructedTree Source #

A tree representation of the reconstructed phylogeny.

newtype PointProcessEvents Source #

A representation of the events that can be observed in an epidemic but which are not included in the reconstructed tree, i.e. the Occurrence and Disaster events.

pointProcessEvents :: EpidemicTree -> PointProcessEvents Source #

Extract the events from an epidemic tree which are observed but not part of the reconstructed tree.

derivedFrom Source #

Arguments

:: Person 
-> [EpidemicEvent]

ordered epidemic events

-> [EpidemicEvent] 

The events that occurred as a result of the existance of the given person.

class Newick t Source #

Minimal complete definition

asNewickString

asNewickString :: Newick t => (Time, Person) -> t -> Maybe (Builder, [EpidemicEvent]) Source #

Return a representation of the tree in Newick format.