#bioinformatics #biology #science #paleontology #archaeology

bin+lib coprosize

coprolite research (paleontology and archaeology): estimate the producer's body mass based on coprolite diameter by the use of regression models

5 stable releases

1.0.4 Jan 31, 2023
1.0.3 Jan 19, 2023
1.0.2 Sep 30, 2022
1.0.1 Aug 16, 2022
0.0.0 May 21, 2022

#41 in Biology

39 downloads per month

MIT license

485KB
1K SLoC

INTRODUCING COPROSIZE

coprosize uses power, exponential, and cubic regression models to estimate the body mass of the producer based on coprolite diameter. These models can be selected based on the suspected taxonomy of the producer (currently limited to tetrapod models) and its dietary type (carnivorous, herbivorous, omnivorous, or unspecified). The regression formulae utilised are described in detail in Supplement 1. Regression models and were constructed using data found in Supplement 2. Scat diameters and body masses.

To meet the demands of the scientific community, coprosize was created using Rust. This choice was made for the following reasons: to ensure the code produced has a high level of accuracy, to maintain the accessibility of program versions in the registry forever, and to make it easy to install and use on various platforms due to Rust's strict policy of maintaining 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

help-image

EXAMPLES

example-image-1

example-image-2

CITATION AND REUSE

When citing coprosize in research, it's essential to mention the exact program version. The formulae implemented may change with the availability of new data or bug fixes. coprosize is designed for ease of use, but it's still appropriate to use the models in your research without installation, as long as proper credit is given to the software as the source.

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

coprosize can be modified and forked under the 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.4"

Put in your src/main.rs file:

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();
}

This program will utilise coprosize's internal library. It's important to note that the 'diameter' must be provided as a string slice (of numeric characters and a dot, if necessary). The library won't function if either an integer or a floating point value is given.

INSTALLATION ON LINUX

coprosize is designed to be compatible with Windows and macOS, and can be easily installed using cargo. However, the primary development and testing environment for coprosize is Fedora Linux.

The current version of coprosize (v1.0.4) has been verified to work properly on Fedora Linux 37 and Ubuntu 22.10.

METHOD 1 – USING CARGO

[Recommended for programmers]

1. To install coprosize from crates.io, use the following cargo command:

cargo install coprosize

The executable will be saved in the hidden .cargo/bin/ directory within your home directory.

2a. For easy access, you may want to copy the coprosize file to the /usr/bin/ directory. This can be done by following the instructions in Method 2 (3a, 3b).

2b. As an alternative, you can add the ~/.cargo/bin/ directory to your system's PATH variable, which can be configured using rustup.

METHOD 2 – UNIVERSAL LINUX BINARIES

1. To install coprosize, first download the distro-independent binary from GitHub.

2. Then, make the file executable by running the command:

sudo chmod +x ./coprosize

3a. On most Linux distributions, install coprosize by copying the binary to /usr/bin/:

sudo cp coprosize /usr/bin/

3b. For Fedora Silverblue / Kinoite, use this command:

sudo cp coprosize /var/usrlocal/bin/

METHOD 3 – DISTRO-SPECIFIC PACKAGES

[Recommended for most users]

Distro-specific packages for .rpm and .deb-based Linux distributions are also available for download. To install coprosize on different Linux distributions, follow these instructions:

Fedora Linux / RHEL / openSUSE:

sudo rpm -i coprosize-1.0.4-1.x86_64.rpm

Fedora Silverblue / Kinoite:

rpm-ostree install coprosize-1.0.4-1.x86_64.rpm

Ubuntu:

sudo dpkg -i coprosize_1.0.4_amd64.deb

METHOD 4 – MANUAL COMPILATION

First, download and unpack the coprosize source code from GitHub. Next, to build and install the program, use the command:

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

No runtime deps