Maxime Juston
email: maxime.juston@utc.fr

Nicolas Damay

Christophe Forgez

Stéphane Vivier

Karrick Mergo-Mbeya

Bogdan Vulturescu

Guy Friedrich

Stephane Vivier

Karrick Mergo Mbeya

S Vivier

Direct determination of a single battery internal resistances distribution using a heterogeneous model

à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

Lithium-ion cells are becoming one of the best solutions to store energy in a wide range of applications, in particular among systems where weight or volume are major constraints, such as drones, cars and trains. In the industry, this technology is often not well known and it is to our advantage to develop a simple yet robust model that can be used in a wide range of operating conditions. In order to anticipate the voltage response of a cell to a current profile, model can be used to simulate its behaviour. An option is to build an electrochemical model that takes into account the chemical reactions and other deep level reactions [START_REF] Di | Lithium-Ion Battery State of Charge and Critical Surface Charge Estimation Using an Electrochemical Model-Based Extended Kalman Filter[END_REF][START_REF] Yuan | A transfer function type of simplified electrochemical model with modified boundary conditions and Padé approximation for Li-ion battery: Part 1. lithium concentration estimation[END_REF][START_REF] Dong | Numerical modeling and analysis of the thermal behavior of NCM lithium-ion batteries subjected to very high C-rate discharge/charge operations[END_REF][START_REF] Delacourt | Analyse des Performances et du Vieillissement des Batteries à Ions Lithium par des Méthodes de Modélisation Mathématique[END_REF]. However, the complexity of these model and the number of parameters needed do not suit the expectations of most end users. Another option is to use a mathematical model such as neuronal networks or fuzzy logic [START_REF] Saha | Prognostics Methods for Battery Health Monitoring Using a Bayesian Framework. Instrumentation and Measurement[END_REF][START_REF] Nuhic | Health diagnosis and remaining useful life prognostics of lithium-ion batteries using data-driven methods[END_REF][START_REF] Weng | State-ofhealth monitoring of lithium-ion battery modules and packs via incremental capacity peak tracking[END_REF]. One last option is to use electrical equivalent circuit [START_REF] Kuhn | Modelling Ni-mH battery using Cauer and Foster structures[END_REF][START_REF] Andre | Characterization of high-power lithium-ion batteries by electrochemical impedance spectroscopy. II: Modelling[END_REF][START_REF] Berrueta | A comprehensive model for lithium-ion batteries: From the physical principles to an electrical model[END_REF][START_REF] Merla | An easy-to-parameterise physics-informed battery model and its application towards lithium-ion battery cell design , diagnosis , and degradation[END_REF]. Although these models are easier to parameterize, their parameters have to depend on current, temperature and State of Charge (SoC) to bring accurate predictions. As a result, those models usually require lookup tables that require many measurements to be completed. These models are useful to predict a cell performance in many operating conditions in order to optimize its sizing, choose an appropriate cooling system or predict its capacity to fullfill a mission. A previous research [START_REF] Kuhn | Modelling Ni-mH battery using Cauer and Foster structures[END_REF] led to an homogeneous equivalent circuit of a Ni-mH cell, built from a physical basis. This model only takes into account the main phenomena that occur inside a cell, with the two electrodes behaviours being mixed together. Recently, the usual homogeneous model was extended to a heterogeneous one, the so-called "multibunch model" [START_REF] Damay | Heterogeneous behavior modeling of a LiFePO 4 -graphite cell using an equivalent electrical circuit[END_REF]. It aims to model the heterogeneity of the cell through a distribution of one or more parameters. The origin of those distributed parameters can have many sources that will be listed. This model is more accurate than an homogeneous one and although it may appear more complicated at first sight, it is faster to characterize than a usual electrical equivalent circuit model. Actually, we found that the addition of the heterogeneous behaviour representation in the model makes the use of SoC-dependant parameters not necessary anymore (except for the open circuit voltage). This allows us to characterize our model around 10 times faster than other usual electrical model that have a precision of 10% in SoC. Once characterized, our model is able to simulate the cell over its whole range of operation. To caracterize the heterogeneity of a cell also brings valuable insight into a cell behaviour and internal equivalent properties. We also expect the resistances distribution to change during the battery lifetime due to aging, and one of our goals behind the scope of this paper is to track these changes to identify the mechanisms behind them. Problems related to the determination of the distribution will be presented and our solutions explained.

In this paper, we demonstrate that the measurement of a single discharge, used to build our model, allows us to simulate the cell in a different operating conditions. In section 2 we present the construction of the model, its parameters and variables. Our experimental setup and the used cell are presented in section 3 while section 4 describes the simulation and optimization algorithms. Discussions about the obtained results are in section 5 and last, the conclusion and perspectives of this study are presented in section 6.

Model and parameter dependency

Construction of the multibunch model

Our model is based on the assumption that one cell can be divided into elementary volumes that behave homogeneously and have their specific electrical properties. Those volumes are connected in parallel, as showed in Fig. 1.a. We assume that certain volumes, not necessarily spatially bounded, have close electrical properties when compared to each other. These volumes are thus grouped into a "bunch" that is considered homogeneous. By repeating this operation, the cell is discretized into n homogeneous parts having distinct electrical properties, see Fig. 1.b. The origin of those distinct electrical properties can be the position of the tab within the cell [START_REF] Zhao | Effect of tab design on large-format Li-ion cell performance[END_REF], the distance of active material to current collector, temperature gradient. The bunches have a local current I i but the same voltage: V cell . The sum of the local currents I i is the cell current: I cell . Let n be the number of bunches of our model, sorted in ascending order of resistance value. This idea of variation of electrical parameters within the cell is supported by the recent work of Park et al. [START_REF] Seong | Probing electrical degradation of cathode materials for lithium-ion batteries with nanoscale resolution[END_REF], who found that a resistance distribution is found by scanning the surface of an active material sample.

Each bunch is modelled using an electrical circuit. The proposed representation comes from the previous article from Damay et al. [START_REF] Damay | Thermal modeling of large prismatic LiFePO4/graphite battery. Coupled thermal and heat generation models for characterization and simulation[END_REF] in which the hypothesis made are the following:

-The double layer capacity can be neglected because of its fast dynamic and the fact that our tests are conducted at constant current during thirty to sixty minutes. We call "high frequency" resistance R HF , the sum of the so called ohmic resitance and the charge transfer one. -In order to reduce the computation time, the Warburg impedance representing the diffusion phenomenon is modelled by a single RC. More RC circuits can be added to better model the diffusion [START_REF] Kuhn | Modelling Ni-mH battery using Cauer and Foster structures[END_REF][START_REF] Andre | Characterization of high-power lithium-ion batteries by electrochemical impedance spectroscopy. II: Modelling[END_REF]. The subscript d under those elements stands for diffusion.

Those two hypotheses lead us to the multibunch dynamic model used in this paper, presented in Fig. 1 : one voltage source, one "high frequency" resistance and one parallel RC.

Parameters values, dependencies and number of bunches

The local voltage source values U(Q i ) varies with the local charge like an increasing and nonlinear function, following the open circuit voltage (OCV) of the cell. The bunch charge is defined by its previous state and the bunch current by

