#biology #bioinformatics #science #paleontology #archaeology

bin+lib coprosize

command line tools for coprolite research (paleontology and archaeology): estimate the producer’s body mass based on coprolite diameter by the use of regression models

1 stable release

Uses new Rust 2021

new 1.0.0 Jul 1, 2022
1.0.0-alpha.9 Jun 27, 2022
0.0.0 May 21, 2022

#133 in Math

Download history 18/week @ 2022-05-17 9/week @ 2022-05-24 65/week @ 2022-05-31 60/week @ 2022-06-07 25/week @ 2022-06-14 80/week @ 2022-06-21 66/week @ 2022-06-28

243 downloads per month

MIT license

490KB
1K SLoC

OVERVIEW OF COPROSIZE

coprosize employs power, exponential and cubic regression models allowing to estimate the producer's body mass based on coprolite diameter. Models can be chosen accordingly to the supposed producer's taxon (at this stage of program development, only tetrapod models are implemented) and its diet type (carnivorous, herbivorous, omnivorous, unspecified). Implemented regression formulae are provided in Supplement 1. Regression models and constructed based on the data given in Supplement 2. Scat diameters and body masses.

As it is aimed for science, coprosize is written in Rust. The reasons for this choice are (1) the high code correctness guaranteed by Rust, (2) to ensure that each program version will be accessible in the registry 'in perpetuity' and (3) that each program version will remain easily installed and cross-platform 'in perpetuity', thanks to the Rust's strict policy of backwards compatibility.

[keywords (en-AU): animal scats, archaeology, biology, body mass, body size, coprolites, dung, fossil faeces, fossils, geology, ichnology, palaeontology, scientific computing, weight; (en-US): fossil feces, paleontology]

USAGE

[Static link to a changeable image of the most recent version of coprosize! This may include pre-releases!]

help-image

EXAMPLES

[Static links to changeable images of the most recent version of coprosize! This may include pre-releases!]

example-image-1

example-image-2

CITATION AND REUSE

Please, always refer to a specific program version--implemented formulae are subject to change if new data are available (or simply studied by the author) or bugs of any kind are detected. Although coprosize is designed with the needs of a user in mind, you are perfectly OK to use my models in your study without really installing it as long as you cite this computer program as the original source:

Bajdek, P., 2022. coprosize (version 1.0.0). [computer software] https://github.com/piotrbajdek/coprosize

You are also OK to modify and fork coprosize under terms of the MIT license. It is moreover possible to link against coprosize using its library as a dependency for other bioinformatics projects (see public functions). The usage is best explained by example:

Add to your Cargo.toml file:

[dependencies]
coprosize = "1.0.0"

Put in your src/main.rs file:

extern crate coprosize;

fn main() {
let diameter = "9"; // diameter as &str
coprosize::herbivorous_rodentia(diameter);
println!("");
coprosize::omnivorous_rodentia(diameter);
println!("");
println!("Source of the above models:");
println!("");
coprosize::citation();
}

The above program will reuse the internal library of coprosize. Note that 'diameter' must be given as a string slice (of numbers and optionally including a dot)--the library won't work receiving neither an integer nor a floating point.

INSTALLATION ON LINUX

coprosize should run smoothly on Windows and macOS, and can be installed by the use of cargo. Yet, it is being developed and tested on Fedora Linux.

METHOD 1

1. Install from crates.io by the use of cargo:

cargo install coprosize

By default, the file will be downloaded to .cargo/bin/, a hidden folder in your home directory.

2a. For convenience, you will probably want to copy coprosize to /usr/bin/ as in Method 2 (3a, 3b).

2b. Alternatively, add ~/.cargo/bin directory to your PATH variable (see documentation of your shell).

METHOD 2

1. Download the binary 'coprosize' for Linux x86_64 from GitHub:

https://github.com/piotrbajdek/coprosize/releases/tag/v1.0.0

2. Make the file executable:

sudo chmod +x ./coprosize

3a. Install coprosize via copying the binary to /usr/bin/

sudo cp coprosize /usr/bin/

3b. On Fedora Silverblue / Kinoite:

sudo cp coprosize /var/usrlocal/bin/

METHOD 3

Download the coprosize source from GitHub. Then, build and install the program:

https://github.com/piotrbajdek/coprosize/releases/tag/v1.0.0

cargo build --release && sudo cp target/release/coprosize /usr/bin/

COPROSIZE CRATE ON CRATES.IO

The Rust community’s crate registry

https://crates.io/crates/coprosize

No runtime deps