### Fish material and experimental design

In total, 2100 cod juveniles from 100 half- and full-sib families (73 sires and 100 dams) that originated from the third generation of the Norwegian Cod Breeding Program in Tromsø were used. These fish have mainly been selected for growth and to some extent for resistance to vibriosis (see Bangera et al. [17] for more details about the breeding program). The complete pedigree contained 160 sires and 197 dams. The fish were hatched in March 2009 and each family was kept in separate tanks until tagging. In September, the fish (average weight approximately 24 g) were anaesthetized (metacaine, 0.08 g/L) and tagged with passive integrated transponders (PIT-tag ID100A, Trovan Ltd, Hessle, UK) injected into the abdominal cavity. From tagging until the start of the experiment in November, the fish from each family were held in one common 500 L tank and under similar conditions. The experimental design, including the number of fish and families per tank needed to obtain reliable estimates of genetic effects, was determined by simulations and power calculations (see [18]). In this study, the fish were not subjected to any potentially harmful treatment, and we did not sample biological material such as blood samples. Consequently, the local representative approved the experiment without any application according to the rules by The Norwegian Animal Research Authority at the time the experiment was conducted.

At the start of the experiment (2 November 2009), each of the 100 families with 21 fish was divided into three groups of seven fish. The three groups from each family were then randomly assigned to one of 100 tanks of 130 L, so each tank contained 21 fish from three families, giving an average density of fish of 5.6 kg/m^{3} at the start of the experiment. At the end of the experiment, the average density was about 10.3 kg/m^{3}. During the experimental period, the fish were fed a dry feed (Classic Marine Biomar) on a restricted basis (60% of normal feeding level using a feed conversion ratio of 1.5) 12 times per day, in order to promote social interactions among the fish. The feed was provided to each tank using an automatic feeder and the amount of feed for each tank was calculated based on feeding rate and biomass in each tank after two weeks. Each tank was supplied with unfiltered sea water (30–34% salinity). Water temperature was recorded daily and oxygen content was recorded twice a week in the tanks with the highest biomass and once a week in the other tanks. The mean water temperature was 8.7°C (range 8.2-9.8°C) and the light regime in the housing facilities was continous. Water flow was adjusted to 5 L/min during the whole period, securing levels of oxygen saturation of between 87 and 97% throughout the experiment. A circumferential water current of about 5.6 cm/s was created by directing the water inflow through vertical, perforated inlet pipes, as described in [19]. The average length of the fish increased from 15.4 cm at the start of the experiment to 18.4 cm at the end of the experiment, and consequently, the water velocities corresponded to relative speeds that decreased from approximately 0.36 body lengths per second (BL/s) at the start to 0.33 BL/s at the end of the experiment.

### Recordings

The experiment lasted for six weeks and recordings of the fish were performed three times. Recording 1 was conducted on 2–3 November 2009, when the fish were stocked into the experimental tanks. Recording 2 was performed two weeks after the start of the experiment and recording 3 at the end of the experiment. Before each recording, the fish were anaesthetized with metacain (MS-222, 0.08 g/L), after which body weight (0.1 g) and length (0.1 cm) of the fish were measured. In addition, erosions of the first, second and third dorsal fins and of the caudal fin were scored subjectively at the end of the experiment. Fin erosion is damage to the fin that results in loss of epithelial fin tissue and all or part of the fin ray [3]. The degree of fin erosion was scored by a single person on a scale from 0 to 100%, in 5% intervals. At recording 1, 20 fish died due to an accident during sedation. These 20 fish were replaced with fish from the same families as those of the fish that died. The number of fish that died during the whole experiment was also recorded.

### Measurements of fin length using digital image analysis

In order to measure the length of the fins, a digital photo was taken of each fish at each of the three recordings. Before the photo was taken, the fish was placed on a uniform white background with the left side of its body up. A calibration ruler and two pieces of paper with the tank number and the number of the fish were placed above and beside the fish. Using digital image analysis (MATLAB software version 7.12, r2011a), lengths of the three dorsal fins and of the caudal fins were measured by estimating the maximum length of the fin (i.e. parallel to the fin rays). A ten cm scale was used as a calibration vector (see Figure 1). The position of the cursor and mouse clicks were used to measure the fin lengths by locating the starting points of fins on the base side and the end points of the fins on the outer side, along with the fin ray. The measurements of the length of the four fins were done by three persons, each scoring 40, 49 and 11% of the fins.

### Studied traits

Body weights at the three recordings, specific growth rate (SGR), change in condition factor (CCF, between recordings 1 and 3), fin length, and fin erosion were considered for statistical analysis. The condition factor is an expression of the condition of the fish based on the assumption that weight is proportional to the cube of the length of the fish, such that the condition factor is higher when fish are more spherical. CCF from recording 1 to recording 3 was calculated as:

