#!/bin/bash # -*- mode: julia -*- #= exec julia --project="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" "${BASH_SOURCE[0]}" "$@" =# # beefblup cli # Provides a convenient CLI for using beefblup # cSpell:includeRegExp #.* # cSpell:includeRegExp ("""|''')[^\1]*\1 # Import packages using BeefBLUP using ArgParse # If this is run without arguments, catch that before parsing if isempty(ARGS) BeefBLUP.beefblup() exit() end # Setup the argument table argsettings = ArgParseSettings() @add_arg_table argsettings begin "datafile" help = "datasheet containing the pedigree, fixed effects, and response trait formatted in CSV" required = true arg_type = String "resultsfile" help = "filename for storing the results of the analysis" required = false arg_type = String "--heritability", "-t" help = "heritability of the response trait being analyzed" required = true arg_type = Float64 end arguments = parse_args(argsettings) h2 = arguments["heritability"] if isnothing(arguments["resultsfile"]) BeefBLUP.beefblup(arguments["datafile"], h2) exit() end BeefBLUP.beefblup(arguments["datafile"], arguments["resultsfile"], h2)