Package: seal-tool
sealPerform richness-extent-grain analyses inspired by Palmer & White
(doi:10.1086/285704,doi:10.17615/n84a-pd17)SetupInstallationSimply downloadsealfrom Codebergreleasesor clone the repository using git.First runDone only when installing and running the tool for the first time.Open the project directory in your
command-line interface.LinuxIn POSIX-compatible shell run:source./src/firstrun.shWindowsIn PowerShell Run:./src/firstrun.ps1If you encounter an error such as./src/firstrun.ps1 cannot be loaded because running scripts is disabled on this systemon Windows, it means the script was blocked by your
security settings. In that case either unblock
the script e.g. using theUnblock-FileorSet-ExecutionPolicycmdletsor run the
necessary commands manually.python -m venv ./venv
./venv/Scripts/Activate.ps1
pip install .[dev]You should see(venv)before your shell prompt now andseal --helpshould run the tool without errors. Continue withUsage.Subsequent runsDone when running the tool any time after the first initial installation.Linux:source ./venv/bin/activate
seal <subcommand>Windows PowerShell:./venv/Scripts/activate.ps1
seal <subcommand>UsageOne would generally want to usepreprocess,analyseandplotsubcommands in this order.miscsubcommand contains several scripts that
may be useful while converting or modifying either datasets or quadrat
lists for analysis.More detailed help can be accesed byseal --helporseal <subcommand> --help.PreprocessPreprocess will ensure given dataset is fit to be processed
by theanalysecommand by e.g. sanitizing strings,
warning for missing values or
checking whether species column remains consistent with
name, morph and phase.Example:seal preprocess --dataset ./datasets/raw.csv --output ./datasets/clean.csvAnalysisanalysesubcommand ingeststaskfileto perform analyses requested therein.Example:seal analyse --taskfile ./tasks/example-task.confCurrently supported analyses are:a1 - OverviewThis analysis calculates per-quadrat species number
and number of encountered individuals for each level.The additional data contain general description of given dataset and various smaller statistics for each level.
Such statistics include, for example, the most common value, mean, median, min and such for each data column.This helps familiarize oneself with the data and serves as a basic check of the levels-creating strategy.a2 - Species-area relationshipThis analysis shows relationship between species richness and area sampled.Species-area curve is calculated for each level by accumulating quadrats
and tallying the number of species. Since this method is sensitive to order of the
quadrats, number of permutations must be specified and their arithmetic mean is plotted.The additional data contain statistics of the calculated results.a3 - Distance-dependent species differenceThis analysis creates pairwise difference of sets of encountered species
in two quadrats.Result is the difference as a function of distance of the quadrats.a4 - Radius richnessThis analysis calculates the number of species within various distance intervals (interval's width is set by
theinterval-stepparameter)
from each quadrat. The radius forms a belt of sorts with a specified width.We recommend using the size of the smallest quadrat as the smallest possible step.a5 - Ratio of observed and expected speciesThis analysis calculates the ratio of observed and expected number of species for each
quadrat. The expected value is calculated as $$\sum_{}P_i * (1 - P_i)$$  where Piis the proportion
of quadrats occupied by speciesiand the summation is over all the species in the study grid.a6 - Ratio of shared and unique speciesThis analysis calculates several ratios for pairs of quadrats based on their distance.Ratio of shared species among the quadrats and exclusive species among the quadrats.Ratio of shared species among the quadrats and all
the species in the dataset.Ratio of shared species among the quadrats and
all the species in the study grid.a7 - Jaccard dissimilarityThis analysis calculates Jaccard dissimilarity with regards to species between
all possible pairs of quadrats.Result is plotted as dissimilarity against the distance
of the quadrats.Jaccard dissimilarity between quadratsaandbis calculated as:
$$J(a, b) = 1 - \frac{intersect_{ab}}{intersect_{ab} + exclusive_a + exclusive_b}$$Plotingplotsubcommand ingeststaskfileto detect results of previous analyses
and present them as graphs.Generated graphs will be saved to the same directory as
analysis results.Example:seal plot --taskfile ./tasks/example-task.confMiscmiscsubcommand is a kitchen sink of opinionated
convenience tools.DevelopmentFor unit tests runpython -m doctest ./src/seal/<file>.For functional tests runpytest.LicenseThe source code—including the tests and documentation—is licensed underGPLv3./datasets/data-bmd-sl.csvis licensed underCC-BY-SA-4.0aopk-fish.csvwas provided underCC-BY-4.0by AOPK ČR, Nálezová databáze ochrany přírody, on-line database portal.nature.cz. Downloaded 2024-02-05.