Q i,t = Q i,t-∆t + ∆t • I i,t-∆t (1)
To simplify our model, all the heterogeneity of the electrical properties is concentrated in the values of the R HF,i . We expect this parameter to be the most heterogeneous one in a cell due to variations in the impedance of the current collector, electrolyte and charge transfer. This heterogeneity is reprented with varying values of R HF from one bunch to another. The determination of the distribution of the R HF is done either by searching a mathematical distribution (a Weibull one), or by searching directly values fitting the experiments. Differences between both methods will be discussed later. Values of the distributed parameters at different temperature and current are computed as follow:

R HF,i = R HF,i (50%SoC, 1C, 25 °C) • β (I, T ) (2)
where β (I, T ) = R HF,meas (50%SoC,I,T ) R HF,meas (50%SoC,1C,25 • C) Because our model does not need a SoC dependency, we determine the electrical parameters values at only one SoC (50%),one current (1C) and temperature (25 °C). All the other values of the parameters are determined by multiplying the measured value with a coefficient that is extracted from dependencies lookup tables. The determination of the lookup tables for dependencies are detailed in the article Regarding the number of bunches, the higher they are, the more accurate the model is. Several number have been tested, and the optimal number found for a single cell seems to be the higher one. Because the computation time is roughly a first order function of the number of bunch, the chosen number here is a compromise between accuracy and computation time. The impact of n on accuracy and computation time can be found in Fig. 2. Other way of searching for the distribution gives similar results. For the following, we choose n=20.

3 Cell used and experiments

Cell characteristic and experimental setup

The cell used for this paper is a 40Ah LiFePO 4 -graphite cell. It is already aged and its actual capacity is around 37.9 Ah. The discharge current limit is 2C, the charge current limit is 1C, for a voltage varying between 2,5 and 3,7V. Regarding the temperature, the operating range is -15 to 50°C.

As the measured temperature will be used to compute the parameters values of all bunches, the cell needs to be the most homogeneous possible. Thus we chose to insulate the cell with a polyurethane box, as pictured in Fig. 3. This way, we consider the temperature to be the same in the surface or in the hearth of the battery.

The cell was surrounded by at least 8 cm of polyurethane on each side, except on the top where we used glass wool to be able to connect the cell. The connecting cables are also insulated with polyurethane foam. The whole setup was then placed into a climatic chamber to access the initials temperatures and connected to a Bio-Logic system.

Tests descriptions

The cell was discharged with an initial temperature of 10°C, 25°C and 38°C with a current of 1C and 2C for each temperature. The maximum temperature allowed by the constructor was hit during the 2C discharge with initial temperature of 38 °C, resulting in a half discharge only. The measured temperature was acquired using a thermocouple on the largest side of the cell, within polyurethane setup.

Simulation and optimization algorithms

Simulation of the cell

Once the dependency tables are established, the current and temperature curves acquired and the basic electrical parameters of the cell known, we only need to define the heterogeneity of our model. The flow chart of our coupled simulationoptimization algorithm is represented in Fig. 4.

The cell is modelled by an algorithm that uses as input the measured temperature and current during a discharge, the initial state of the cell and the distribution of the parameter R HF . The simulation algorithm has three steps.

-First the electrical parameters (resistances, capacities, time constants) are updated with regard to current and temperature; -Then, with regards to the previous local currents and the hypothesis that they remain constant during the time step dt, the local states of charge Q i and voltages U(Q i ) and the voltage across the RC element are computed; -Finally the new local currents and cell voltage are computed by solving a linear system using cell current, the locals OCV U(Q i ) and the voltages U Rd,i .

Fig. 4: flow chart of our algorithm

optimization algorithm and methods

In order to simplify the definition of the optimization function, we chose to use conductances instead of resistances. This is because the equivalent conductance of parallel bunches is simply the sum of the conductances. In the following of this article, we will still use the denomination R HF to avoid excessive vocabulary.

This section is dedicated to the determination of the R HF values, that are distributed among the bunches. To find the best set, we tried three methods:

an indirect determination using a Weibull distribution (WD); a direct determination using a free distribution initialized by a Weibull one (FD-WI); a direct determination using a free distribution initialized by a constant one (FD).

Using a WD was already done in a previous article [START_REF] Damay | Heterogeneous behavior modeling of a LiFePO 4 -graphite cell using an equivalent electrical circuit[END_REF]. In this article we propose on the one hand an optimization of the three Weibull parameters of the indirect determination and on the other hand the possibility to directly find the R HF values that were previously extracted from the WD. While the Weibull distribution is very adaptable mathematically speaking, it remains possible to miss an outsider in the resistances values. Using a free distribution allows us to be able to find those points, while increasing the number of parameters to the number of bunches n=20. In order to decrease the time needed, we imposed an ordered solution, meaning that an initial conductance G 1 is searched for and then the difference between G n and G n+1 (equation 3)

∀i, j ∈ [2, n], G i = G 1 + i ∑ j=2 ∆ G j (3) subject to ∀i ∈ [2, n], 0 ≤ ∆ G min ≤ ∆ G ≤ ∆ G max
The objective function for a free distribution is then:

min G i f e (t, I, T, G i ) = [U sim (t, I, T, G i ) -U meas (t)] (4)
where f e is the error vector for a given discharge.

5 Results and discussions

Quality of the solution

The aim of the optimization operation is to find a suitable set of conductances to model the cell. However, we also want to obtain a distribution that is physically meaningful. We found that a free distribution (FD) may lead to a less physical solution. An example of this can be found in Fig. 5 where the free set gives a distribution with a few equal subsequent values and one greater value at the end. This is not in accordance with our hypothesis of a regular distribution of conductances. A non-regular evolution is possible but is considered less likely because it doesn't suit our hypothesis of a continuum of electrical properties inside the cell. A free distribution initialized by a Weibull (FD-WI) distribution brings a better regularity among the set of resistances, as expected from the model construction. This accordance to our hypothesis can hardly be differentiated by a computer, thus this way of searching for conductances is the one we selected for future works. Moreover, a free set of resistances is a good way to detect damaged cell with a different signature within a larger pack. It allows our algorithm to findn h a set that includes outsider values that would not fit in a usual distribution. Thus this way of determining a set of conductances seems to be the most suitable method.

Model Robustness

By optimizing the parameter of a Weibull distribution for a single discharge, we obtained RMS error between 9.7 and 14.5 mV for each discharge. Despite the good results, we could not find a link between the multiple sets of optimised parameters of the Weibull law that would suggest a unique distribution to model this cell.

Our model aims to model the heterogeneity of the cell. The most heterogeneous discharge should be a low temperature -high current one. Thus we make the hypothesis that optimizing our resistance set over this discharge increases the distribution overall robustness. To verify that point, we simulated the farthest discharge in term of conditions, namely the hottest discharge with a low current, with our low temperature -high current set. The results are presented in Fig. We then tried to let the optimization function set the R HF values freely, again sor the low temperature -high current discharge. As for the WD, we present in Fig. 6 the simulation over the high temperature discharge and the low temperature one.

The simulation error over discharges is smaller when a FD-WI is used. Even if the difference is small, the possibility not to follow any law seems very interesting for us in order to better diagnose the degradation of the cell, as will be explained in section 6.

Conclusions and perspectives

In this paper we presented an electrical equivalent model to model the heterogeneity of a commercial LiFePO 4 -graphite cell. This model is based on a physical approach that takes into account various phenomena. The construction is based on the hypotheses that one cell can be divided into parts that have the same electrical properties, that we group into several bunches. They differ from another thanks to a set of "high frequency" resistances that regroup the charge transfer, the current collector, the electrolyte and the contact resistances.

