mirror of
https://github.com/MillironX/beefblup.git
synced 2024-12-22 17:08:16 +00:00
Update copyright and version information
This commit is contained in:
parent
692a499147
commit
b8b8f755d6
4 changed files with 17 additions and 17 deletions
|
@ -2,7 +2,7 @@
|
||||||
# Main script for performing single-variate BLUP to find beef cattle
|
# Main script for performing single-variate BLUP to find beef cattle
|
||||||
# breeding values
|
# breeding values
|
||||||
# Usage: julia beefblup.jl
|
# Usage: julia beefblup.jl
|
||||||
# (C) 2019 Thomas A. Christensen II
|
# (C) 2020 Thomas A. Christensen II
|
||||||
# Licensed under BSD-3-Clause License
|
# Licensed under BSD-3-Clause License
|
||||||
|
|
||||||
# Import the required packages
|
# Import the required packages
|
||||||
|
@ -12,8 +12,8 @@ using Dates
|
||||||
using Gtk
|
using Gtk
|
||||||
|
|
||||||
# Display stuff
|
# Display stuff
|
||||||
println("beefblup v 0.0.0.1")
|
println("beefblup v 0.1")
|
||||||
println("(C) 2019 Thomas A. Christensen II")
|
println("(C) 2020 Thomas A. Christensen II")
|
||||||
println("https://github.com/millironx/beefblup")
|
println("https://github.com/millironx/beefblup")
|
||||||
print("\n")
|
print("\n")
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Prepares the Julia environment for using beefblup by installing the requisite
|
# Prepares the Julia environment for using beefblup by installing the requisite
|
||||||
# packages
|
# packages
|
||||||
# Usage: julia install.jl
|
# Usage: julia install.jl
|
||||||
# (C) 2019 Thomas A. Christensen II
|
# (C) 2020 Thomas A. Christensen II
|
||||||
# Licensed under BSD-3-Clause License
|
# Licensed under BSD-3-Clause License
|
||||||
|
|
||||||
# Import the package manager
|
# Import the package manager
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
BSD 3-Clause License
|
BSD 3-Clause License
|
||||||
|
|
||||||
Copyright (c) 2018, Thomas A. Christensen II
|
Copyright (c) 2020, Thomas A. Christensen II
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
% Main script for performing single-variate BLUP to find beef cattle
|
% Main script for performing single-variate BLUP to find beef cattle
|
||||||
% breeding values
|
% breeding values
|
||||||
% Usage: beefblup
|
% Usage: beefblup
|
||||||
% (C) 2018 Thomas A. Christensen II
|
% (C) 2020 Thomas A. Christensen II
|
||||||
% Licensed under BSD-3-Clause License
|
% Licensed under BSD-3-Clause License
|
||||||
|
|
||||||
% Prepare the workspace for computation
|
% Prepare the workspace for computation
|
||||||
|
@ -11,8 +11,8 @@ clc
|
||||||
close all
|
close all
|
||||||
|
|
||||||
%% Display stuff
|
%% Display stuff
|
||||||
disp('beefblup v. 0.0.0.1')
|
disp('beefblup v. 0.1')
|
||||||
disp('(C) 2018 Thomas A. Christensen II')
|
disp('(C) 2020 Thomas A. Christensen II')
|
||||||
disp('https://github.com/millironx/beefblup')
|
disp('https://github.com/millironx/beefblup')
|
||||||
disp(' ')
|
disp(' ')
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ for i=1:numanimals
|
||||||
dammatch = ismember(damids, ids(i,:), 'rows');
|
dammatch = ismember(damids, ids(i,:), 'rows');
|
||||||
damindexes = find(dammatch == 1);
|
damindexes = find(dammatch == 1);
|
||||||
dam(damindexes) = i;
|
dam(damindexes) = i;
|
||||||
|
|
||||||
% Find all animals that this animal sired
|
% Find all animals that this animal sired
|
||||||
sirematch = ismember(sireids, ids(i,:), 'rows');
|
sirematch = ismember(sireids, ids(i,:), 'rows');
|
||||||
sireindexes = find(sirematch == 1);
|
sireindexes = find(sirematch == 1);
|
||||||
|
@ -91,7 +91,7 @@ colstodelete = 6;
|
||||||
|
|
||||||
% Coerce each group to string format
|
% Coerce each group to string format
|
||||||
for i = 7:length(headers)
|
for i = 7:length(headers)
|
||||||
data(:,i) = cellfun(@num2str, data(:,i), 'UniformOutput', false);
|
data(:,i) = cellfun(@num2str, data(:,i), 'UniformOutput', false);
|
||||||
end
|
end
|
||||||
|
|
||||||
% Find any columns that need to be deleted
|
% Find any columns that need to be deleted
|
||||||
|
@ -100,7 +100,7 @@ for i = 7:length(headers)
|
||||||
colname = headers{i};
|
colname = headers{i};
|
||||||
disp(['Column "' colname '" does not have any unique animals and will be removed'])
|
disp(['Column "' colname '" does not have any unique animals and will be removed'])
|
||||||
disp('from this analysis');
|
disp('from this analysis');
|
||||||
colstodelete = [colstodelete i];
|
colstodelete = [colstodelete i];
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -167,19 +167,19 @@ adjustedtraits = cell(1, sum(numgroups)-length(numgroups));
|
||||||
for i = 1:length(normal)
|
for i = 1:length(normal)
|
||||||
% Find the traits that are present in this trait
|
% Find the traits that are present in this trait
|
||||||
traits = uniquecell(data(:,i+5));
|
traits = uniquecell(data(:,i+5));
|
||||||
|
|
||||||
% Remove the "normal" version from the analysis
|
% Remove the "normal" version from the analysis
|
||||||
normalindex = find(strcmp(traits, normal{i}));
|
normalindex = find(strcmp(traits, normal{i}));
|
||||||
traits(normalindex) = [];
|
traits(normalindex) = [];
|
||||||
|
|
||||||
% Iterate inside of the group
|
% Iterate inside of the group
|
||||||
for j = 1:length(traits)
|
for j = 1:length(traits)
|
||||||
matchedindex = find(strcmp(data(:,i+5), traits{j}));
|
matchedindex = find(strcmp(data(:,i+5), traits{j}));
|
||||||
X(matchedindex, I) = 1;
|
X(matchedindex, I) = 1;
|
||||||
|
|
||||||
% Add this trait to the string
|
% Add this trait to the string
|
||||||
adjustedtraits(I - 1) = traits(j);
|
adjustedtraits(I - 1) = traits(j);
|
||||||
|
|
||||||
% Increment the big counter
|
% Increment the big counter
|
||||||
I = I + 1;
|
I = I + 1;
|
||||||
end
|
end
|
||||||
|
@ -217,7 +217,7 @@ for i = 1:numanimals
|
||||||
A(j,i) = 0.5*A(j,sire(i));
|
A(j,i) = 0.5*A(j,sire(i));
|
||||||
A(i,j) = A(j,i);
|
A(i,j) = A(j,i);
|
||||||
end
|
end
|
||||||
A(i,i) = 1;
|
A(i,i) = 1;
|
||||||
else
|
else
|
||||||
for j = 1:(i-1)
|
for j = 1:(i-1)
|
||||||
A(j,i) = 0;
|
A(j,i) = 0;
|
||||||
|
@ -313,7 +313,7 @@ for i = 1:length(numgroups)
|
||||||
fprintf(fileID, '\t');
|
fprintf(fileID, '\t');
|
||||||
fprintf(fileID, num2str(reliability(I)));
|
fprintf(fileID, num2str(reliability(I)));
|
||||||
fprintf(fileID, '\n');
|
fprintf(fileID, '\n');
|
||||||
|
|
||||||
I = I + 1;
|
I = I + 1;
|
||||||
end
|
end
|
||||||
fprintf(fileID, '\n');
|
fprintf(fileID, '\n');
|
||||||
|
|
Loading…
Reference in a new issue