基于无监督学习的荷斯坦牛泌乳代谢表型分析:数据、代码与图表源材料

Published: 29 October 2026| Version 1 | DOI: 10.17632/m26488852c.1
Contributor:

Description

本数据集提供荷斯坦牛DHI聚类分析的数据、Python分析代码、R绘图代码及三图三表源材料。数据涵盖新疆地区某奶牛场2017、2019、2021、2023和2024年的DHI记录,包含10,537条去重前抽取记录、9,714条分析输入记录及质控后的9,450条记录,对应2,932个牛只标识。六项聚类指标为日产奶量、乳脂率、乳蛋白率、乳尿素氮、脂蛋比和体细胞评分。资料包括质控与聚类结果、重复分析输出、图表源数据、全精度数值表、数据字典和运行说明。记录保留牛只标识、出生日期和测定日期。 Data and code for unsupervised analysis of lactation and metabolic phenotypes in Holstein cows This dataset provides data, Python analysis code, R figure code, and source materials for three figures and three tables from the Holstein DHI clustering study. The records come from a dairy farm in Xinjiang, China, in 2017, 2019, 2021, 2023 and 2024. The package contains 10,537 extracted records before deduplication, 9,714 analysis-input records, and 9,450 records after quality control, linked to 2,932 cow identifiers. The six clustering features are daily milk yield, milk fat percentage, milk protein percentage, milk urea nitrogen, fat-to-protein ratio and somatic cell score. Files include quality-control and clustering results, repeated-analysis outputs, figure source data, full-precision tables, a data dictionary and run instructions. Cow identifiers, birth dates and test dates are retained.

Files

Steps to reproduce

解压资料包后,在 holstein-dhi-clustering 根目录运行。 环境:Python 3.12.14、R 4.5.3;字体:宋体(SimSun)和 Times New Roman。 1. 安装Python依赖并校验文件: python -m pip install -r requirements.txt python code/verify_package.py 2. 运行数值分析: python code/reproduce.py --analysis-only 3. 安装R包并运行分析与绘图: Rscript -e "install.packages(c('ggplot2','patchwork','ggtext','ragg','svglite','systemfonts'))" python code/reproduce.py 结果写入 reproduced/。变量定义见 metadata/data_dictionary.csv,文件说明见 README.md。

Institutions

Categories

Dairy Cattle

Licence