The proposed model has been experimentally validated, and we showed that we were able to define a set of resistances that can model the cell in another operating point. Our hypothesis that a measured discharge at high current and low temperature allows us to simulate at best other operating condition was verified in our simulation and comparison to measurements. By finding a Weibull distribution and then exploring values around it, we are able to reduce the computation time and to find a more physical solution Regarding the set of R HF values, we expect to follow it through the cell life in order to obtain a non-invasive tool to characterize the degradation of the cell. If a part of the cell experience severe degradation, the shape of the set of conductances will be modified and we expect the new shape not to follow a natural distribution law. This would allow to smartly define periods of maintenance for the cells or change the cells usage to prevent them from severe degradations. This justify the choice of a free distribution, initialized by a Weibull one, that may detect abnormal variations of the resistance set.

We plan to apply this simulation method to other technologies of cells to further verify that we are able to simulate them over the whole operating range. In order to further increase the precision of our model, a more developed bunch model could be considered if the computational time remain acceptable.

Fig. 1 :

 1 Fig. 1: (a) Division of the cell in a high number of electrical isotropic volumes. With (1) negative current collector, (2) negative active material, (3) electrolyte, (4) positive active material, (5) positive current collector. (b) Model with grouped homogeneous volumes into bunches. (c) Multibunch model with n bunches.

Table 1 :

 1 Differences between a homogeneous equivalent electrical model and the multibunch model Parameter Homogeneous Multibunch by n OCV U(Q cell ) U(Q i ), i = [1..n] R HF R e (SOC, I, T ) + R HF,i (I, T ) R ct (SOC, I, T ) and distributed R d R d (SOC, I, T ) R d (SOC 50%, I, T ) • n C d C d (SOC, I, T ) C d (SOC 50%, I, T )/n

Fig. 2 :

 2 Fig. 2: Influence of the number of bunches to the precision and convergence time for Weibull Distribution.

Fig. 3 :

 3 Fig. 3: Experimental setup with the cell and polyurethane box inside the stove. Cable are insulated with polyurethane foam.

6

 6

Fig. 5 :

 5 Fig. 5: Difference in resistance values without and with a Weibull initialization for the free set of resistances and for the Weibull set at 1C and 25°C


Pierre-Louis Stenger

Jérémie Vidal-Dupiol

Céline Reisser

Serge Planes

Chin-Long Ky

Colour plasticity in the shells and pearls of animal graft model Pinctada margaritifera assessed by HSV colour quantification

the bivalve Pinctada margaritifera has the capacity to produce the most varied and colourful pearls in the world. Colour expression in the inner shell is under combined genetic and environmental control and is correlated with the colour of pearls produced when the same individual is used as a graft donor. one major limitation when studying colour phenotypes is grader subjectivity, which leads to inconsistent colour qualification and quantification. Through the use of HSV (Hue Saturation Value) colour space, we created an R package named 'ImaginR' to characterise inner shell colour variations in P. margaritifera. Using a machine-learning protocol with a training dataset, ImaginR was able to reassign individual oysters and pearls to predefined human-based phenotype categories. We then tested the package on samples obtained in an experiment testing the effects of donor conditioning depth on the colour of the donor inner shell and colour of the pearls harvested from recipients following grafting and 20 months of culture in situ. These analyses successfully detected donor shell colour modifications due to depthrelated plasticity and the maintenance of these modifications through to the harvested pearls. Besides its potential interest for standardization in the pearl industry, this new method is relevant to other research projects using biological models.

The marvellous diversity of colours among molluscan shells has been widely esteemed for hundreds of years by collectors and scientists [START_REF] Williams | Molluscan shell colour[END_REF] . Colour is a well-known naturally plastic trait that varies due to inter-individual genetic differences, crystalline structure of exoskeletons or appendages, variable diet or other environmental conditions [START_REF] Williams | Molluscan shell colour[END_REF][START_REF] Bradshaw | Evolutionary significance of phenotypic plasticity in plants[END_REF][START_REF] Moore | The Biology of Purpura Lapillus. I. Shell Variation in Relation to Environment[END_REF][START_REF] Manriquez | Adaptive shell color plasticity during the early ontogeny of an intertidal keystone snail[END_REF][START_REF] Kawaii | Shell-color polymorphism of intertidal gastropods in Chuuk State, Federated States of Micronesia[END_REF][START_REF] Ding | Transcriptome sequencing and characterization of Japanese scallop Patinopecten yessoensis from different shell color lines[END_REF] . Colour phenotype has been the centre of interest in many biological studies since it is involved in some evolutionary processes (natural selection for camouflage or defence, sexual selection for fitness in a partner, etc.) and can be exploited for industrial purposes (dyes, jewellery) [START_REF] Williams | Molluscan shell colour[END_REF][START_REF] Ramirez Boehme | New Chilean species of Lucapina, Fissurella and Collisella (Molusca: Archaeogastropoda)[END_REF][START_REF] Espoz | The lichen Thelidium litorale on shells of intertidal limpets: a case of lichen-mediated cryptic mimicry[END_REF][START_REF] Williams | Colorful seashells: Identification of haem pathway genes associated with the synthesis of porphyrin shell color in marine snails[END_REF][START_REF] Cuthill | The biology of color[END_REF] . For the pearl industry, this trait has been selected to create commercially specific strains such as golden Pacific oysters Magallana gigas (Thunberg, 1793) [START_REF] Ge | Mendelian inheritance of golden shell color in the Pacific oyster Crassostrea gigas[END_REF][START_REF] Feng | Comparative transcriptome analysis of the pacific oyster Crassostrea gigas characterized by shell colors: Identification of genetic bases potentially involved in pigmentation[END_REF][START_REF] Feng | Transcriptional profiling of long non-coding RNAs in mantle of Crassostrea gigas and their association with shell pigmentation[END_REF] , "ivory" strains of the Japanese scallop Patinopecten yessoensis (Jay, 1987) [START_REF] Ding | Transcriptome sequencing and characterization of Japanese scallop Patinopecten yessoensis from different shell color lines[END_REF][START_REF] Chang | Genetic diversity in five scallop populations of the Japanese scallop (Patinopecten yessoensis)[END_REF] and "gold" pearl production from the silver-or gold-lipped pearl oyster Pinctada maxima (Jameson, 1901) [START_REF] Evans | Development and characterization of six new microsatellite markers for the silver-or gold-lipped pearl oyster, Pinctada maxima (Pteriidae)[END_REF] . The black-lipped pearl oyster, Pinctada margaritifera (Linnaeus, 1758), is the top aquaculture species in French Polynesia. The species is cultivated for pearl production and the associated industry is the second greatest source of revenue for French Polynesia after tourism [START_REF] Ky | Growth Performance Comparison of Pinctada margaritifera Juveniles Produced by Thermal Shock or Gonad Scarification Spawning Procedures[END_REF] . P. margaritifera has the ability to produce cultured pearls with a very wide range of colours [START_REF] Blay | Influence of nacre deposition rate on cultured pearl grade and colour in the black-lipped pearl oyster Pinctada margaritifera using farmed donor families[END_REF][START_REF] Ky | Is pearl colour produced from Pinctada margaritifera predictable through shell phenotypes and rearing environments selections?[END_REF] , derived from the donor oysters used to provide grafting tissue [START_REF] Ky | Age-dependence of cultured pearl grade and colour in the black-lipped pearl oyster Pinctada margaritifera[END_REF][START_REF] Ky | Family effect on cultured pearl quality in black-lipped pearl oyster Pinctada margaritifera and insights for genetic improvement[END_REF][START_REF] Ky | Mono-and polychromatic inner shell phenotype diversity in Pinctada margaritifera donor pearl oysters and its relation with cultured pearl colour[END_REF][START_REF] Ky | Impact of spat shell colour selection in hatchery-produced Pinctada margaritifera on cultured pearl colour[END_REF] . The pearl production process depends upon a grafting operation requiring a donor pearl oyster, a recipient pearl oyster and a skilled technician to perform the surgery [START_REF] Ky | Influence of grafter skill and season on cultured pearl shape, circles and rejects in Pinctada margaritifera aquaculture in Mangareva lagoon[END_REF] . A piece of tissue from the edge of the mantle of a donor oyster (the "saibo", also known as the graft), selected based on the quality of the donor's shell colour, is inserted together with a nucleus (made of mollusc shell or synthetic material) into a recipient oyster chosen for its vigor [START_REF] Ky | Influence of grafter skill and season on cultured pearl shape, circles and rejects in Pinctada margaritifera aquaculture in Mangareva lagoon[END_REF][START_REF] Haws | The basic methods of pearl farming: a layman's manual[END_REF] . The external shell of P. margaritifera is commonly black, sometimes with white dotted lines arranged in lateral bands. However, some individuals are red in colour over the entire surface of their shells [START_REF] Ky | Is pearl colour produced from Pinctada margaritifera predictable through shell phenotypes and rearing environments selections?[END_REF] , while others are yellow just at the base of the external shell surface. A very rare white albino shell morphotype (named "pupure") also exists [START_REF] Ky | The Mendelian inheritance of rare flesh and shell colour variants in the black-lipped pearl oyster (Pinctada margaritifera)[END_REF] . The inner side of the shell has a larger colour gamut, ranging from red to yellow, green to blue or peacock to white, with all possible intermediate nuances [START_REF] Ky | Mono-and polychromatic inner shell phenotype diversity in Pinctada margaritifera donor pearl oysters and its relation with cultured pearl colour[END_REF][START_REF] Ky | Phenome of pearl quality traits in the mollusc transplant model Pinctada margaritifera[END_REF] . Pigments are primarily visible on the peripheral parts of the shell [START_REF] Cuif | Evidence of a Biological Control over Origin, Growth and End of the Calcite Prisms in the Shells of Pinctada margaritifera (Pelecypod, Pterioidea)[END_REF] . Indeed, because the nacreous layer covers the prismatic layer, this may make the pigments opaque [START_REF] Cuif | Evidence of a Biological Control over Origin, Growth and End of the Calcite Prisms in the Shells of Pinctada margaritifera (Pelecypod, Pterioidea)[END_REF][START_REF] Dauphin | Structure and composition of the nacre-prisms transition in the shell of Pinctada margaritifera (Mollusca, Bivalvia)[END_REF][START_REF] Marie | Different secretory repertoires control the biomineralization processes of prism and nacre deposition of the pearl oyster shell[END_REF] . According to Ky et al. [START_REF] Ky | Age-dependence of cultured pearl grade and colour in the black-lipped pearl oyster Pinctada margaritifera[END_REF] , the factors contributing to the colour of a pearl include the phenotype of the donor oyster (partial genetic inheritance), geographical location, and the environmental conditions in which the recipient oyster is reared during pearl development [START_REF] Snow | The origin of the color of pearls in iridescence from nano-composite structures of the nacre[END_REF] .

