4.3 File Output

If an output file does not exist when BESTPRED is run the file is created and data written to it. Because output filenames include the current date successive runs of BESTPRED on the same day will append data to existing files rather than overwriting them.

When the WRITEcurve parameter is set to 1 data describing the lactation curve for each cow and trait are written to a file whose name is formed by appending the calculation method (ST or MT) and date (YYYYMMDD) to CURVEfile (e.g. cowcurve.ST.20080807). Each line in the output file contains a cow ID, lactation number, trait number, DIM, and TD yield, as well as blocks for mature equivalent and actual yields; each block includes the BP of daily yield and the standard curve value corresponding to that day of lactation (Table 4.4). Up to 4 $ \times$ maxlen lines will be written to the file for each cow processed. The cow's individual lactation curve is obtained by summing the daily BP and standard curve columns.

Contents of the lactation curve output file Value & Column(s) & Notes

\begin{xtabular}{lll}
Cow ID & 1--17 & \\
Lactation number & 18--22 & \\
...
...he lactation curve \\
Standard curve ME yield & 113--132 & \\
\end{xtabular}
The first 10 lines of a example lactation curve data file are presented below. The data were edited to fit on the page and the resulting column boundaries do not match Table 4.4; the table is correct.
[jcole@aipl366 bestpred\]$ cat cowcurve.ST.20080807
HOUSA.EX.COW. 5 1  1 -999.000 8.061 40.162 8.053 40.122
HOUSA.EX.COW. 5 1  2 -999.000 8.241 46.466 8.233 46.420
HOUSA.EX.COW. 5 1  3 -999.000 8.357 50.528 8.349 50.478
HOUSA.EX.COW. 5 1  4 -999.000 8.447 53.568 8.438 53.515
HOUSA.EX.COW. 5 1  5 -999.000 8.522 56.006 8.513 55.951
HOUSA.EX.COW. 5 1  6 -999.000 8.588 58.043 8.579 57.986
HOUSA.EX.COW. 5 1  7 -999.000 8.647 59.790 8.639 59.731
HOUSA.EX.COW. 5 1  8 -999.000 8.702 61.316 8.694 61.256
HOUSA.EX.COW. 5 1  9 -999.000 8.753 62.668 8.745 62.606
HOUSA.EX.COW. 5 1 10 -999.000 8.802 63.879 8.793 63.816
If CURVEsmall is 1 then the a compact version of the file is written which contains only actual yields - the best prediction and standard curve values for ME are not written to CURVEfile.

Similarly, when the WRITEdata parameter is set to 1 data describing the lactation yields for each cow and trait are written to a file whose name is formed by appending the calculation method (ST or MT) and date (YYYYMMDD) to DATAfile (e.g. cowdata.ST.20080807). Each line in the output file contains a cow ID, lactation number, trait name, number of tests, blocks for mature equivalent and actual yields, DCR, method of calculation (ST or MT), persistency of yield on a 305-d basis, and reliability of persistency (Table 4.5). Each yield block includes five columns: 305-d yield, 365-d yield, laclen-d yield, lactation-to-date yield, and contemporary average yield. Note that the records for SCS are multiplied by 100.

Contents of the cow data output file Value & Column(s) & Notes

\begin{xtabular}{lll}
Cow ID & 1--17 & \\
Lactation number & 18--20 & \\
...
...ld & 111--116 & \\
Reliability of persistency & 117--120 & \\
\end{xtabular}
An example cow data file is presented below. The data were edited to fit on the page and the resulting column boundaries do not match Table 4.5; the table is correct.
[jcole@aipl366 bestpred]$ cat cowdata.ST.20080807
HOUSA.EX.COW. 5 Milk 9 21753. 24744. 21753. 18824. 20000. 21731. 24720. 21731. 18805. 19980. 102. MT -0.06 85.
HOUSA.EX.COW. 5 Fat  9   778.   893.   778.   669.   700.   774.   889.   774.   666.   697. 102. MT  0.04 84.
HOUSA.EX.COW. 5 Prot 9   692.   796.   692.   595.   600.   687.   790.   687.   590.   595. 102. MT -0.31 84.
HOUSA.EX.COW. 5 SCS  9   221.   230.   221.   215.   308.   268.   278.   268.   260.   373. 101. ST -0.58 72.

See About this document... for information on suggesting changes.