Lecture 3. Environmental stochasticity and patterns in Microbial Communities

Macroecological Patterns

Pattern #1: Fluctuations of species abundance across samples are Gamma distributedS

Species that are present in all samples have Gamma distributed
fluctuations of abundance, i.e.

We chose to plot only the abundances of species always present because it is not obvious (a priori) how
to treat abundances equal to zero. The instances where species are absent are in fact very likely due to sampling errors, which confound the shape of the AFD at low abundances. In section~\ref{ssec:nocomp} we will see that this in fact happens in the vast majority of cases.

The probability of observing reads of OTU in a sample with total number of reads is

and, in particular, the probability of not observing species reads

We define the occurrence of species as the fraction of samples where species is present, i.e.

where the Kronecker delta is equal to if and zero otherwise. Using the previous equation
we can calculate , the expected occurence of OTU , which reads

Note that the two parameters and are estimated independently of the occupancy, as they are function of the average relative abundance across samples and its variance only.

Pattern #2: Taylor's law for abundances fluctuations

We showed that the fluctuations of OTU abundances across samples are well described by a Gamma distribution.
The parameters of a Gamma distribution are fully specified by its mean and variance. Knowing the mean and the variance of the relative abundance of a species, is therefore enough
to specify the distribution of abundance and descending properties.

In this section we explore the relation between mean and variance. Mean and variance are not independent across species.
The variance is, in fact, proportional to the square of the mean. A relation of the type

is called Taylor's law and has been documented across multiple ecosystems.
As shown in Figure~\ref{sfig:taylorlaw}, we found , which implies that the coefficient of variation is constant.
We can translate this observations into contraints on the parameters of the AFD. In fact,
since depends only on the coefficient of variation, we can can
neglect the fluctuations of across species.

Pattern #3: average abundances are Lognormally distributed

The fluctuations of species abundances across samples are fully specified by the average (relative) abundance. In this section we show that the
average abundances are Lognormally distributed across species.

Since we are always dealing with a finite number of (finite) samples, not all the species are observed.
We are interested in how the average abundances are distributed across species. If a species is rare enough, (i.e., if , where is
a cutoff) it becomes extremely unlikely to observe it. If the "true" distribution s is described by some probability distribution function
, we expect to observe only the values larger than

where is the cutoff under which species are never observed because they are too rare. Note that this cutoff is a probabilistic one (the probability of observing a species above this cutoff tends to one and is lower than one below).

The distribution of is consistent with a Lognormal distribution. In order to estimate the parameters of the Lognormal,
we have to take into account the presence of the cutoff, as defined above. In other words, if is Lognormal, the observed distribution of
abundances will be

The parameters and are unknown, and should be inferred from data, while is known (and depends on the number of samples and the sampling effort).

Other macroecological patterns are predicted by patterns #1, #2 and #3

Given patterns #1, #2, and #3, the probability to observe reads of a randomly chosen OTUs in a sample with total reads is

where and where we are calculating the distribution over all the species (i.e., including the unobserved species).

All the properties of a species are fully specified by its mean abundance . The probability of observing reads of
a species with log average abundance
in a sample with total number of reads is therefore

Number of observed species vs total number of reads

The total number of observed species in a sample with total number of reads can be easily calculated using equation~\ref{seq:fullpred}. The probability
of not observing a species is simply . The expected number of distinct OTUs in a sample with reads is therefore

Occupancy distribution

The occupancy of a species is the fraction of samples where that species is present. The occupancy distribution is the probability
distribution of observing a species with a given occupancy.
The probability of observing a species with log average abundance in a sample with reads is , where
is defined in equation~\ref{seq:condpred}.
Let us define , which is equal to if an OTU with log average abundance is present in sample (which happens with probability ) and zero otherwise.
The probability that a species has occupancy is given by

The number of samples where a given OTUs is present is therefore given by a Poisson Binomial distribution, which describes the distribution of the sum of
independent non-identically distributed Bernoulli random variables.
Using the Fourier transform of the Poisson Binomial distribution, we can write

The distribution of occupancy across species can be obtained by averaging
over . Since we can observe only the OTUs with , we havce to restrict the summation only over and
to normalize the distribution over the probability of observing a given number of species. The result of this calculation reads

This equation can be simplified by assuming that the occupancy of each species is equal to its mean value, which is justified if the number of
samples is large.
This assumption corresponds to write

By averaging over the s one obtains the following approximation of equation~\ref{seq:pocc}

Abundance-occupancy relation

Occupancy (the fraction of samples where a species is found) and average abundance are not independent properties. Given an
average (relative) abundance , the expected occupancy is

where is equal to the logarithm of the average abundance.

Species Abundance Distribution

One of the most studied patterns in ecology is the Relative Species Abundance (RSA), which is defined as the number of species with a given abundance.
The expected number of species with abundance in a sample with
total number of reads (i.e., the expected RSA) is given by

The number of observed species is given by

In order to compare different samples, it is often more convenient to study the Species Abundance Distribution (SAD), which is defined as the fraction of species with a given abundance.
According to our model, the expected SAD is given by

The cumulative SAD is defined as

where is the regularized incomplete Beta function.

Stochastic Logistic Model

Definitions

We assume that the dynamics of population abundance is defined by

where is a Gaussian delta correlated white noise ( and
).

The term proportional to
represents environmental fluctuations, which translate into fluctuations of the growth rate and are therefore proportional to .

The only essential assumption here is that we assume these fluctuations to occurr at a typical timescale that is much shorter than the
population dynamics one and to have a finite variance. From this assumption it follows that can be well approximated as a Gaussian delta correlated white noise.
The other term is a logistic growth term, with carrying capacity . The parameter is the timescale of population dynamics and is measures
the coefficient of variation of growth rate fluctuations.

If we introduce the variable ,
we obtain (under Ito perscritpion)

By taking the average on both sides we obtain

Since the term is always positive, it is evident that reaches a stationary value only if
, i.e. if . If the population abundance decreases indefinitely.

Interpreted with Ito perscription,
the equation corresponds to the following Fokker-Planck equation
which describes the dynamics of the probability of finding species with abundance at time

Stationary Distribution

The stationary distribution can be found by setting the left hand side of the equation equal to zero.
Imposing detailed balance, we obtain

By introducing we obtain

which is solved by

where is an arbitrary constant. By using and fixing by imposing , we
obtain

which is a Gamma distribution with mean

and coefficient of variation

It is important to observe that the mean abundance is positive, and the variance is finite only if . If the environmental fluctuations
are too strong the population is, in fact, driven to exctintion.