This dataset contains R-scripts to analyse the diversity and composition of seed fungal communities (Fort et al. 2020. Maternal effects shape seed fungal communities in Quercus petraea. New Phytologist, https://doi.org/10.1111/nph.17153). The bioinformatic script was applied to raw sequences after paired-end sequences were joined using PEAR v0.9.10 (Zhang et al., 2014). Raw sequences are available at https://www.ncbi.nlm.nih.gov/Traces/study/?acc=PRJNA551388. The metadata and ASV tables are provided so that the statistical analysis scripts can be applied without running the bioinformatic steps. Scripts used to fit HMSC models (Ovaskainen et al., 2017) are provided.