The assessment of colour nonetheless remains a subjective trait in which human quantification and qualification can be strongly biased, as visual perception of colours differs between individuals [START_REF] Kuriki | The modern Japanese color lexicon[END_REF] . For this reason, efforts are currently being made to develop accurate and reproducible computational methods for automatic objective colour qualification and quantification [START_REF] Cuthill | The biology of color[END_REF] . In this study, based our approach on the HSV (Hue Saturation Value) colour space to characterize the colour variation in our biological model (Fig. 1).

The objective of the present study is the qualification and quantification of colour with a new standardized and reproducible method. We used HSV colour space to characterise colour variation in the inner shell of black-lipped oysters and pearls produced by the pearl industry. Finally, to enable a wider use of this method in scientific and private programmes, we developed an R package, ImaginR 32 and made this publicly available.

Results

shell and pearl materials issued from an experimental graft. To validate our newly developed method for qualifying and quantifying colours, we first used material issued from a basic experimental graft on which we assessed the colour of donors and of pearls produced with the grafts of these donors. For this graft, the mantle (the biomineralizing tissue) from each of the donors selected for their colours was cut into 30 pieces, which were then grafted into the gonads of 30 recipient oysters in order to produce pearls.

Colours were then analysed in a total of 669 pearls issued from grafts made with two donor colour phenotypes (green and red) and cultured at two depths (4 or 30 m) to create a baseline for measuring colour determination stability using the new colour assessment method. The average nucleus retention rate of the experimental graft was 93.0% (N = 749) at 42 days post-grafting. After 20 months of culture, pearls were successfully harvested from 89.9% of the individuals initially grafted (N = 669). The difference (3.1%) corresponded to nucleus rejection after day 42, and oyster mortalities. The numbers of pearls harvested per donor colour class and per depth group were: 363 pearls formed by grafts from the green donor phenotype (197 for the group at 4 m and 166 for the group at 30 m) and 306 pearls formed by grafts from the red donor phenotype (143 for the group at 4 m and 163 for the group at 30 m).

Hue values for inner shells and cultured pearls. The hue distributions for the shell phenotypes and rearing conditions revealed four dominant hues for green donors reared at 4 m depth (GS) (0.500; 0.555; 0.444; 0.4166), three for green donors reared at 30 m (GD) (0.500; 0.583; 0.416), three for red donors reared at 4 m (RS) (0.000; 0.066; 0.100) and three for red donors reared at 30 m (RD) (0.000; 0.055; 0.04) (Fig. 2a).

Figure 1.

The Hue Saturation Value (HSV) colour code system used to quantify colour in Pinctada margaritifera shells and cultured pearls. For a determined hue (H), saturation (S) range (from 0, white, to 1), and brightness (V) range (from 0, black, to 1) were measured, as illustrated here by red pearl samples, with HSV values shown in brackets. Red and green pearl samples are illustrated above the conical representation of the HSV system.

