Skip to main content
Dryad logo

Choice consequences: salinity preferences and hatchling survival in the mangrove rivulus fish (Kryptolebias marmoratus)


McCain, Shelly C. et al. (2020), Choice consequences: salinity preferences and hatchling survival in the mangrove rivulus fish (Kryptolebias marmoratus), Dryad, Dataset,


In heterogeneous environments, mobile species should occupy habitats in which their fitness is maximized. Mangrove rivulus fish inhabit mangrove ecosystems where salinities range from 0 to 65 ppt, but are most often collected at ∼25 ppt. We examined the salinity preference of mangrove rivulus in a lateral salinity gradient, in the absence of predators and competitors. Fish could swim freely for 8 h throughout the gradient with chambers containing salinities ranging from 5 to 45 ppt (or 25 ppt throughout, control). We defined preference as the salinity in which the fish spent most of their time, and also measured preference strength, latency to begin exploring the arena, and number of transitions between chambers. To determine whether these traits were repeatable, each fish experienced three trials. Mangrove rivulus spent a greater proportion of time in salinities lower (5–15 ppt) than they occupy in the wild. Significant among-individual variation in the (multivariate) behavioral phenotype emerged when animals experienced the gradient, indicating strong potential for selection to drive behavioral evolution in areas with diverse salinity microhabitats.We also showed that mangrove rivulus had a significantly greater probability of laying eggs in low salinities compared with in control or high salinities. Eggs laid in lower salinities also had higher hatching success compared with those laid in higher salinities. Thus, although mangrove rivulus can tolerate a wide range of salinities, they prefer low salinities. These results raise questions about factors that prevent mangrove rivulus from occupying lower salinities in the wild, whether higher salinities impose energetic costs, and whether fitness changes as a function of salinity.


For the salinity preference in a lateral gradient experiment time spent in each salinity chamber was obtained using JWatcher and then combined into one data sheet. Then in R the time spent per chamber was converted to an average preference score and we then calculated the variance of each fish's preference and this is defined as the strength of preference.

Data for the egg laying preference experiment was manually entered into excel at the time of each egg check. Eggs were then checked daily for hatching and as eggs hatched this data was also entered in manually to an excel file. 

Usage Notes

Each sheet of the excel workbook represents a set of data that was used in the analysis.

In each sheet, treatment is identified by E = experimental or C = control.

The data for the salinity preference in a lateral gradient experiment can be found in the sheets "sal_pref_time" and "sal_pref_scores". 

The sheet entitled "sal_pref_time" includes the amount of time (in seconds) spent in each salinity chamber. If the fish was in the experimental treatment (E in the "treatment" column) then a 1 in the "salinity" column equals 5 ppt, 2 equals 15 ppt, 3 equals 25 ppt, 4 equals 35 ppt, and 5 equals 45 ppt. If the fish was in the control treatment (C in "treatment" column) then the numbers in the "salinity" column identify the chamber that the fish was in. The latency to emerge time is in the "emerge_s" column; this is the amount of time (in seconds) that the fish took to leave the central compartment at the start of the trial for each round. 

The "sal_pref_scores" sheet includes the converted preference score (see methods section of manuscript for details) for each fish, the strength of preference, along with the total number of transitions made between chambers, and the latency to emerge from the central chamber at the start of the trial for each round. 

The data for the egg laying preference experiment are located in the "eggs_laid" and "eggs_hatched" sheets.

In the "eggs_laid" sheet the "time" column refers to the egg collection at the end of the first week (1) or at the end of the second week (2) in the gradient. "Salinity" identifies which salinity chamber (or just which chamber for the control treatment) the egg was located in, as in the "sal_pref_time" sheet; the salinity codes are the same (1 = 5 ppt, 5 = 45 ppt). If at least one egg was located in the salinity chamber then a 1 was entered in to the "eggs" column, if no eggs were found then a 0 was entered. We also included if the chamber was an "edge", chambers 1 and 5 are located at the end of the of the gradient and each received a 1 in this column, while chambers in the middle 2-4 each received a 0.

The "eggs_hatched" sheet includes whether or not an egg hatched, 1 = hatched and 0 = did not hatch.  


Society for Integrative and Comparative Biology