From b61eae33246fd350f8a0efdee5a5066b5d6f2bd7 Mon Sep 17 00:00:00 2001 From: "Thomas A. Christensen II" <25492070+MillironX@users.noreply.github.com> Date: Fri, 18 Jun 2021 13:51:26 -0500 Subject: [PATCH] Change main script to module and function call --- src/BeefBLUP.jl | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/BeefBLUP.jl b/src/BeefBLUP.jl index 2191b53..c5ae165 100755 --- a/src/BeefBLUP.jl +++ b/src/BeefBLUP.jl @@ -1,16 +1,13 @@ -#!/bin/bash -#= -exec julia --project=$(realpath $(dirname $(dirname "${BASH_SOURCE[0]}"))) "${BASH_SOURCE[0]}" "$@" -=# # beefblup -# Main script for performing single-variate BLUP to find beef cattle +# Julia package for performing single-variate BLUP to find beef cattle # breeding values -# Usage: julia beefblup.jl # (C) 2021 Thomas A. Christensen II # Licensed under BSD-3-Clause License # cSpell:includeRegExp #.* # cSpell:includeRegExp ("""|''')[^\1]*\1 +module BeefBLUP + # Import the required packages using CSV using DataFrames @@ -18,6 +15,9 @@ using LinearAlgebra using Dates using Gtk +# Main entry-level function - acts just like the script +function beefblup() + # Display stuff println("beefblup v 0.2") println("(C) 2021 Thomas A. Christensen II") @@ -134,7 +134,7 @@ for i in 1:length(normal) # Add this trait to the string adjustedtraits[counter - 1] = traits[j] # Increment the big counter - global counter = counter + 1 + counter = counter + 1 end end @@ -260,7 +260,7 @@ for i in 1:length(numgroups) write(fileID, string(reliability[counter])) write(fileID, "\n") - global counter = counter + 1 + counter = counter + 1 end write(fileID, "\n") end @@ -283,3 +283,7 @@ write(fileID, "\n - END REPORT -") close(fileID) print("Done!\n") + + +end +end