Chemical and sensory discrimination of coffee: impacts of the planting altitude and fermentation

Edaphoclimatic conditions, planting altitudes, soil, the microbiome of plants and fruits, genotypes, and postharvest processing are variables that contribute to the chemical and sensory quality of the coffee. Thus, the objective of this study was to evaluate the impacts of planting altitude and fermentation of fruits on the chemical and sensory quality of the coffee using Nuclear Magnetic Resonance (NMR) and Linear Discriminant Analysis (LDA). Cherry coffees were harvested in eight points of altitudes between 826 and 1078.08 m. A completely randomized design with e planting altitudes, five fermentation processes, and five repetitions was performed. Lipids, trigonelline, citrate, and malate were the compounds that most contribute to the chemical discrimination of coffee in the altitudes below 969 m. While, in the high altitudes (> 1000 m), this discrimination was due to the HMF, quinic acid, caffeine, and formic acid, and the global notes of coffee beverages were higher than 80 points. In fermented coffee, the LDA of the chemical data indicates the formation of five clusters, showing how the compounds can suffer changes depending on the form of processing used in coffee. The best score of beverage was observed in samples of 1078.08 m under dry fermentation and only in samples of 969 m was observed a significant difference in the sensory score between spontaneous fermentation and induced fermentation. Thus, coffee sensory scores were dependent on planting and fermentation methods and NMR and LDA techniques proved important in chemical and sensory discrimination of coffees.