\mathit{CCF}=C{F}_{3}-C{F}_{1},\phantom{\rule{0.5em}{0ex}}\mathrm{where}\phantom{\rule{0.5em}{0ex}}C{F}_{i}=\frac{\mathit{weigh}{t}_{i}}{{\left(\mathit{lengt}{h}_{i}\right)}^{3}}

SGR, defined as percentage increase in body weight per unit time, was calculated as:

\mathit{SGR}=\frac{ln\left(\mathit{weigh}{t}_{3}\right)-ln\left(\mathit{weigh}{t}_{1}\right)}{\left({t}_{3}-{t}_{1}\right)}\times 100\mathrm{\%},

where weight1 and weight3 are the weights at recordings 1 and 3 and t_{3} – t_{1} is the number of days between recordings 1 and 3.

Fin damage was quantified based on lengths of the first, second, third and the dorsal fins at each of the three recordings and based on subjective scores of erosion on the four fins at the end of the experiment.

### Statistical analysis

Genetic analyses of the studied traits were performed using the ASReml software [20]. Data were first analyzed using an animal model without social effects:

\mathbf{y}=\mathbf{Xb}+{\mathbf{Z}}_{\mathbf{D}}{\mathbf{a}}_{\mathbf{D}}+\mathbf{Wc}+\mathbf{Wt}+\mathbf{e},

where **y** is a vector of phenotypes for the observed trait, **b** is a vector of the age of the fish at each recording and the fixed effect of the person (1, 2, 3) who scored fin length (included only when fin length was analyzed), **a**_{
D
} is a vector of random direct additive genetic effects, **c** is a vector of common environmental tank effects in the rearing period, **t** is a vector of experimental tank effects, **e** is a vector of residuals, and **X**, **Z**_{
D
}, and **W** are incidence matrices.

The model with social interactions included both the direct genetic effect of the focal individual and the SGE of each of its group mates, as proposed by Muir [10] (see also [14, 21]). The model was:

\mathbf{y}=\mathbf{Xb}+{\mathbf{Z}}_{\mathbf{D}}{\mathbf{a}}_{\mathbf{D}}+{\mathbf{Z}}_{\mathbf{S}}{\mathbf{a}}_{\mathbf{S}}+\mathbf{Wc}+\mathbf{Wt}+\mathbf{e},

where **a**_{
S
} is a vector of random social additive genetic effects, **Z**_{
S
} is the associated incidence matrix, and the other parameters are as described above. Note that fitting effects of the experimental tank is equal to fitting a social environmental effect for each animal [18].

Based on the above models, the following variance components and parameters were estimated:

{\sigma}_{{A}_{D}}^{2} = direct additive genetic variance;

{\sigma}_{{A}_{S}}^{2} = social additive genetic variance;

{\sigma}_{{A}_{\mathit{DS}}} = direct-social additive genetic covariance;

{\sigma}_{c}^{2} = variance of common environmental tanks effects in the rearing period (1, …, 100);

{\sigma}_{t}^{2} = variance of experimental tank effects (1, ...., 100).

From these estimated parameters, the following parameters were derived:

{\sigma}_{\mathit{TBV}}^{2} = variance of the total breeding values;

{\sigma}_{P}^{2} = phenotypic variance;

T^{2} = the total heritable variance relative to the phenotypic variance: {T}^{2}={\sigma}_{\mathit{TBV}}^{2}/{\sigma}_{P}^{2}.

The total heritable variance was calculated as:

{\sigma}_{\mathit{TBV}}^{2}={\sigma}_{{A}_{D}}^{2}+2\left(n-1\right){\sigma}_{{A}_{\mathit{DS}}}+{\left(n-1\right)}^{2}{\sigma}_{{A}_{S}}^{2},

where *n* is the number of fish in the tank. This is the total heritable variance, due to both direct and SGE, that determines the potential of the population to respond to selection [22]. Phenotypic variance was calculated as:

{\sigma}_{P}^{2}={\sigma}_{{A}_{D}}^{2}+\left(n-1\right){\sigma}_{{A}_{S}}^{2}+{\sigma}_{c}^{2}+{\sigma}_{t}^{2}+{\sigma}_{e}^{2}.

This expression defines phenotypic variance for groups that consist of unrelated individuals.

With SGE, phenotypic variance depends on relatedness between interacting individuals [11], which may hamper the comparison of genetic parameters, such as heritabilities, between studies. Therefore, phenotypic variance was expressed for the “default” situation, i.e., for a population that consists of unrelated individuals.

Heritabilities were estimated using the univariate linear animal models described above. The importance of including the SGE was tested using log likelihood tests by comparing the differences in the likelihood between the traditional animal model and the model that included both direct effects and SGE. In addition, correlations between direct and social breeding values for weight at recording 3 and for fin damage traits with significant social effects were estimated using bivariate animal models that contained the same fixed and random effects as described above for the univariate models.