Overall, 138 different hues were found among the 363 pearls produced with grafts from green donors and 185 hues for the 306 pearls produced with grafts from red donors (Table 1). Some of the pearls produced with grafts from green donors reared at 4 m (PGDS) and 30 m (PGDD) shared the same hues, as the diversity index (ratio of the hue number and pearl number) for PGD total (0.38) was lower than both the PGDS (0.43) and PGDD (0.59) diversity indices. The hue diversity index was greater for the red phenotype (0.60 in total) than the green, even though the red donor phenotype also shared hues between pearls from grafts of the donors conditioned at 4 m (PRDS) (0.72) and pearls from grafts of the donors conditioned at 30 m (PRDD) (0.69) (Table 1). Statistically, we observed more green pearls from the grafts of green donors when these donors had been reared at 4 m than at 30 m (67% at 4 m and 39.6% at 30 m, Chi 2 test p < 0.001) (Table 1). However we observed the opposite phenomenon for the red phenotype. Indeed, we observed more red pearls from the graft of red donors when these had been reared at 30 m than at 4 m (58.7% at 4 m and 72.4% at 30 m, Chi 2 test p < 0.05) (Table 1). Among the pearls produced with grafts from donors grown at 4 m, there were more green pearls from the green donor grafts (67%) than red pearls from the red donor grafts (58.7%). At 30 m, the opposite phenomenon was shown, with more red pearls from the red donor grafts (72.4%) than green pearls from the green donor grafts (39.6%) (Chi 2 test p < 0.001). When the pearls from the two depths were considered together, the same pattern was found overall, 1. Number of pearls and pearl hues categorized by phenotype and culture treatment. The percentages (line number 4) represent the proportion of pearls with same colour phenotype as their donors. Comparisons of this rate were all significant: 1) between conditioning depth (4 m vs. 30 m), within green (p < 0.001) and red donors (p < 0.05); and 2) between green and red donors for the 30 m conditioning depth (p < 0.001) and for both depths together (p < 0.005). All p-values were obtained from Pearson's Chi-squared test with Yates continuity correction test. The diversity index was obtained by calculating the ratio of the number of hues to the number of pearls.

with again more red pearls from red donors than green pearls from green ones (65.55% for red and 53.3% for green; Chi 2 test p < 0.005; Table 1).

the analysis of saturation for inner shell colour and cultured pearls. The distributions of donor inner shell colour shifted closer towards low saturation for the 30 m depth group than for the 4 m group (Fig. 3a). When all cultured pearls were considered, samples from both green (p < 0.05) and red (p < 0.05) donors showed a significant shift of saturation towards lower levels following deep conditioning (30 m) compared with sub-surface (4 m) conditioning (Fig. 3b).

When only red pearls from grafts of red donors and green pearls from grafts of green donors were considered, the saturation distribution also significantly shifted towards lower saturation, with greater depth for RPRD only (p < 0.005 and p = 0.2364, respectively). These results are similar when all cultured pearls were considered, but the differences between the depths were 140.8 times stronger for the red phenotype (Fig. 3c). In terms of saturation, the inner shell colour therefore became less intense and less bright with depth.

Brightness (V) of donor oyster inner shells and cultured pearls.

Regarding the inner shell colour, the brightness (V) of the distributions shifted to higher levels in the samples conditioned at 30 m depth compared with those conditioned at 4 m depth (Fig. 4a). When all cultured pearls were considered, samples from both green (p < 0.001) and red (p = 0.014) donors had a significant shift to higher values of V following the deeper conditioning (30 m) compared with sub-surface (4 m) (Fig. 4b).

When red pearls from grafts of red donors (p < 0.005) and green pearls from grafts of green donors (p = 0.3682) were considered separately, the distribution of V values shifted significantly to greater darkness with depth, but this difference was not significant for the green pearls (Fig. 4c). The differences between the depths were 5.07 times greater for the red phenotype considered alone. In terms of darkness, the inner shell colour became more grey, dull and drab at greater conditioning depth.

Discussion

