## 1 Introduction  
It is increasingly being recognized that microorganisms may determine the functioning and health of eukaryotes, whether plants, humans, or other animals. There is therefore great scientific interest in studies of microbial communities (or metagenomes) in environmental samples (a term which, in addition to biological tissues, also refers to samples of surrounding substrates such as air, water, or soil [1, 2]). High-Throughput Illumina Sequencing (HTS), which allows for amplicon sequencing at great depth and high taxonomic resolution, is becoming a preferred method for studying metagenomes in large sets of environmental samples. As a cultivation-independent method it is frequently used to study the diversity and potential function of microbial communities [1, 2, 3]. Mycobiomes (or microbial fungi) in the phyllosphere of trees have been studied to investigate their association with tree performance related to plant internal and external factors such as plant genotype [4, 5], organ specificity [6], and geographic and climatic parameters [7, 8, 9, 10, 11, 12]. Sequencing protocols and bioinformatic pipelines that are used to dissect metagenome data are also under rapid development [1, 3]. As environmental samples vary from project to project the molecular workflow must be optimized in each case to target the right organisms in an appropriate way [3, 13, 14, 15, 16]. Firstly, DNA extraction kits used for metagenomic studies must operate within the physicochemical constitution of the environmental sample in question [3]. Secondly, sample primers must be designed to bind only to the microorganisms of interest, and they should operate reliably across samples that may vary in, for example, DNA content [3]. Thirdly, as single samples for HTS are labelled and pooled during the sequencing process, an extension and index primer system must be designed to construct an adequate amplicon library, and this affects the design of the primers and the PCR settings for amplification of the DNA extracts [16]. Finally, the entire protocol must be optimized to allow for comparisons of metagenomic data [17]. Here, we present the optimization of a HTS protocol for fungal metagenomic studies of large set of aspen (_Populus tremula_ L.) leaves (Figure 1a) that varied in genotype, age, phenolic composition and the expected richness and abundance of endo- and epiphytic fungal species. During the optimization, we evaluated five fungal ribosomal DNA-specific primers to extract the mycobiome, and developed and tested four extended primers as well as two index primers to identify the mycobiome of 380 samples. Before preparing all samples for HTS, a subset of samples was selected for each of the optimization steps, from DNA extraction to specific polymerase chain reaction (PCR) protocols, which were optimized for fungal, extension and index primers.  
Figure 1: Workflow for preparing an amplicon library for high-throughput sequencing (HTS): (**a**) (1) leaves were harvested, lyophilized, and ground to powder; (2) DNA was extracted; (3) primers were designed to target the conserved fungal rDNA ITS region; (4) forward and reverse fungal-specific primers were generated for PCR; (5) extended PCR products were made, containing the ITS region (blue), the fungal-specific primer region (yellow), nucleotides as an overhang (green) and binding site for index primers; (6) addition of sample-specific index primers (pale blue) to the extension PCR product from (5), which were then compiled to create the amplicon library. (**b**) Primers tested in this study (selected primers used in bold).