Introduction
Many variables contribute to the coffee quality, especially when considering the relationship between the chemical compounds and sensory attributes of the roasted coffee. The compounds precursors of flavor in coffee beverage, such as pyridine, alkyl-pyridines, and furans, may be produced by tertmal degradation of the trigonelline during roasting coffee [1]. The caffeine is odorless and has a bitter taste that is important to the taste and aroma of coffee [2].
Conversely, the components negatively related to coffee sweetness, such as citrate and malate, have a very strong sour taste. The relationship between sweetness and sourness is variably affected at low intensities/concentrations but symmetrically suppressive at medium and high intensities/concentrations. Similar to bitterness, coffee astringency had a positive relationship with lipids, quinic acids, mannose, and quinine and negative relation with chlorogenic acids, citrate, malate, trigonelline, arabinose, and galactose [3].
In recent years, studies have indicated that edaphoclimatic conditions, planting altitudes, soil, the microbiome of plants and fruits, genotypes, and postharvest processing are factoring determinants of the chemical and sensory quality of the coffee [4][5][6][7][8][9].
The microbial metabolites affect the chemical and sensory composition of fermented coffee [10][11][12][13]. However, there are two distinct scientific trends regarding the impact of fermentation on the chemical, nutritional, and sensorial quality of coffee. Regarding the first trend, this quality is due to the spontaneous fermentation that occurred in coffee fruits [2,6,[14][15][16]. The processing of coffee cherries [2], the genetic variety of the plant [15], and natural coffee microbiota [6] affect this fermentation. Another trend argues that coffee quality can be optimized with the application of microorganism's starters that modify the taste and texture [7,8,13,15,17,18]. Moreover, the production of specialty coffees has suffered a profound revision in the form of processing, through the understanding and introduction of fermentation techniques, focusing on the observation of how chemical compounds interact with sensory profiles of the coffee beverage [4,16,20].
In this range of interactions between chemical compounds and microbial agents, processing techniques need to be better understood to determine the best strategies for the production of specialty coffees. Thus, the objective of this study was to evaluate the impacts of planting altitude and fermentation of fruits on the chemical and sensory quality of the coffee. For this, we used the Nuclear magnetic resonance (NMR) technique to determine the chemical compounds with the highest contribution to the sensory attributes of coffee samples and Linear Discriminant Analysis (LDA) to evaluate the grouping relationship of chemical and sensory classes according to the production zones (altitude) and how the variables are related about the final quality of the coffee.

Materials and methods
In this study, we evaluated the impact of planting altitude and fermentation of coffee cherries on the chemical and sensory quality of the coffee.
The samples of Cherry coffee (Coffea arabica, variety Catuaí Vermelho 81) were harvested in the maturation period in eight different points of the state of Espírito Santo, Brazil (Supplementary material S1). Only coffee in the full maturity stage (90%) was collected.
After harvesting, the coffees were taken to the processing unit to be washed in 1000-L plastic boxes to separate the floating fruits. After washing, the fruits were peeled with the DPMM-04 equipment (coffee peeler).
The freshwater used in the processing of the coffees was supplied by CONAMA guideline n. 357/2005, which deals with the classification of water bodies such as the recommendation of Pereira et al. [2].

Analysis of chemical and sensory quality of Cherry coffee of different altitudes
The samples of cherry coffee obtain in altitudes ranging from 826 m and 1078.08 m (Supplementary material S1) were used in analises of NMR and sensory attributes before and after fermentation.

Fermentation of the Cherry coffee
A completely randomized design with eight planting altitudes, five fermentation processes (Table 1), and five repetitions was carried out to evaluate the impacts of the spontaneous and induced fermentation on the chemical and sensory quality of the coffee. These fermentations were performed following the recommendations of Pereira et al. [2].
The coffees were removed from the fermentation tanks and immediately taken to drying in a suspended bed with a plastic cover until reduced to 11% (b.u) for safe storage.

Roasting procedures and grinding
The roasting procedures of coffee were carried out in a Probation roaster (Probat), with roasting curves of 140 °C to 190 °C. The 8 h after roasting, the coffees were placed in aluminum packages.
The coffees were also ground in a disk mill (Bunn Coffee Mill, model G3A HD), with granulometry between 70 and 75% of the particles passing through a 20-mesh sieve (standard US Standards).

NMR data analysis
The 1 H NMR spectra of ground coffee were obtained at Laboratory of Research and Development of Methodologies for Analysis of Oils (LabPetro) Chemistry Department, Federal University of Espirito Santo, Campus Goiabeiras, Vitoria-ES, in a Varian spectrometer of 400 MHz, using a probe of 5 mm 1H/X/D Broadband at 25 °C and a 90° pulse. First, the T1 values were optimized, using three different coffee samples, which had very different sensory characteristics so that the waiting time at the time of analysis was determined. In addition, the solvent was used in 95 °C and room temperature (around 20 °C) to assess the difference in the spectra between the temperatures of coffee extraction and of beverage tasting. There were no significant differences between these spectra.
After optimization, the samples were prepared by dissolving 0.07 g of ground coffee in deuterated water (D2O), totaling a volume of 700 µL and after 4-min waiting the supernatant was collected for analysis. The instrumental conditions were a spectral window, 4401.4 Hz; acquisition time, 7445 s; standby time, 27 s; pulse, 90; number of transients, 64. Chemical shifts were obtained using maleic acid (6.40 ppm) as a reference signal, using an insertion tube, and the phase and baseline were manually adjusted.

Sensory analysis procedures
Coffee brewing was performed following the recommendations of the Specialty Coffee Association (SCA).
The cupping protocol used contains ten attributes, namely the following: fragrance/aroma, flavor, aftertaste, acidity, body, balance, uniformity, clean cup, sweetness, and overall. The grades in each attribute range from 6 to 10 [21]. The coffees were evaluated by six professional judges (Q-graders), following the guidance of Pereira et al. [22].

Data analysis
Statistical analysis was performed using the LDA supervised classification method using Matlab ® Software. LDA is a multivariate classification method that uses the Mahalanobis metric to calculate the discrepancies of each sample at the center of each identified class. The probability that a sample belongs to a class is all the greater the shorter the distance from that class.
Four LDA models were made using the chemical compounds and sensory attributes of Cherry Coffee. The chemical and sensory discrimination of these coffees about planting altitude is observed in the first and second models, while the impacts of fermentation can be observed in the third and fourth models.
Coffee sensory scores of the 6 Q-graders were also submitted to analysis of variance and Scott-Knott test at 5% probability (p < 0.05). 25 kg of Cherry coffee with mucilage were placed dry (without additional water) to carry out the fermentation. The inoculation was performed with Saccharomyces cerevisiae (10 6 UFC) at 1% (w/v). Induced fermentation by starter culture took place at 21 °C for 36 h. The coffee samples were washed after the fermentation processing finished

Results
The 1 H-NMR spectra were integrated into the areas described in Fig. 1 and water signals (H 2 O; bins 4.50-5.50 ppm) were removed. For multivariate analysis, these data were referenced with maleic acid, phased, baseline corrected, aligned, and normalized by MestRe Nova Software, and then the data between − 1.00 and 10.00 ppm were reduced for spectral ranges (Fig. 1). In these spectra, we identified 15 regions of integrations and 12 compounds classes in the Coffee samples produced in different planting altitudes ( Fig. 1).

Analysis of chemical and sensory quality of Cherry coffee of different altitudes
The lipids (3) and trigonelline (13 and 14) in 826 m and the lipids (1), citrate and malate (6), and trigonelline (11) (15), quinic acid (4), caffeine (10), and formic acid (12) were the compounds that most contribute to group discrimination (Figs. 1, 2). These results show variations in chemical composition in the function of the planting altitude. For the sensory data, the uniformity in 826 m and the overall in 1005 and 1078. 08 m were the sensory attributes that most contributed to the discrimination of the groups (Fig. 3). At other altitudes, there was no significant difference between attributes in sensory discrimination of Cherry coffee.

Analysis of chemical and sensory qualities of Cherry coffee of different altitudes after fermentations
The results of the LDA analysis indicate the formation of five clusters between chemical data and the fermentation process (Figs. 1, 4). Nothing cluster was observed in the LDA of the fermentations and sensory attributes (Fig. 5). However, the fermented coffee has sensory scores greater than 78 points, and regardless of the planting altitude; these scores were higher than 80 points in the Washed fermentation (Table 2).
The 15 regions of integrations and 12 compounds' classes show the chemical diversity of the coffee samples produced at different planting altitudes (Fig. 1). The number and concentration of compounds of coffee depend on the species and variety of coffee, degree of fruit maturation, harvest time, type of fermentation, temperature and drying time, and roasting [1][2][3][4][5] which explains the difference of compounds number between our study and other studies [3,25,26]. Thirteen regions of integrations, 11 compounds for dark ark roasting levels, and 12 compounds for light roasting levels were observed in samples de Arabica coffee and Robusta coffee using NMR [3], while about 20 compounds (e.g. formic acid, fumaric acid, quinic acid, caffeine, sugar, trigonelline, and lipids) were observed in the 1 H NMR spectra of coffee beans produced in Portugal, Timer-Leste, Kenyan, Colombia, and Brazil [26]. According to these authors, the planting region influences the chemical composition of the coffee cherry, and in the principal component analysis, the 12 coffee cultivars were grouped into four groups in the function of the chemical compounds. In green and roasted Coffea arabica from the Middle East region were observed 18 metabolites by NMR [25]. Furthermore, the NMR was used to identify and quantify coffee adulterants in Brazil [27], which shows the potential of this analytical technique in the chemical discrimination of coffee beans.
The altitude range of 826 to 907.08 m was opposite the ranges of high altitudes by canonical variable 1 in the LDA model (Fig. 2). These results show a variation in the chemical composition of the coffee in the function of the  planting altitude. Other studies have also shown significant differences in the chemical composition of the coffees produced at different planting altitudes [7,8,19,28]. Therefore, the coffees produced in altitude ranges can be grouped in the function of the chemical composition. In high planting altitude (> 1000 m), the global notes were higher than 80 points ( Table 2) indicating that edaphoclimatic conditions of this environment favor the formation of organoleptic compounds, for example, sugar, quinic acids, formic acid, citrate, malate, HMF, and caffeine (Figs. 1, 2,  3). Few studies relate the composition of formic acid to the sensory quality of coffee [2,29]. Quinic acid was the compound most abundant in the mucilage of green coffee beans produced in 1.329 m of altitude [6]. Citrate and malate have a very strong sour taste and a negative correlation between these compounds content and coffee sweetness has been observed [3]. Furthermore, in the altitude range with the occurrence of these compounds, the sensory results were also above 80 points; however, the processing with microbial inoculation indicated a score below SCA quality standards (Figs. 1, 2, 4, Table 2).
HMF formed in foods during heating is considered a marker of the extent of Maillard and sugar dehydration reactions. However, the HMF content of different types of beers is relatively low, indicating its potential for degradation during fermentation [30]. According to Pereira et al. [2], the increase of the level of HMF with the altitude in the process semi-dry shows that the residual sugars of the parchment produce a beverage softer and sweeter in sensory analyses of the Q-Graders.
Although caffeine content was not found to have a direct effect on beverage quality, levels of this alkaloid are higher in samples of high-quality coffee than other samples of coffees [31,32]. Furthermore, a significant linear regression was found between caffeine content and planting altitude in Arabica coffee [15].
The overall, body, and uniformity were the sensory attributes that most influenced the discrimination of coffee by planting altitude (Fig. 3). However, these attributes are sensory characteristics that normally the Q-Graders are free to highlight. Q-Graders can raise or lower their grades according to their criteria. The body is a sensory perception of the weight of the beverage on the tongue. Thus, the altitude/body ratio can vary according to the nature of the taster-Grader. Furthermore, a high body score can also be perceived as a defect in some cases, mainly for low-altitude coffees [28].
Lipids, trigonelline, formic acid, and HMF are important variables in the chemical discrimination of the fermented coffee (Figs. 1, 4). The lipids extracted from coffee beans contain about 75% of triacylglycerols [33] and the migration of lipids from the endosperm to the surface of the coffee bean [34] that can contribute to fermentation. Microbial degradation of this biomolecule can produce sensory compounds, such as fatty acids and citrate. The degradation of lipids by microbial enzymes has been observed in the growth of different microorganisms, for example, S. cerevisiae [35,36]. Furthermore, lipids' oxidation also causes off-flavors [37]. Thus, the lipids' degradation shows the importance of the fermentation in the chemical and sensory quality of the coffee beverage.
Formic acid has been reported as the natural presence in plants and fruits, and it can be an additional mechanism for defense against diseases or alterations produced by bacteria and fungi [38]. The concentration of this acid in green coffee is very low, but it represents about 10% of the organic acids in dried coffee beans [39]. Furthermore, formic acid has been reported as a strong contributor to total sensory perceived acidity of the coffee beverage [5].
For washed fermentation, the formic acid can also be formed by the action of the Enterobacteriaceae and Pantoea bacteria through carbohydrates' degradation [40]. Furthermore, the production of sugar reduction and microbial proteins by fermentation can have influenced the HMF contents of coffee. This compound is formed during the roasting of coffee by reactions of Maillard and sugar dehydration [30] and is recognized as an indicator of quality deterioration in a wide range of foods [29].
The HMF formation is greater in the semi-dry method than in other fermentation processes due to sugar dehydration [2]. However, the degradation of these compounds was observed in the yeast fermentation and occurred faster when there is sugar in the must [30,41].
In the fully washed, the coffee grains are left to rest for a spontaneous fermentation to occur, without adding water [2]. The major loss of biomass in this process must be due to the consumption of organic matter by microbial respiration and/or fermentation [42].
The degradation and formation of chemical compounds by processing (Figs. 1, 4) and roasting of the grains produce the coffee flavor [43]. The trigonelline and lipids degradation had been observed washed fermentation [6,44]. The impact of the roasting on flavor is due to the Maillard reactions, breakdown of amino acids, and degradation of trigonelline, quinic acid, pigments, and lipids [45].
In yeast fermentation, the chemical discrimination of coffee was due to caffeine and trigonelline (Fig. 4). These two compounds are responsible for the bitterness and astringency of coffee beverages [6].
The quinic acid had no significant contribution to the chemical discrimination of coffee after the fermentation, which may be due to its degradation by microorganisms of the must (Figs. 1, 5). The degradation of this acid during fermentation of the green coffee beans may be linked to fungal metabolism [11]. However, the decreased level of this compound was also observed during the immersion of the coffee grains in water for fermentation [6,11]. Furthermore, De Bruyn et al. [6] also observed that the concentrations of citric acids, quinic acid, caffeine, and trigonelline were greater before than after the soaking step. Thus, upstream, and downstream fermentation influenced the chemical composition of the coffee.
During coffee fermentation, potentially lactic bacteria can decompose phenolic compounds to obtain carbon and energy sources. For example, the metabolism of hydroxycinnamic acids by enzymes, acid phenol decarboxylases and reductases from heterofermentative lactic acid bacteria was observed in the study by Filannino et al. [45].
The sensory data show that the processing of Cherry coffee was not a determining factor for the chemical and sensory composition of coffee beverages ( Table 2). The planting altitude had a higher contribution to the composition of organic acids and volatile compounds of the C. canephora than processing by dry method [7].However, the microbiota of the planting region and physical and chemical conditions of the processing had important contributions to these data that corroborate the hypothesis established by De Bruyn et al. [6]. According to Veloso et al. [9], studies on the microbiota of coffee have addressed its role during the fermentation process; however, the knowledge of indigenous microorganisms harbored in fruits and soil of coffee trees growing in fields is essential, as they can contribute to fermentation. Furthermore, the research of the coffee ecosystem contributes to a better understanding of a state-of-the-art framework for the further analysis and subsequent control of this complex biotechnological process. Microorganisms from the fruit, seed, handlers, water, and processing machinery can all seed the fermentation and have the potential to affect the sensory and chemical quality of the coffee.
The washed and semi-dry process and sensory attributes overall and uniformity were the variables that most contributed to the discrimination for sensory of coffee after fermentation (Fig. 5). Sensorial results addressed by Pereira et al. [2] indicate that in high-altitude areas, the semi-dry method is capable of producing coffees with different sensory profiles in the same way as the washed method. The overall can be directly influenced by the preference of Q-graders, while the uniformity indicates a good consistency of the coffee beverage. The application of the semi-dry method has been described by the high standard of sweetness and harmony between the sensory attributes [46]. Furthermore, sucrose content in coffee seeds processed by the semi-dry method was significantly higher than in those processed by the wet method [1].
From the perspective of the production of specialty coffees, it is important to understand in depth the maximum variables that are inherent in the definition of a good coffee aiming at a relationship between applied technologies, processing, fermentations, and edaphoclimatic conditions aiming at a broader understanding of the interactions that are possible in the course of producing specialty coffees. Furthermore, the interactions among soil, fruit, altitude and slope exposures concerning the sun are important to understand the microbiome in coffee [9].
The five clusters of the LDA analysis with the chemical data and fermentation show the compounds can suffer changes depending on the form of processing used in coffee (Figs. 1, 4). The LDA with infrared spectroscopy data also showed differences in the chemical composition in the function of the post-harvest treatment of Arabica coffee cherries [47]. The LDA model with NMR data showed that the time and temperature of fermentation alter the chemical characteristics of coffee beans [4]. The composition of caffeine, trigonelline, and sugar was also different in function of the post-harvested processing (wet and semi-dry) applied to the coffee seeds of 17 Brazilian Arabica cultivars [1]. According to Bruyn et al. [6], the postharvest treatment and processing (wet and dry) affect the microbial and chemical quality of the unroasted green coffee beans.
The washed processing has the lipids (3), formic acid (12), and HMF (15), as an antagonist (Fig. 4, Table 1). A significant difference in lipid level was observed between processing methods of coffee [48]. There were metabolisms of lipids during wet processing [49] and the lipase activity has been shown in cell growth of microorganisms isolated from spontaneous wet coffee fermentation [50]. Brioschi Junior et al. [6] showed using the LDA model that the lipids and formic acid had a high influence on the chemical discrimination of fermented coffee. According to the authors, the degradation of the carbohydrates in fermentations contributes to the increase of the level of formic acid in coffee beans, since the content of this acid is low in green coffee. Although HMF did not have significant functional relationships with washed processing [2], a decrease in the content of this compound was observed during the fermentation [30,41]. Thus, the metabolism of lipids, formic acid, and HMF during fermentation contribute to the effect antagonist of these compounds in washed processing (Fig. 4, Table 1).
In the fully washed method, the trigonelline (11 and 14) and lipids (1) were compounds that most contribute by clusters formation in LDA model. However, there was not was the difference in the level of these compounds among coffee varieties hybrids, yellow Bourbon, red Catuaí, Rubi, and Topázio after the application wet and semidry methods in fruits [1]. However, these authors observed that trigonelline content was higher in the wet method than the semi-dry method. Furthermore, this compound had a high influence on the chemical discrimination of fermented coffee.
In the yeast fermentation, the compounds that most contribute to discrimination in the LDA method were caffeine (10) and trigonelline (13). These compounds were antagonistic in the dry fermentation (Figs. 1, 4). According to Bruyn et al. [6], there is a decrease in the concentration of caffeine and trigonelline during the wet processing of coffee beans. Furthermore, washed and fully washed methods were in opposite positions in relation to canonical variable 1, while yeast fermentation and semidry were in the opposite position to dry fermentation in relation to canonical variable 2 (Fig. 4A). Thus, conditions and types of fermentation applied in the coffee fruits may influence in chemical quality of coffee beverages (Fig. 4, Table 1).
Significant differences in global notes between types of fermentation were observed (Table 2). However, the lack of a cluster in the LDA model between these fermentations and sensory attributes (Fig. 5) may be due to the homogeneity of note of each sensory attribute (Fig. 5B) or different impacts of the fermentation process on each sensory attribute (Table 2). Furthermore, the global notes had low variations ( Table 2). The difference between the highest and lowest scores was about 9 points, which also contributed to the absence of clusters in the LDA model (Fig. 5, Table 2).
The sensory attributes acidity, balance, body, final score, flavor, and overall did not show a significant linear correlation with the bacterial and fungal diversity of the coffee beans [4]. However, microbial activity has a strong contribution to the chemical and sensory quality of coffee beverages [2,4,10]. According to UCDA classification [51], the fermented coffee in this study (Table 2) has sensory scores of coffees below specialty (score < 80.0 points), specialty (80 ≤ score < 84.99 points), and specialty origin (85 ≤ score < 89.99 points).
The results of this study indicate that the chemical discrimination of the coffee is dependent on the planting altitude and the two distinct scientific trends regarding the impact of fermentation on the chemical, nutritional, and sensory quality of the coffee are true. Spontaneous and induced fermentations also contribute to the chemical and sensory quality do the coffee beverage. Furthermore, coffee sensory scores are dependent on planting and fermentation methods and NMR and LDA techniques proved to be important in chemical and sensory discrimination of coffees.
Therefore, future studies need to demonstrate the interactions between anabolism and catabolism during fermentation processes, in association with chemical and sensory interaction, aiming at a real understanding of the quality expressed in the coffee cup.