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 blocks for mature equivalent and actual yields; each block includes the daily BP of yield, actual TD yield (-999.0 if that day is not a TD), the standard curve value, and the individual TD deviation (-999.0 if that day is not a TD) corresponding to that day of lactation (Table 4.3). There are 4 $ \times$ maxlen lines in 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 & \\
...
...t-day actual deviation & 173--192 & -999.0 if not a test-day \\
\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.3; the table is correct.
[jcole@aipl366 bestpred\]$ cat cowcurve.ST.20080807
HOUSA.EX.COW. 5 1  1 8.061 -999.000 40.162 -999.000 8.053 -999.000 40.122 -999.000
HOUSA.EX.COW. 5 1  2 8.241 -999.000 46.466 -999.000 8.233 -999.000 46.420 -999.000
HOUSA.EX.COW. 5 1  3 8.357 -999.000 50.528 -999.000 8.349 -999.000 50.478 -999.000
HOUSA.EX.COW. 5 1  4 8.447 -999.000 53.568 -999.000 8.438 -999.000 53.515 -999.000
HOUSA.EX.COW. 5 1  5 8.522 -999.000 56.006 -999.000 8.513 -999.000 55.951 -999.000
HOUSA.EX.COW. 5 1  6 8.588 -999.000 58.043 -999.000 8.579 -999.000 57.986 -999.000
HOUSA.EX.COW. 5 1  7 8.647 -999.000 59.790 -999.000 8.639 -999.000 59.731 -999.000
HOUSA.EX.COW. 5 1  8 8.702 -999.000 61.316 -999.000 8.694 -999.000 61.256 -999.000
HOUSA.EX.COW. 5 1  9 8.753 -999.000 62.668 -999.000 8.745 -999.000 62.606 -999.000
HOUSA.EX.COW. 5 1 10 8.802 -999.000 63.879 -999.000 8.793 -999.000 63.816 -999.000
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.4). 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.4; 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.