Our R package, based on image analysis with HSV colour space and machine-learning approaches, validated the method used through the analysis of the influence of depth on the colour of two economically important pearl donor phenotypes: the green and the red inner shell phenotypes. Our results show that (i) the R package successfully categorized the pearl phenotypes used in this study, that (ii) cultivation environment of the donor oysters (here depth) heavily influences the brightness V and the saturation S of the colour, and (iii) that the colour variation related to depth was transmitted from donors to pearls. The ImaginR package is thus suitable for indicating colour variations in oysters and could now be used in other biological models of animal or plant origin. The package was deposited in CRAN under the name ImaginR V2.0 (https://cran.r-project.org/web/packages/ ImaginR/index.html) [START_REF] Stenger | Package ImaginR[END_REF] . We developed this tool in the form of an R package to reduce the subjectivity in quantifying and qualifying colour in the pearl oyster P. margaritifera. Marchais et al. [START_REF] Marchais | New tool to elucidate the diet of the ormer Haliotis tuberculata (L.): Digital shell color analysis[END_REF] were the first to develop a new method based on digital colour analysis, using HSL colour space, to highlight the link between shell colour and algal pigments under experimental conditions. However, the HSL colour space has an unfortunate interaction between brightness and saturation during image processing [START_REF] Poynton | Frequently asked questions about colour[END_REF] . Thus, for a maximum lightness value, with HSL, the saturation always gives white data, while this problem does not arise with HSV colour space [START_REF] Poynton | Frequently asked questions about colour[END_REF] , which gives values closer to human vision [START_REF] Vezhnevets | A Survey on Pixel-Based Skin Color Detection Techniques[END_REF][START_REF] Fairchild | Color appearance models[END_REF] . Trinkler et al. [START_REF] Trinkler | Colour or no colour in the juvenile shell of the black lip pearl oyster, Pinctada margaritifera?[END_REF] already attempted to measure and quantify colour in juvenile P. margaritifera with an International Commission on illumination (ISI) chromaticity diagram, but did not find any differences of colour trend in the shells. We therefore decided to create our own R package adapted to our biological model (P. maragaritifera), using HSV colour space. To our knowledge, there is no other free software with these characteristics.

Interestingly, we observed that the differences induced by depth in the red donor phenotype were higher overall than those in the green phenotype. This could provide some first clues on how colour is genetically controlled in P. margaritifera. Indeed, we could hypothesize that by being more "stable" in terms of colouration change, the green phenotype could be controlled by more genes than the red phenotype. Multifactorial genetic control of a trait is often synonymous with a continuous phenotype, in which variations might be more subtle [START_REF] Boyle | Multifactorial genetic models for quantitative traits in humans[END_REF][START_REF] Bonney | On the statistical determination of major gene mechanisms in continuous human traits: Regressive models[END_REF] . This could mean that the molecular pathways leading to the expression of the colour of these two phenotypes differ. It would be interesting to work towards a better understanding of the molecular control of expression of the colour phenotypes of P. margaritifera, to see if our suppositions are correct.

The effects of depth on the colouration of marine animals have been little described so far, but there are nonetheless some reports [START_REF] Chandrapavan | Colour variation in the southern rock lobster Jasus edwardsii and its economic impact on the commercial industry[END_REF][START_REF] Southgate | The pearl oyster[END_REF][START_REF] Gervis | The biology and culture of pearl oysters (Bivalvia pteriidae)[END_REF] . Change in colour correlated with depth can be explained by many other environmental factors linked to depth, such as diet composition [START_REF] Chandrapavan | Colour variation in the southern rock lobster Jasus edwardsii and its economic impact on the commercial industry[END_REF][START_REF] Joubert | Temperature and food influence shell growth and mantle gene expression of shell matrix proteins in the pearl oyster Pinctada margaritifera[END_REF] , temperature [START_REF] Pouvreau | Etude et modélisation des mécanismes impliqués dans la croissance de l'huître perlière, Pinctada margaritifera, au sein de l' écosystème conchylicole du lagon de l'atoll de Takapoto[END_REF] , light levels [START_REF] Gervis | The biology and culture of pearl oysters (Bivalvia pteriidae)[END_REF] , or even pressure [START_REF] Rousseau | Influence of the Depth on the Shape and Thickness of Nacre Tablets of Pinctada margaritifera Pearl Oyster, and on Oxygen Isotopic Composition[END_REF] , which complicates its study. Southgate & Lucas 41 report absolutely no influence of hydrostatic pressure on P. margaritifera, but other environmental parameters associated with depth are known to have significant influences. Light decreases with depth and, according to Gervis and Sims [START_REF] Gervis | The biology and culture of pearl oysters (Bivalvia pteriidae)[END_REF] , so does pearl quality and colour. Indeed, Pinctada fucata martensii (Gould, 1850) produces high quality pinkish pearls below 5 metres, but nacre deposition is maximized under blue light like that found in deeper water. Food intake can also influence nacre deposition. Indeed, according to Joubert et al. [START_REF] Joubert | Temperature and food influence shell growth and mantle gene expression of shell matrix proteins in the pearl oyster Pinctada margaritifera[END_REF] , when trophic levels are high (microalgal concentration), there is a decrease in aragonite tablet thickness, but a strong increase in the speed of nacreous deposit. However, Latchère et al. [START_REF] Latchere | Influence of preoperative food and temperature conditions on pearl biogenesis in Pinctada margaritifera[END_REF] demonstrated that food level had no effects on quality traits of P. margaritifera mineralization. It is also well known that water temperature strongly influences bivalve metabolism and physiological processes [START_REF] Brown | Influences of temperature, salinity and available food upon suspended culture of the Pacific oyster, Crassostrea gigas. I. Absolute and allometric growth[END_REF][START_REF] Kanazawa | Environmental and physiological controls on shell microgrowth pattern of Ruditapes philippinarum (Bivalvia: Veneridae) from Japan[END_REF][START_REF] Thébault | Growth of Argopecten purpuratus (Mollusca: Bivalvia) on a natural bank in Northern Chile: sclerochronological record and environmental controls[END_REF] . Indeed, temperature influences the relative expression of genes involved in biomineralization [START_REF] Joubert | Temperature and food influence shell growth and mantle gene expression of shell matrix proteins in the pearl oyster Pinctada margaritifera[END_REF][START_REF] Latchere | Influence of preoperative food and temperature conditions on pearl biogenesis in Pinctada margaritifera[END_REF] . So there can me multiple environmental reasons for such changes. Furthermore, Rousseau & Rollion-Bard [START_REF] Rousseau | Influence of the Depth on the Shape and Thickness of Nacre Tablets of Pinctada margaritifera Pearl Oyster, and on Oxygen Isotopic Composition[END_REF] found variation in the shape of nacre tablets as a function of depth, in relation to the shell growth direction. The shape of the tablets changed from hexagonal to rhomboid at a depth of 39 m. With this modification in shape, the tablets become larger, but also thinner, so that the new pigments laid down are more visible by transparency. According to these authors, the iridescent colours are affected by the thickness of the layers. Pigment concentration also depends on their final location in the shell layers [START_REF] Joubert | Temperature and food influence shell growth and mantle gene expression of shell matrix proteins in the pearl oyster Pinctada margaritifera[END_REF][START_REF] Latchere | Influence of preoperative food and temperature conditions on pearl biogenesis in Pinctada margaritifera[END_REF] . The shell of the black-lipped pearl oyster has four layers, from exterior to interior: (i) the periostracum, (ii) the prismatic layer, (iii) the fibrous layer, and (iv) the nacreous layer [START_REF] Dauphin | Structure and composition of the nacre-prisms transition in the shell of Pinctada margaritifera (Mollusca, Bivalvia)[END_REF][START_REF] Farre | Shell layers of the black-lip pearl oyster Pinctada margaritifera: Matching microstructure and composition[END_REF] . These layers show progressive changes in their crystalline structure and associated organic matrix structure [START_REF] Dauphin | Structure and composition of the nacre-prisms transition in the shell of Pinctada margaritifera (Mollusca, Bivalvia)[END_REF] . The precise location, kinds of pigments and the relative quantities of these pigments in each of these different layers are not yet well known.

Our results indicate that depth can change the expression of colour and it was already well known that the environment can influence the expression of biomineralizing genes [START_REF] Joubert | Temperature and food influence shell growth and mantle gene expression of shell matrix proteins in the pearl oyster Pinctada margaritifera[END_REF][START_REF] Latchere | Influence of preoperative food and temperature conditions on pearl biogenesis in Pinctada margaritifera[END_REF] . We hypothesize that a thickness gradient of the aragonite layer could explain why colour pigmentation only appears at the top of the inner shell. Indeed, a dorso-ventral section of a valve of P. margaritifera shows that the nacreous layer is thinner closer to the ventral side than to the dorsal side [START_REF] Joubert | Temperature and food influence shell growth and mantle gene expression of shell matrix proteins in the pearl oyster Pinctada margaritifera[END_REF] a phenomenon that would enable the pigments to be more visible here due to higher transparency in this part of the shell. As the aragonite tablets elongate faster with depth [START_REF] Rousseau | Influence of the Depth on the Shape and Thickness of Nacre Tablets of Pinctada margaritifera Pearl Oyster, and on Oxygen Isotopic Composition[END_REF] , this layer could therefore act to slightly darken the pigments at the top of the inner shell.

Donor oysters conditioned at 30 m depth were used as donors to produce pearls, as were counterparts conditioned at 4 m. Interestingly, the pearls produced and harvested 20 months after grafting displayed colour variations corresponding to those expressed by the donors. The maintenance of this phenotype expression by the donor tissues suggests epigenetic regulation of the colour intensity. Indeed, environmental changes can modify individual phenotypes [START_REF] Jaenisch | Epigenetic regulation of gene expression: How the genome integrates intrinsic and environmental signals[END_REF][START_REF] Feil | Epigenetics and the environment: Emerging patterns and implications[END_REF] and such modifications can persist in a transplanted organ grafted into another individual [START_REF] Hagmann | Epigenetics and transplantation: clinical applications of chromatin regulation[END_REF][START_REF] Mccaughan | Epigenetics: Time to translate into transplantation[END_REF] . So the graft has a memory, but we do not yet know how reversible this (memory of these modifications) is and over how much time. It would be interesting to study this level of regulation in the expression of colour in P. margaritifera.

Our results on the impact of depth on the colour of P. margaritifera, although they do not provide a description of the mechanisms, is of great importance for the Polynesian pearl industry that is still recovering from the 2008 crisis, when pearl price per gram plummeted. To ensure a sustainable future for the industry, there is a growing interest in producing fewer pearls, of better quality [START_REF] Ky | Influence of grafter skill and season on cultured pearl shape, circles and rejects in Pinctada margaritifera aquaculture in Mangareva lagoon[END_REF] , particularly pearls of more contrasting colours. Indeed, pearls presenting a colour with high saturation and less darkness are of great value on most markets. However, in past years, spat collection has become increasingly unreliable, and problems such as vandalism (or theft of grafted and non-grafted oysters in marine concession areas) have increased. In addition, the increase in the length and number of exceptionally warm climatic conditions (lagoon surface waters over 30 °C) has forced producers to install their lines at 30 m depth to avoid theft, or mortality due to high temperatures. In the light of our findings this could be problematic if non-grafted oysters stocked at 30 meters were subsequently used as donors. Indeed, we showed that the inner shell colour and associated pearls from donors that had spent one month at 30 m depth were darker and duller than those from source-cultivated oysters, despite the fact that, during the post-graft culture period, the recipient oysters were cultured at 4 m depth for 20 months. It would be interesting to do other similar experiments, but with more depths tested (e.g. 4 m, 10 m, 20 m and 30 m) in order to see the behaviour of colour expression variation at these different depths.

Our exploration of colour plasticity in response to an environmental difference was made with a new tool using HSV colour space. The emergence of this type of analysis could be useful not only for the pearl industry, but also in other domains and for other biological models. This method was not only able to confirm and characterize variation in the colouration of black-lipped pearl oysters but also the persistence of this phenotypic difference in pearls harvested 20 months after exposure.

Materials and Methods

An experimental graft was performed in 2013 with two colour phenotypes of P. margaritifera donors (red and green) reared at 4 and 30 m depth. Visually, colour differences were observed in both green and red donors between the two depth groups. These four groups were used as donors in an experimental graft. After harvesting, colour differences were again found visually in the different groups of pearls. We decided to analyse these variations using a suitable colour space in an automated manner.

Animal conditioning and experimental graft. Two P. margaritifera phenotypes, with either a green or a red inner shell, were selected as donors for an experimental graft (Fig. 5). The green individuals originated from Mangareva Island lagoon (Gambier archipelago, French Polynesia) and the red phenotype came from the Takaroa atoll (Tuamotu archipelago, French Polynesia). The red oysters were transferred by plane to Mangareva one month before grafting to allow acclimation. After a month, future donors of each phenotype were separated into two groups. One group was then reared at 4 m depth (N = 9 for green; N = 5 for red) and the other at 30 m depth (N = 6 for green; N = 7 for red) for one additional month in order to obtain a colour change (final donors). After the second month, the oysters were collected and used in the experimental graft operation. P. margaritifera of about two years were used to serve as recipients were collected as spat in the Mangareva Island lagoon (Gambier Archipelago, French Polynesia). Passive spat catching techniques were used with commercial collectors.

The experimental graft using these donors was performed in Regahiga Pearl Farm (Gambier archipelago, French Polynesia) in December 2013 (Fig. 5). For this graft, the mantle (the biomineralizing tissue) from donors selected for their colours (i.e. red and green) were cut into 30 small pieces known as "saibo". These pieces of Figure 5. Experimental design of the experimental Pinctada margaritifera grafting procedure using two donor oyster phenotypes, green and red. Each phenotype was conditioned for one month prior to the graft operation, either in subsurface (4 m) or deep culture (30 m). The commercial zone (C.Z.), indicated by the dotted lines, is the section of the donor mantle from which grafts are usually cut. Thirty grafts were made from each donor. A check for nucleus retention was made 42 days post-graft and the pearls were harvested 20 months post-graft. Numbers in brackets correspond to the frequencies of donors, recipients or pearls. mantle were grafted into 30 recipient oysters together with a nucleus (nucleus weight: 0.2337 g; nucleus diameter: 0.56425 mm). Cells of the "saibo" (from the donor) produce nacre that builds up on the nucleus to form a pearl in the recipient oyster. Recipient and donor oysters measured approximately 12 cm in height from the bottom to the top of their shells. The shells of the donor oysters were kept for chromatic analysis.

All recipient oysters were individually labelled (with numbered colour coded plastic labels) so as to maintain traceability between donor identity, and corresponding harvested pearls. All the grafted recipient oysters were then cultured at 4 m depth. As is normal aquaculture practice, the oysters were regularly cleaned in order to remove biofouling (epibiota), which can hinder healthy oyster growth and pearl production. After 42 days, nucleus retention was checked. Finally, the pearls were harvested 20 months later and cleaned by ultrasonication in soapy water with a LEO 801 laboratory cleaner (2-L capacity, 80 W, 46 kHz). They were then rinsed with distilled water and assessed by chromatic analysis.

Choice of colour space. According to Vezhnevets et al. [START_REF] Vezhnevets | A Survey on Pixel-Based Skin Color Detection Techniques[END_REF] , when developing a project that uses colour as the main feature of interest, one usually faces three main issues: the choice of the relevant colour space for the project, the means to obtain and model a colour distribution for your biological model, and the choice of how to process the colour segmentation results in order to obtain a valid and reproducible characterization and quantification of the colour. To reduce the subjectivity of this trait, different colour spaces can be used [START_REF] Clydesdale | Colorimetry -methodology and applications[END_REF][START_REF] Hunter | The measurement of appearance[END_REF] to shift from qualitative to quantitative data. Among colour space landscapes, the HSL space (Hue Saturation Lightness) is beginning to be used in the biological sciences because it can provide a solution by describing colour components separately [START_REF] Marchais | New tool to elucidate the diet of the ormer Haliotis tuberculata (L.): Digital shell color analysis[END_REF] . HSV is a colour space similar to HSL and both are used as a convenient way to represent the colour variation. HSL and HSV are both conical geometries, with hue (H) describing the colour spectrum on a chromatic wheel. However, saturation (S) is calculated differently between these two spaces (with a possible conversion between the two values) and lightness (L) and value (V) (referred to here as "brightness" for clearer understanding) represent different aspects of colour. Fairchild [START_REF] Fairchild | Color appearance models[END_REF] describes brightness (V) as the perception of the amount of light, and the lightness (L) as the perception of the amount of white. V and L are both given in percentages or in [0-1] format. The intuitiveness of this two-colour space and the explicit discrimination between S and L or S and V properties have made these approaches popular in studies on colour segmentation [START_REF] Vezhnevets | A Survey on Pixel-Based Skin Color Detection Techniques[END_REF] . However, these colour spaces are not perfect. The HSL space, for instance, has an unfortunate interaction between brightness and saturation during image processing. Indeed, for a maximum lightness value, the saturation always gives white data, while this problem does not appear with HSV colour space, which gives a value closer to human vision [START_REF] Poynton | Frequently asked questions about colour[END_REF] . We therefore chose the HSV space to analyse shell and pearl chromatic variations resulting from environmental pressure.

Chromatic analysis of shells and pearls.

The shells of the donor oysters and harvested pearls were cleaned, conserved and protected from light. The pearls were put in boxes that classified them by their donor oysters. Both the donors and the boxed pearls were photographed with a Canon ® PowerShot G9, with a maximal resolution of 12.1 megapixels and using the same parameters for each picture. Images were taken into a Packshot Creator ™ (v. 3.0.3.8) to prevent dark shadows and light reflection. The pictures of the donor's inner shells were clipped to extract the peripheral coloured zone, which was pasted onto a white background. Similarly, the backgrounds of the pearl pictures were clipped to retain only the coloured sphere and these were pasted onto a white background. We selected one side of each pearl (at random) to be photographed and used this to represent the colour of the pearl. To select the colour area, the free GNU Image Manipulation Program (version 2.8.22) was used (selection with lasso, copy, paste like image, export as.jpeg). R software v 3.2.3 (R foundation for Statistical Computing) was used to develop and run an image analysis package, which we named ImaginR. For the remainder of the analysis, the working directory is set and the folder containing all the pictures is placed inside it. After loading the ImaginR (V2) package, the only function needed to run the analysis is called OutPutResult(). Simply by typing OutPutResult(), R will then recognize the picture folder and automatically perform the analysis. ImaginR will import all pictures with the.jpeg extension and list the file names into an R object. Thus, the picture's name (which corresponds to one sample) is stocked into this object. The analysis will therefore be made on a picture-by-picture basis. The picture is imported through the load.image() function of the ImaginR package [START_REF] Simon | [END_REF] . Then, each pixel is given an RGB (Red Green Blue channels) coding, which will be converted into hex triplet code (all conversions are realized with the grDevices package [START_REF] Core | grDevices package[END_REF] ) and compared to a white hex triplet database. The white hex triplet values of the pictures are thus deleted in order to remove any information derived from the background of the picture. The remaining pixels are converted back into an RGB matrix, and an average is calculated for each channel (R, G and B). The average colour of the chromatic zone of each sample is then obtained. The hex triplet code is also calculated from this average. The average RGB is converted into HSV code with the rgb2hsv() function from the grDevices package. Thus, for each image, the hue (H), saturation (S) and brightness (V) provide a synthesis of the colour status. The hue variable is compared to a reference hue range that delimits colours to classify the sample into a known phenotype. The reference hue range was delimited with a machine learning procedure using pictures of individuals with the coloured peripheral zones of the two valves extracted as described above. These ImaginR database individuals were obtained from a colour breeding selection programme at SCA Regahiga Pearls (Mangareva island, Gambier archipelago, French Polynesia). Approximately 200 individuals of each colour phenotype with a size between 10 and 12 cm were produced. Among these, five individuals per colour phenotype group were selected for their particularly colourful phenotypes and according to colour characteristics sought by pearl farmers. These five individuals per phenotype were then used for the machine learning in order to delimit the phenotype by hue. Following this approach, the hue range for the red phenotype ranged from 0 to 0.1625770; and the hue range for the green phenotype ranged from 0.3215928 to 0.5637775. Finally, the ImaginR package provided the hue (H), saturation (S), brightness (V), average hex triplet code and interpreted colour phenotype of each sample ("green", "red" or "other") based on the machine learning of that hue. In the procedure, this task is looped over all the samples/pictures in the folder, and the package produces a final tabular file summarizing all the information detailed above, along with the name of the sample. The text file is saved in. csv format. For subsequent statistical analysis, the grouping of the harvested pearl dataset was made in two ways: (i) all the pearls were grouped according to the colour of the donor colour inner shell phenotype characterized in ImaginR (since the trait is only partially genetically inherited, pearls with different colour phenotypes were pooled into the same category); (ii) only the green pearls from green donors and red pearls from red donors were analysed. statistical analysis. For the experimental study, we performed several pairwise comparisons to answer two main biological questions: (i) For each colour phenotype, is there a significant difference between the colour of the shells of the donor oysters cultivated at 4 m versus 30 m depth? and (ii) For each phenotype, is there a colour difference between the pearls coming from donors cultivated at 4 m, versus 30 m? A Shapiro test (stats v3.5.0 R package) was used to check the normal distribution of the data. To test for the presence of a difference in the brightness and saturation between groups, we used a Wilcoxon test (stats v3.5.0 R package based on Hollander and Wolfe [START_REF] Hollander | The one-way layout[END_REF] and Patrick Royston [START_REF] Royston | Remark AS R94: A remark on algorithm AS 181: The W-test for normality[END_REF] ) and a confidence interval based on Bauer [START_REF] Bauer | Constructing confidence sets using rank statistics[END_REF] . Chi 2 tests were performed (stats v3.5.0 R package) on the number of green (or red) pearls obtained from green (or red) oyster donors by donor rearing depth divided by the total number of pearls by rearing depth so as to see which colour phenotype had produced the most pearls of the same colour.

Figure 2 .

 2 Figure 2. Hue density plot distribution of P. margaritifera for: (a) donor oyster shells from: GS (green donors reared at 4 m; N = 9), GD (green donors reared at 30 m; N = 6); RS (red donors reared at 4 m; N = 5), and RD (red donors reared at 30 m; N = 7), (b) cultured pearls associated with the donors illustrated in (a), with GPGS (green pearls from green donors reared at 4 m; N = 132), GPGD (green pearls from green donors reared at 30 m; N = 66), RPRS (red pearls from red donors reared at 4 m; N = 84) and RPRD (red pearls from red donors reared at 30 m; N = 118). Light green (or red) and dark green (or red) distributions correspond to donor conditioning in subsurface (4 m) or deep (30 m) culture, respectively, prior to graft operations.

Figure 3 .

 3 Figure 3. Saturation density plot distribution of P. margaritifera for: (a) shells of donor oysters from: GS (green donors reared at 4 m; N = 9), GD (green donors reared at depth of 30 m; N = 6), RS (red donors reared at 4 m; N = 5), and RD (red donors reared at 30 m; N = 7), (b) multicoloured cultured pearls associated with the donors in (a), with PGDS (pearls from green donors reared at 4 m; N = 197) and PGDD (pearls from green donors reared at 30 m; N = 166); PRDS (pearls from red donors reared at 4 m; N = 143) and PRDD (pearls from red donors reared at 30 m; N = 163), (c) associated cultured pearls that show the same colour hue as their corresponding donors, GPGS (green pearls from green donors reared at 4 m; N = 132), GPGD (green pearls from green donors reared at 30 m; N = 66), RPRS (red pearls from red donors reared at 4 m; N = 84), and RPRD (red pearls from red donors reared at 30 m; N = 118). Light green (or red) and dark green (or red) distributions correspond to donor conditioning in subsurface (4 m) or deep (30 m) culture, respectively, prior to graft operations.

Figure 4 .

 4 Figure 4. Brightness density plot distribution of P. margaritifera for: (a) shells of donor oysters from GS (green donors reared at 4 m; N = 9), GD (green donors reared at 30 m; N = 6), RS (red donors reared at 4 m; N = 5), and RD (red donors reared at 30 m; N = 7), (b) associated cultured pearls that can have different colours, PGDS (pearls from green donors reared at 4 m; N = 197), PGDD (pearls from green donors reared at 30 m; N = 166), PRD4 (pearls from red donors reared at 4 m; N = 143), and PPDD (pearls from red donors reared at 30 m; N = 163), and (c) associated cultured pearls that have the same colour hue as their donors, GPGS (green pearls from green donors reared at 4 m; N = 132), GPGD (green pearls from green donors reared at 30 m; N = 66), RPRS (red pearls from red donors reared at 4 m; N = 84), and RPRD (red pearls from red donors reared at 30 m; N = 118). Light green (or red) and dark green (or red) distributions correspond respectively to donor conditioning in subsurface (4 m depth) or depth culture (30 m depth), prior to graft operations.

Donor conditioning depth Green donors Red donors 4 m 30 m Total 4 m 30 m Total

	Number of pearls	197	166	363	143	163	306
	Number of green (or red) pearls from green (or red) donors	132	66	198	84	118	202
	Rate (%) of green (or red) pearls from green (or red) donors	67.0	39.6	53.3	58.7	72.4	65.55
	Number of hues	84	98	138	103	112	185
	Diversity index	0.43	0.59	0.38	0.72	0.69	0.60

Table

Scientific RepoRts | (2019) 9:7520 | https://doi.org/10.1038/s41598-019-43777-4

Acknowledgements

This study was supported by grants from the "Direction des Ressources Marines", through the AmeliGEN project (2016-2019). The authors would especially like to thank the team of the host site, SCA Regahiga Pearls (Mangareva island, Gambier archipelago, French Polynesia) for their generous support.

Data Availability

The authors declare that all data are available.

Author Contributions

C.L.K. conceived, designed and conducted the graft experiments. P.L.S. analysed the data, wrote the R package and drafted the manuscript. J.V.D., C.R. and S.P. corrected the main manuscript text. All authors read and approved the final manuscript.

Additional Information

Competing Interests: The authors declare no competing interests.

Publisher's note: Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.