Data and code for "Galactic arms, and devil's toenails: a synthesis of coiled morphology, applied to gastropods"
收藏资源简介:
23 June 2025, 07 Aug 2026 by Ido Filin Intro This is a directory tree for data files, scripts and images, used by Filin (2025/2026). This study uses previously published data by Collins et al. 2021, which includes morphometric data and images of sectioned shells, and data on coiling parameters and aperture inclinations by Noshita et al. 2012, Araki & Noshita 2023. The latter data taken from a previously digitized merged dataset Filin 2026. Data files and scripts An awk script is run on the original morphometrics data: awk -f draw-svg.awk sectioned_shells.tps The script reads and merges image and specimens data into two csv files, one for image metadata and the other for sampled apertures in each specimens. For that purpose, it uses helper files for families, countries, and epochs/ages. These new merged csv files for 'raw data' are the basis of subsequent analyses in R. The awk script also calls R for some graphical calculations, of drawing fitted conihelical paths and/or conical envelopes, and potentially realigning coiling axes. The script then generates per specimen svg files from the jpg images and the specimen data and image metadata. Renamed jpg files and their corresponding svg images are provided in folder images within this zipped dataset. The svg images provide a convenient way to visually examine goodness of fit of conical helices to measured aperture centroids. Output filenames and draw settings can be changed in projectdefs.awk. A set of helper functions is defined in draw-svg-utils.r, and used also later in statistical analyses in R. A second awk script rename-specimen-images.awk is run on the images metadata file, and copies/renames the jpg from their original folder to the build folder, where the generated svg images are saved. For example: awk -f rename-specimen-images.awk images-metadata.csv reanalysis.r reads the merged image and specimens data created with awk, and executes a main function, process-specimen, to estimate the coiling parameters and other statistics for each specimen. Two csv files are generated: coilingparams.csv, with one line per specimen, and apertures.csv, with one line per sampled aperture. reanalysis-tests.r reads coilingparams.csv and apertures.csv, and runs various statistical tests and analyses. For example, statistics for quadratic models, and mixed effect growth models. modselect.r runs the model selection procedures that were adapted from Collins et al. The code has been heavily modified for the purposes of the current study, and to improve code reusability. The script creates a txt file that contains LaTeX tables for the results of model selections, from which Table S1 in the supplementary material is generated. measurerror.r reads several pre-generated csv files for coiling params and apertures, with or w/o axes realignment, and with or w/o regression weighting, and does repeatability analyses. noshita-etal-merged.csv contains the merged previously digitized Noshita et al and Araki & Noshita dataset. The R-script inclinations.r runs the different analyses on aperture (relative) outward and downward inclinations. Several csv files contain bootstrap results for SMA model II regressions of inclinations on expansion or lead angles. These files can be read into R in the usual way, and summarized with the function bootsma.summary. Finally, R-scripts and svg files for geometric analysis of images of the shells of Ecphora and Tritia (Fig 5 in main text) are also provided.



