mirror of
https://github.com/MillironX/beefblup.git
synced 2024-11-13 03:03:08 +00:00
Change main script to module and function call
This commit is contained in:
parent
1928eb3c4f
commit
b61eae3324
1 changed files with 12 additions and 8 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue