Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data EpidemicEvent
- data EpidemicTree
- maybeEpidemicTree :: [EpidemicEvent] -> Maybe EpidemicTree
- eventTime :: EpidemicEvent -> Time
- data ReconstructedTree
- maybeReconstructedTree :: EpidemicTree -> Maybe ReconstructedTree
- newtype PointProcessEvents = PointProcessEvents [EpidemicEvent]
- pointProcessEvents :: EpidemicTree -> PointProcessEvents
- derivedFrom :: Person -> [EpidemicEvent] -> [EpidemicEvent]
- class Newick t
- asNewickString :: Newick t => (Time, Person) -> t -> Maybe (Builder, [EpidemicEvent])
Documentation
data EpidemicEvent Source #
Events that can occur in an epidemic with their absolute time.
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
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.
Branch EpidemicEvent EpidemicTree EpidemicTree | Internal node representing infection event |
Leaf EpidemicEvent | External node representing removal event |
Shoot Person | External node representing extant lineages |
Instances
Eq EpidemicTree Source # | |
Defined in Epidemic.Types.Events (==) :: EpidemicTree -> EpidemicTree -> Bool # (/=) :: EpidemicTree -> EpidemicTree -> Bool # | |
Show EpidemicTree Source # | |
Defined in Epidemic.Types.Events showsPrec :: Int -> EpidemicTree -> ShowS # show :: EpidemicTree -> String # showList :: [EpidemicTree] -> ShowS # | |
Newick EpidemicTree Source # | |
Defined in Epidemic.Types.Events asNewickString :: (Time, Person) -> EpidemicTree -> Maybe (Builder, [EpidemicEvent]) Source # |
:: [EpidemicEvent] | ordered epidemic events |
-> Maybe EpidemicTree |
A tree representation of the epidemic events.
eventTime :: EpidemicEvent -> Time Source #
The absolute time an event occurred.
data ReconstructedTree Source #
A representation of the reconstructed tree which is the phylogeny connecting
all the Sampling
and Catastrophe
events.
Instances
Eq ReconstructedTree Source # | |
Defined in Epidemic.Types.Events (==) :: ReconstructedTree -> ReconstructedTree -> Bool # (/=) :: ReconstructedTree -> ReconstructedTree -> Bool # | |
Show ReconstructedTree Source # | |
Defined in Epidemic.Types.Events showsPrec :: Int -> ReconstructedTree -> ShowS # show :: ReconstructedTree -> String # showList :: [ReconstructedTree] -> ShowS # | |
Newick ReconstructedTree Source # | |
Defined in Epidemic.Types.Events asNewickString :: (Time, Person) -> ReconstructedTree -> Maybe (Builder, [EpidemicEvent]) Source # |
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.
:: Person | |
-> [EpidemicEvent] | ordered epidemic events |
-> [EpidemicEvent] |
The events that occurred as a result of the existance of the given person.
Instances
Newick ReconstructedTree Source # | |
Defined in Epidemic.Types.Events asNewickString :: (Time, Person) -> ReconstructedTree -> Maybe (Builder, [EpidemicEvent]) Source # | |
Newick EpidemicTree Source # | |
Defined in Epidemic.Types.Events asNewickString :: (Time, Person) -> EpidemicTree -> Maybe (Builder, [EpidemicEvent]) Source # |
asNewickString :: Newick t => (Time, Person) -> t -> Maybe (Builder, [EpidemicEvent]) Source #
Return a representation of the tree in Newick format.