text:
Friday night roundup: Ponte Vedra bounces back from 1st loss
Sep 28, 2018 at 10:40 PM Sep 30, 2018 at 4:01 PM
Ponte Vedra 16, Bishop Kenny 13
Star of the game: Sophomore quarterback Cobi Myers capped off a 10-play drive covering 52 yards on a 1-yard keeper on fourth and 1 to rally a Ponte Vedra to a come-from-behind District 4-5A victory over host Bishop Kenny.
Turning point: After the Crusaders (2-3, 1-1) took a 13-9 lead on Sean Meisler's 39-yard field goal with 10:32 left in the game, Ponte Vedra's Kyle Baker returned the ensuing kickoff 42 yards to the 48 yard-line setting up the Sharks (5-1, 2-1) game-winning drive. Myers went in from 1 yard out to give his team a 16-13 lead with 6:19 left in the game.
On defense: Ryan Chase returned an interception 25 yards for a touchdown and Mike Soncrant recovered a fumble and added two sacks for Ponte Vedra. Jaylon Bass blocked an extra point for Kenny while John Godwin had a fumble recovery and a sack for the Crusaders.
Fast facts: George Farmand completed 25-of-33 for a game-high 261 yards and a touchdown for Bishop Kenny...Meisler connected on field goals of 39 and 37 yards while Jonathan Jones caught a 42-yard TD pass for Kenny...Cole McCormick had six tackles including three for loss for Ponte Vedra.
They said it: "Both teams played a tough, hard-nosed football game, " said Ponte Vedra head coach Matt Toblin. "We just made a few more plays than they did tonight."
— Dennis Bergin
Matanzas 6, Nease 5
Freshman Noah Cundiff scored on a fourth-down reverse with 1:38 remaining to give Matanzas a dramatic 6-5 victory at Nease.
"It was a hard-fought victory," said Matanzas coach Don Mathews, whose team won for the second time in three weeks after an 0-2 start. "They're a good, well coached team."
The Panthers fell to 0-6. This was the Panthers' second loss by three points or less.
Mathews credited his defense, which is comprised mostly of freshmen and sophomores.
Bartram Trail 34, Creekside 20
Star of the Game: Bartram Trail senior RB Devin Ellison rushed for 177 yards and a touchdown as the Bears (1-1 in District 3-7A, 4-2 overall) used three big offensive plays in the first half to take a 34-20 victory at rival Creekside (0-1, 4-2). Ellis, a Georgia Tech commitment, scored on a 46-yard run late in the first quarter to give the Bears their first lead.
Turning point: Creekside took the game's first offensive possession 60 yards in 12 plays, culminating with junior RB Jalen Hines' 5-yard TD run. But Bartram countered with sophomore A.J. Jones' 75-yard kickoff return TD on the ensuing pooched kickoff. Then Ellison scored on his long run and Griffin Helm caught a 23-yard pass from Chad Dodson late in the half for a 24-7 halftime lead. Creekside also reached the Bartram 24 and 27 in the first half but couldn't muster any points.
On defense: Bartram halted two early Creekside drives with pass breakups by seniors Chase Ruskin, Harry Bowker and Jake Bennett. … Creekside recovered two Bartram fumbles – by junior LB Owen Murnin and junior DL DJ Makauskas.
Fast Facts: Bartram leads the Northwest St. Johns County series 10-1 over Creekside, with the Knights' lone win coming in 2014. … Bartram junior QB Dodson (133 yards passing, 37 rushing) suffered a lower leg injury midway through the third quarter and didn't return. Bears coach Darrell Sutherland was unsure of the severity of the injury. … Creekside senior QB Tail Lavatai was held to 100 yards passing but did throw a 24-yard TD pass in the last minute of the game. The Navy commitment has 19 TD passes this season. … Both schools are idle next week before resuming District 3-7A play at home on Oct. 12 – Creekside vs. Gainesville Buchholz in its final regular-season home game and Bartram against Fleming Island.
They said it: "Devin (Ellison) is just a tenacious competitor. One of the great things about him – and we've told every college coach who came to look at him – is that he's not only a good football player, but a better young man. He's a top 1 percenter." — Bartram Trail coach Darrell Sutherland.
— Ward Clayton


As a Country/Urban Café, The Hatchery combines unique ingredients with a small town country atmosphere, for a one-of-a-kind dining experience.
We take great pride in preparing the majority of our menu items in house. Our sauces, soups, pies, quiches and fresh cilantro pesto are all created by our talented team. Our Hatchery-baked muffins, cinnamon buns and cinnamon raisin bread are not to be missed! You can even enjoy Hatchery home cooking in your kitchen with our Signature Hatchery Pancake Mix.
SAM'S STEAKHOUSE only serves steaks graded by the USDA as "High Choice" or "Prime." Sam's steaks are also in-house dry aged for 21 to 45 days in our climate controlled locker and char grilled over live coals to provide you with a flavorful and juicy steak.
Ever wake up one day & realize that you wanted to do something 'different'? Well, that is what started all of what you see today at Goodman's American Pie. This pizza business started with a true devotion to pizzas, parties, and a desire not to be a 'cog in the wheel of life'. First, we built a small test oven at a house we were renting in Mount Holly, VT. We would supply the dough, sauce and beverages & it was our friends that brought over all of the wacky toppings that eventually formed our 'Specials' menu we have today!
Located at Okemo Valley Golf Club Enjoy the finest patio dining in the Okemo Valley at Willie Dunn's Grille, located at the Okemo Valley Golf Club. Willie Dunn's invites everyone to relax on the patio and enjoy our lunch menu, featuring fresh and unique salads, sandwiches, juicy half-pound burgers, and our chef's daily specials. The food is great and so is the view! Check out our menu: Lunch Willie Dunn's Grille is a favorite among guests and locals alike, during the spring and summer months at Okemo.


text:
24 August 2009 Dietary Segregation of Pelagic and Littoral Fish Assemblages in a Highly Modified Tidal Freshwater Estuary
Lenny F. Grimaldo, A. Robin Stewart, Wim Kimmerer
Study sites
Analysis of trophic interactions
Animal and plant collections
Stable isotope preparation
Additional sources of primary producer data
Stomach content analysis
Identification of energy sources fuelling food webs
What are the dominant food sources used by fishes?
Did diets differ among habitats?
Fish Collections
Identification of Food Sources Important to Fishes
Diet Patterns by Habitat
Major Food Web Pathways
Pelagic Food Webs
Littoral Food Webs
Fishes in SAV
Fishes in Open-Water Shoals
Historic Shifts in the Food Web
Consequences for Restoration
Estuarine food webs are highly variable and complex, making identification of their trophic pathways difficult. Energy for the food web of the San Francisco Estuary is thought to be based largely on in situ phytoplankton production, but little attention has been paid to littoral habitats, where other energy sources may be important. We analyzed the stomach contents of over 960 juvenile fishes and the stable carbon and nitrogen isotope ratios of these fishes and their potential food resources in pelagic and littoral habitats from the tidal freshwater area of the estuary. The mixing model IsoSource was used to examine energy sources important to consumers. Our results show evidence of two predominant food web pathways. Pelagic fishes and some littoral fishes showed strong dependence on a zooplankton–phytoplankton trophic pathway. However, the majority of fishes in littoral habitats had diets and carbon isotope ratios consistent with energy arising from submerged aquatic vegetation and epiphytic macroalgae. IsoSource revealed that the overall majority of nutrition of littoral fishes originated from consumption of grazer amphipods. Examining both stable isotopes and stomach contents allowed us to identify a food web with contributions to resident fishes that had been previously underestimated in the estuary. This study provides insight to how estuarine food webs have changed over the last few decades and highlights why the functions of habitats must be understood for effective restoration planning.
The tidal freshwater reach of an estuary is a physically complex environment with habitat characteristics varying over all spatial scales. Habitat edges abound, and tidal and river flows connect habitats, providing foraging opportunities for a variety of estuarine species. This complexity makes investigation of feeding relationships difficult; organisms collected in a particular habitat may have fed elsewhere (Hoffman et al. 2007) or relied on trophic pathways initiated in upriver (Howarth et al. 1996) or seaward environments (Garman and Macko 1998; Stewart et al. 2004). Thus, energy sources and pathways for tidal freshwater food webs remain poorly understood.
Support for the idea that estuarine food webs are primarily supported by the export of marsh detritus (Teal 1962; Odum and Heald 1975) has diminished over the last few decades (Chanton and Lewis 2002; Sobczak et al. 2002). A variety of organic carbon sources may support coastal and estuarine consumers, including phytoplankton (Canuel et al. 1995; Deegan and Garritt 1997; Sobczak et al. 2002; Howe and Simenstad 2007), submerged aquatic vegetation (SAV; Fry 1981; Kitting et al. 1984), benthic algae (Hecky and Hesslein 1995; Deegan and Garritt 1997; Kwak and Zedler 1997; Page 1997), epiphytic macroalgae (Kitting et al. 1984; Moncrieff and Sullivan 2001; Vizzini et al. 2002), and terrestrial vegetation (Chanton and Lewis 2002).
Recent work in the San Francisco Estuary not only counters the in situ detrital hypothesis as the primary source of food web production but also the "pulse" paradigm, which holds that tidal freshwater food webs are driven by episodic energetic inputs (Odum et al. 1995). These studies have demonstrated the importance of in situ phytoplankton production as the primary source of available organic carbon for pelagic consumers in the tidal freshwater region of the estuary (Canuel et al. 1995; Jassby and Cloern 2000; Mueller-Solger et al. 2002; Sobczak et al. 2002, 2005). However, the relative importance of phytoplankton as an energy source for consumers in other habitats is unclear. In addition, long-term declines in phytoplankton production may be increasing the relative importance of other energy sources (Jassby et al. 2002). The answers to these questions remain outstanding because long-term monitoring and special studies have focused on pelagic habitats (Orsi and Mecum 1996; Kimmerer 2002a, 2006; Mueller-Solger et al. 2002; Sobczak et al. 2002).
We used gut content analysis and stable isotopes (carbon and nitrogen) to determine what food sources were important for fishes in pelagic and littoral habitats in the tidal freshwater region of the San Francisco Estuary, known as the Sacramento–San Joaquin Delta (hereafter, Delta). We focused on comparisons between pelagic sources (i.e., phytoplankton) versus energy sources distinguishable by C and N isotopes (Cloern et al. 2002). The questions of this study were (1) do fishes in the Delta mainly rely on phytoplankton–zooplankton trophic pathways, or is their consumption supported by other organic matter sources; and (2) do the diets and food webs of fishes differ by habitat where they reside? The answer to the first question will provide insights into the mechanisms of food web variability that can explain why certain fishes in the estuary have flourished while others have declined (Brown and Michniuk 2007; Sommer et al. 2007). Answers to the second question can shed light on mechanisms underlying the coupling of fish with their physical habitats, providing necessary information for ongoing restoration efforts.
The study area is located at the eastern boundary of the San Francisco Estuary in the Delta (Figure 1). The Delta is a highly complex and modified tidal freshwater ecosystem (Atwater et al. 1979; Nichols et al. 1986). The Delta receives the majority of its flow from the Sacramento and San Joaquin rivers, which drain about 100,000 km2 of the surface area of California. In the southern Delta are two massive water diversions that have greatly altered flow patterns throughout the tidal reaches of the watershed. Natural sloughs have been dredged and deepened to accommodate shipping traffic or movement of water towards the export facilities, especially in the south Delta. Much of the marsh habitat in the Delta was drained and converted to agricultural tracts in the late 1800s (Atwater et al. 1979). Many of these agricultural tracts have been armored with rip-rap. The estuary is considered one of the most highly invaded ecosystems in North America (Cohen and Carlton 1998). Of note, the fish community in the Delta is now dominated by introduced species, many of which are associated with introduced species of SAV (Grimaldo et al. 2004; Nobriga et al. 2005; Brown and Michniuk 2007).
Much of the available shallow-water habitat for fishes in the Delta is located in flooded islands. Flooded islands are former tidal wetlands that were leveed in the past but have since been reintroduced to tidal flow by accident (i.e., levee failure) or through intentional purposes for restoration. The interiors of many of flooded islands are between 2 and 5 m below sea level, a result of subsidence that occurred from aerobic decomposition of peat soils during agricultural periods (Reed 2002; Mount and Twiss 2005). Tidal exchange between adjacent channels and flooded islands varies by site, depending on the breach size and depth (Lucas et al. 2002).
Three flooded islands from the central and western Delta were selected as study sites: Sherman Island (SI), Mildred Island (MI), and Venice Cut Island (VCI). All study sites have partially intact levees and have remained mostly at subtidal elevations since they were re-connected to tidal flow (SI = 80 years, MI = 25 years, and VCI = 74 years). Mildred Island is just over 5 m below sea level and is approximately 4.1 km2 in surface area. In contrast, SI and VCI are on average less than 3 m deep and are approximately 4.0 and 0.6 km2 in surface area, respectively. The subtidal interiors of SI and VCI are colonized by extensive beds of Brazilian waterweed Egeria densa, an introduced SAV. In contrast, MI is characterized as a large open-water embayment with SAV (mostly Brazilian waterweed) confined to the littoral margins. Additionally, open-water shoals were found at all sites and generally occurred in narrow strips between subtidal SAV and adjoining marsh or levees.
Our study questions were approached by analyzing trophic interactions by using two techniques that reflect different time scales. Stomach content analysis provides information on the diets of fishes over a short time scale (i.e., hours), but its utility as a tool for investigating food webs is limited in that it offers a snapshot of the fishes' recent diets. Stable isotope (δ13C and δ15N) ratios can reveal information about how the fishes' diets are integrated over a much longer time scale (e.g., days and weeks), although interpretation requires sufficient knowledge of isotopic variability in lower trophic levels, which can reflect assimilation of multiple end members (Phillips and Gregg 2001; Cloern et al. 2002). Therefore, food webs were determined by using δ13C–δ15N biplots, where trophic connections are inferred through similarity of signatures assuming trophic fractionation and mixing models by using IsoSource software (Phillips and Gregg 2003). IsoSource can help improve resolution of multiple end member contributions as it calculates ranges of source proportional contributions to a mixture based on stable isotope signatures when the number of sources is too large to permit a unique solution. Note the time scale for equilibrium between ingestion and incorporation into the tissue of the animal is needed for unequivocal use of stable isotope data or mixing models to infer diets (Vander Zanden and Rasmussen 2001). Since we do not know the time to equilibrium for each fish and its prey, our inferences about diet are based on consistent patterns of variability between stable isotope approaches and the stomach contents.
Our study focused on summer and fall periods when fishes are at their highest abundances (Feyrer and Healey 2003; Grimaldo et al. 2004). The food webs of fishes were examined from pelagic and littoral habitats at all study sites, but only MI was sampled in the fall of 1999 (Table 1). Food webs of littoral habitats comprised samples from SAV and open-water shoals, which were treated independently in the data analyses. Fishes in pelagic areas were collected by using purse seines. Fishes from littoral habitats were collected by using either beach seines in open shoals or block-net enclosures with repeated hauling. We sampled repeatedly until at least eight individuals of selected species were collected from each site. Fishes were transferred on ice to the laboratory, where they were sorted by species, measured to the nearest millimeter fork length (FL), and weighed to the nearest 0.01 g wet weight.
Primary producers except phytoplankton and invertebrates from each site and habitat were collected concurrently with fish for isotopic analysis. The upper stem and leaves were removed from Tule Scirpus acutus and Brazilian waterweed (SAV), and epiphytic macroalgae were scraped from the blades and stems of SAV at each study site. Stable isotope information for phytoplankton was obtained from another source (discussed below). The most common invertebrates were sampled from one or several areas within each habitat to obtain sufficient biomass of individual species. Invertebrates in SAV were collected by vigorously shaking uprooted plants into buckets and then using sieves to sort plant and animal components. Crustaceans (amphipods), chironomid pupae (family Chironomidae), damselfly larvae (suborder Zygoptera), and snails (family Physidae) were hand-picked from sieves, sorted into individual vials with distilled water, and allowed to depurate for several hours before they were placed on ice for transfer to a freezer. Asiatic clams Corbicula fluminea were excavated from below the sediment surface (≤15 cm deep) of open-water shoals by using shovels, allowed to depurate for 12 h, and then frozen. No other invertebrates were abundant in open-water shoals. Zooplankton were collected from open-water pelagic areas by using a 110-μm mesh net towed for 10 min below the surface. Samples of zooplankton at VCI were inadvertently destroyed, so samples collected at MI in 2000 were used as their replacement for food web interpretation.
Invertebrates were rinsed, and whole bodies of at least 10 individuals were pooled for isotope analysis. The digestive tracts of clams and snails were removed, and the muscle tissue was saved for analysis. White muscle tissue was dissected from above the mid-dorsal region of fishes longer than 50 mm FL. A whole-side muscle fillet was obtained from fishes less than 50 mm FL. Plant and animal tissue samples were dried (60°C for 24 h) and ground into powder by using either a mortar and pestle or Wiley mill. Aliquots (10–20 mg) of this powder were placed into tin capsules for analysis. The δ13C and δ15N ratios of samples were determined at the Stable Isotope Facility, University of California–Davis, by using a Europa Scientific Hydra 20/20 continuous-flow mass spectrometer and a Europa ANCA-SL elemental analyzer.
The ratio of heavy and light isotopes is expressed as:
where X = 13C or 15N and R = 13C/12C or 15N/14N (Lajtha and Michener 1994). The standards were Peedee Belemnite for C and atmospheric nitrogen for N (Lajtha and Michener 1994). Carbon and nitrogen isotopes fractionate approximately 0.8‰ (DeNiro and Epstein 1978) and 3.4‰ (Minagawa and Wada 1984), respectively, between consumer levels.
To supplement the data on primary producers, we calculated the mean (±SD) C and N isotopes of tidal freshwater primary producers from Cloern et al. (2002). This data set overlapped with our study period and included samples of seston characterized by high chlorophyll-a content (10 μg of chlorophyll a/L) and low C:N ratios (<9 g of C/ g of N) as surrogates for phytoplankton signature (see Methods in Cloern et al. 2002). It also included samples on terrestrial vegetation and floating aquatic vegetation, which were not measured in our study. Because the samples in Cloern et al. (2002) represent a broader spatial and temporal data set, we believe they capture the variability in isotopic signatures better than our study; therefore, those samples were used as the benchmark for examining the basal sources of energy in this study.
The stomachs from a subset of fishes collected at study sites in 2000 were removed and analyzed for dietary composition. Prey items from each stomach were identified to the lowest taxonomic resolution and counted. The taxonomic categories used for diet analyses were zooplankton (copepods, cladocerans, and crab zoea), chironomid pupae, amphipods (Gammarus daiberi, Hyalella azteca, and Corophium spp.), snails, clams, damselfly larvae, aquatic and terrestrial macroinvertebrates, and fish or fish eggs.
Because Cloern et al. (2002) found that some primary producers were indistinguishable by δ13C and δ15N signatures, we selected a priori primary producers with relatively enriched δ13C signatures (SAV and epiphytic macroalgae) versus those with relatively depleted δ13C signatures (phytoplankton, terrestrial vegetation, emergent vegetation, and floating aquatic vegetation) as the base levels of discrimination. Differences between δ13C and δ15N of these two groups were explicitly tested by using analysis of variance (ANOVA). The mean (±SD) δ13C and δ15N signatures of primary producers measured in this study were pooled and plotted versus those measured in Cloern et al. (2002) to visually examine consistency between data sets. Differences between the data sets were not analyzed statistically since we did not measure seston, terrestrial vegetation, or floating aquatic vegetation. However, good agreement between measured data would serve to strengthen the conclusions drawn on dominant food web pathways.
The IsoSource mixing model was used to determine the contribution of primary producers to invertebrates and the contribution of prey to fishes (Phillips and Gregg 2003). For invertebrates, source contributions at 1% increments were determined by using δ13C only because initial attempts using δ15N signatures could not resolve feasible solutions (up to 0.1 tolerance) in most cases. Solutions could not be determined because the δ15N signatures of invertebrates were enriched higher than the 3.4‰ fractionation level assumed between trophic levels. The discrepancy could arise from variation in the fractionation of the consumer (Vander Zanden and Rasmussen 2001) or because of variability in the primary producers' δ15N signatures (Cloern et al. 2002). Because fractionation in δ15C is relatively minor (0.8‰; DeNiro and Epstein 1978), it has a smaller effect on the modeled results and therefore is a reasonable estimator of energy sources when used alone (Melville and Connolly 2005). The sources used for invertebrates included all the primary producers measured by Cloern et al. (2002), but for meaningful biological interpretation, reported contributions are those summed by the two distinguishable groups based on their δ13C signatures (i.e., enriched versus depleted sources).
The identification of food webs using stomach content data were examined by using a modified index of relative importance (IRI) metric (Pinkas et al. 1971; see Liao et al. 2001):
where %O is percent frequency of occurrence, %N is percent of diet by numbers, and %W is percent of diet by weight. The IRI values of prey were summed to yield a grand total IRI value from which the relative importance of each prey category was then expressed as a percentage. The IRI percentages were calculated for early juvenile (19–49 mm FL), late juvenile (50–99 mm FL), and subadult or adult (>100 mm FL) stages to examine potential influences diet selection with size. Individual weights for invertebrates were obtained from Toft et al. (2003).
Trophic connections between fishes and invertebrates were inferred by comparing their relative δ13C and δ15N signatures in consumer biplots for each site while accounting for fractionation. The functional feeding groups of invertebrates (Thorp and Covich 2001) and the habitats where fishes were collected were pooled for the biplots graphs. For fishes in SAV, early juveniles were discriminated from late juveniles to tease out possible size-related feeding changes given that there were multiple species represented by different sizes.
IsoSource was used to determine the sources of food important to the nutrition of fishes. The mean δ13C and δ15N signatures of fishes and invertebrates were used unless the model failed to converge to solution, in which case standard deviations of isotopic signatures were applied to find a solution. Sources were selected a priori from the stomach content results (Phillips et al. 2005), and early and late juvenile fishes were assumed to have the same prey field. Because threadfin shad had empty stomachs, we assumed their diet composition to be similar to that of American shad; this assumption is reasonable based on previous diet work in the estuary (Turner 1966b; Feyrer et al. 2003). Omnivorous species, such as the golden shiner and hitch, were ignored given that we did not analyze their stomachs for prey contents. In a few cases, the isotopic signatures of prey (e.g., fish eggs) were not available; therefore, the sources were limited to those with measured isotopic values. To provide a biological realism to the IsoSource output, contributions of prey that accounted for less than 5% of total IRI in the stomachs were constrained to the most dominant prey in the stomachs (Phillips et al. 2005).
To determine if the stomach contents of fishes differed by habitat, we applied the nonparametric analysis of similarity (ANOSIM) to the IRI percentages by using Primer statistical software (version 6.1.11; Clarke 1993). Early and juvenile fishes from SAV were tested independently to determine if size influenced differences in diets among habitats. A similarity matrix was generated on the diet data by using the Bray–Curtis similarity measure prior to ANOSIM tests (9,999 permutations). The ANOSIM generates a value of R that is scaled to lie between −1 and + 1, with a value of zero representing the null hypothesis—in this case, that there was no difference in diet selection. Similarity percentage (SIMPER) analysis was used to reveal prey responsible for ANOSIM differences.
A nested analysis of covariance (ANCOVA) was used to test the hypothesis that δ13C and δ15N signatures of fish species differed among the three sites (MI, VCI, and SI) and habitats nested within sites (SAV, open-water shoals, and pelagic areas). Length was included in the model as a covariate to account for ontogenetic shifts in diet. Data from MI (1999) were not used in the model to eliminate effects due to interannual variability.
Nine-hundred fifty-nine fish (9 families, 16 species) were collected for diet and isotope analysis. The species composition of fish generally reflected relative abundance in their environment (Feyrer and Healey 2003; Grimaldo et al. 2004; Nobriga et al. 2005; Brown and Michniuk 2007). The dominant species collected were introduced species (Table 1). The most numerous native fish collected were splittail, Chinook salmon, and hitch, all in open-water shoals. Chinook salmon included fish with and without coded-wire tags applied in hatcheries. Since not all hatchery fish are routinely tagged, the untagged fish were an unknown combination of fish potentially reared in hatcheries or fish that were spawned in the wild.
Seston, terrestrial, emergent, and floating aquatic vegetation types were significantly different than SAV and epiphytic macroalgae with respect to δ15N (ANOVA: F = 71.29; df = 1, 160; P < 0.001) and δ13C (F = 129.95; df = 1, 160; P < 0.001). Overall, the mean (±SD) δ13C signatures of seston, terrestrial, emergent, and floating aquatic vegetation were between −31‰ and −25.9‰, whereas the mean and standard deviation of δ13C signatures of SAV and epiphytic macroalgae were between −27‰ and −12‰ (Figure 2a). The δ13C signatures of primary producers measured in this study were similar to those in the Cloern et al. (2002) data set (Figure 2). Our limited primary producer data set shows some distinction in the δ13C signatures of SAV and epiphytic macroalgae, but as previously mentioned, it probably does not capture the variability in primary producer isotopes as well as the more robust data set of Cloern et al. (2002). Therefore, we are assuming the more conservative assignment of a SAV–epiphytic macroalgae food web rather than attempting to distinguish between SAV and epiphytic macroalgae. Filamentous algae measured at SI and VCI had enriched δ13C signatures.
Grazing and predatory invertebrates collected from SAV generally had enriched δ13C signatures between −21‰ and −17‰, except for Gammarus daiberi from VCI, which had relatively depleted δ13C signatures (Table 2). Suspension feeders had depleted δ13C signatures relative to grazing invertebrates across sites, except for chironomid pupae at MI (2000), VCI, and SI.
Primary producers with depleted δ13C signatures were modeled by IsoSource to be the dominant food source to zooplankton (Table 3), except at MI (1999), where a solution could not be resolved. Primary producers with enriched δ13C signatures were modeled to be the primary food of chironomid pupae. For clams and Corophium spp., depleted primary producers were modeled to be their primary food at MI (both years) but not at VCI or SI. Except for Gammarus daiberi at VCI, primary producers with enriched δ13C signatures were modeled to be the primary food sources of grazing and predatory invertebrates.
The IRI values were calculated for 675 fishes, excluding fish with empty stomachs and herbivorous individuals. Zooplankton, chironomid pupae, and amphipods were the dominant prey consumed for all species examined, except for subadult–adult largemouth bass (Figure 3). Based on IRI, zooplankton was the primary prey of American shad, Chinook salmon (hatchery and untagged), Mississippi silversides, splittails, shimofuri goby, rainwater killifish, and most early juvenile centrarchid fishes. Grazer amphipods dominated the diets of all other early juvenile and late juvenile fishes.
The mean δ13C signatures of pelagic fishes, early juvenile centrarchids, and Mississippi silversides from MI (both years) had δ13C ratios less than −23‰ (Table 2). All other fishes from SAV and open-water shoals had δ13C signatures between −23‰ and −17‰. The biplots show that the δ13C signatures of fishes from SAV were enriched relative to grazing and predatory invertebrates, except for early juvenile fishes from MI (2000) and SI (Figure 4). The δ13C signatures of pelagic fishes were enriched relative to suspension feeders at MI (1999 and 2000) and VCI. As a group, open-water fishes had δ13C signatures similar to those of grazing and predatory invertebrates at SI.
The contributions of invertebrates to the nutrition of fishes were determined for most species in IsoSource (Table 4). However, in many cases the standard deviation was applied to the mean isotopic signatures to allow feasible solutions (0.1 tolerance), which we determined resulted in an approximate 15% difference in modeled ranges of sources for standard deviations over 1.0. Therefore, emphasis on IsoSource results is placed on dominant contributors between enriched and depleted invertebrate groups rather than on the mean values or small contributors within groups (Phillips and Gregg 2003).
The ANOSIM revealed that the diets of fishes were overall significantly different among habitats (P < 0.05; global R = 0.23). Subsequent pairwise comparisons in ANOSIM revealed that pelagic fishes had diets that were significantly different from those of late juvenile fishes collected in SAV (P < 0.05; R = 0.92) but not significantly different from those of early juvenile fishes in SAV (P = 0.20; R = 0.32). The SIMPER analysis revealed that the percentage in diet differences between pelagic and late juvenile fishes from SAV was most attributable to amphipods (44%) and zooplankton (33%). Similarly, fishes from open-water shoals and late juvenile SAV fishes had significantly different diets (P < 0.01; R = 0.42), where chironomid pupae contributed to 38% of the attributable difference between diet selection. No other pairwise differences in diets were significantly demonstrated in ANOSIM.
The δ13C signatures of fishes differed among habitats (F = 59.61; df = 6, 940; P < 0.001) nested within sites (ANCOVA: F = 377; df = 2, 942; P < 0.001). The δ15N signatures of fishes differed by habitat (F = 30.8; df = 6, 940; P < 0.001) but not sites (F = 2.11; df = 2, 942; P = 0.12). Fish length did not have a significant effect on δ13C (F = 0.1; df = 1, 945; P = 0.10) or δ15N (F = 0.26, df = 1, 945; P = 0.61) signatures.
The stable isotope analysis broadly supported the diet analysis in providing evidence of pelagic and littoral food webs in the tidal freshwaters of the estuary. Although other studies have reported diet information for fishes in the Delta (Turner 1966a, 1966b; Toft et al. 2003; Nobriga and Feyrer 2007), this is the first study we know of that shows the importance of littoral-based carbon (SAV–epiphytic macroalgae) to the nutrition of fishes in the Delta. The results presented here suggest that trophic connections between prey and fishes were generally linked to their physical habitat (Deegan and Garritt 1997; Paterson and Whitfield 1997; Toft et al. 2003), but small to modest energy contributions crossed between habitats, especially in open-water shoals. The influence of seasonal variability in food webs cannot be addressed (Chanton and Lewis 2002; Howe and Simenstad 2007) since we only analyzed samples from two seasons in different years. Nonetheless, our study has broad implications about the functions of tidal freshwater habitats for fishes during their critical juvenile rearing periods, providing information that helps interpret potential historic shifts in the food web as well information to guide for restoration projects.
Before the importance of phytoplankton-based food web can be discussed, we must first revisit the data collected here and from others that demonstrate its importance to pelagic consumers. As Cloern et al. (2002) found in their estuarywide data set, we show that the δ13C signatures of phytoplankton-rich seston were distinct from those of SAV and epiphytic macroalgae but indistinguishable from those of terrestrial, emergent, and floating aquatic vegetation. This suggests that assignment of energy sources fuelling pelagic food webs is equivocal when using C and N stable isotopes. However, in order for emergent, terrestrial, or floating aquatic vegetation to be incorporated by zooplankton and other suspension feeders, it would have to be routed through a detrital microbial loop. However, experimental work shows that the detrital-derived energy is of minor significance to pelagic pathways compared to phytoplankton, which is far more bioavailable (Sobczak et al. 2002, 2005) and nutritious for zooplankton (Mueller-Solger et al. 2002). This study and others in the estuary have demonstrated, using different approaches, that phytoplankton is the dominant energy source for pelagic consumers (Canuel et al. 1995; Jassby and Cloern 2000; Mueller-Solger et al. 2002; Sobczak et al. 2002, 2005). Contributions of detrital material to pelagic consumers cannot be ruled out entirely, but for the purposes of our study phytoplankton is assigned as the basal source of food for pelagic food webs (i.e., consumers with depleted δ13C signatures) based on its likely dominance in assimilation to upper trophic levels.
Pelagic fishes exhibited the most dependence on a phytoplankton-based food web. The stomach content analysis revealed that American shad had 74% IRI for zooplankton, and IsoSource modeled zooplankton to be the dominant nutrition for both American shad and threadfin shad at all sites. These results are not unexpected for these species since they are largely zooplanktivorous (Turner 1966b; Feyrer et al. 2003). However, we were surprised that contributions of amphipods were modeled to account for up to a third of the nutrition in these species despite only having 9% of the total IRI for American shad. This suggests that American shad and threadfin shad diets can be modestly coupled with food from SAV, which appeared to be important for these fishes at SI based on their trophic position in the biplot graph (Figure 4).
The stable isotope analyses revealed that energetic contributions of pelagic prey to fishes in littoral habitats were of minor importance despite the stomach content analysis that indicated otherwise. For example, ANOSIM demonstrated that there were no statistical differences in diet selection between pelagic fish and early juvenile fish from SAV or fishes from open-water shoals. In most cases, zooplankton accounted for the highest IRI of the fishes in these groups, yet IsoSource modeled zooplankton to be of primary nutrition to only early juvenile largemouth bass and black crappies at MI (2000) and Mississippi silversides at VCI and MI (2000). The discrepancy between the two approaches underscores how stomach contents can be poor estimators of longer-term feeding patterns, especially for age-0 fishes that can undertake dramatic shifts in their δ13C signatures when switching from zooplankton to littoral or benthic prey (Vander Zanden et al. 1998).
As previously noted, the stable isotope signatures of SAV and epiphytic macroalgae were not unique from each other in the Cloern et al. (2002) data, but they were distinct from phytoplankton-rich seston and other primary producers (e.g., emergent and terrestrial vegetation), allowing for discrimination of an alternative energy source for consumers. Many studies show that invertebrates actually graze on the epiphytic macroalgae of SAV rather than on the SAV itself (Kitting et al. 1984; Duffy and Harvilicz 2001; Moncrieff and Sullivan 2001), but discrimination to this level of detail was beyond the scope of this study. Note that the filamentous algae measured in our study had enriched δ13C signatures (mean = −17.09‰ at VCI; mean = −16.58‰ at SI), suggesting it as a possible energy source for consumers in littoral habitats. However, we deemphasize its importance since it was only present in small quantities and likely represented a small fraction of the primary producer biomass available for energy conversion.
The importance of algal-grazer food webs is well documented in littoral systems (Fry 1981; Kitting et al. 1984; Duffy and Harvilicz 2001); however, only a few estuarine studies have linked SAV or epiphytic macroalgae as the major energy source for such a large contingency of fishes as we did here (Paterson and Whitfield 1997). The grazer amphipods Gammarus daiberi and Hyalella azteca were the primary intermediaries between SAV–epiphytic macroalgae derived energy and fish diets in SAV. For late juvenile fishes, grazer amphipods were dominant in their stomachs and modeled to be their primary source of nutrition, indicating they were at dietary equilibrium (i.e., consumption to absorption). As previously noted, some early juvenile fishes from SAV had high IRIs for zooplankton (Figure 3), but overall their modeled sources of nutrition were dominantly influenced by grazer amphipods or snails (redear sunfish from VCI). This suggests that either grazer amphipods or snails were consumed at higher rates than reflected by the fishes' diets or that small contributions of these prey, which are heavier than zooplankton, can overwhelm the δ13C signature in the muscle tissue of the fishes. Additional work could be done to address such isotopic variability issues (Vander Zanden and Rasmussen 2001) or the variability in diets resulting from seasonal changes in food composition (Howe and Simenstad 2007), but we suspect that fishes in SAV would show little deviance from diet patterns observed here given that their habitat is highly structured and probably receives little food subsidies from adjacent habitats.
Several studies have shown that fishes in intertidal habitats typically time their feeding coincident with tides that promote access to prey in adjacent habitats (Weisberg et al. 1981; Kneib 1984, 1987; Madon et al. 2001). Such tide-dependent foraging could lead to great variability in the daily composition of food consumed by open-water fishes. Therefore, we are not surprised to see a divergence between diets inferred by stomach contents and stable isotopes for fishes in open-water shoals. For example, splittails and rainwater killifish had high IRIs for pelagic prey, but their mean δ13C signatures were less than −20‰ and IsoSource modeled amphipods with enriched δ13C signatures to be their dominant prey. Food resources from SAV could also be inferred for omnivorous species, such as the golden shiner and hitch, which had mean δ13C signatures less than −21‰. Based on the enriched δ13C signatures of most consumers in open-water shoals, a terrestrial- or marsh-derived food web pathway is not substantiated (Kwak and Zedler 1997; Howe and Simenstad 2007). Rather, our findings highlight the importance of energy imports from adjacent SAV as the primary subsidy to consumers in open-water shoals (Hyndes and Lavery 2005; Melville and Connolly 2005; Cardona et al. 2007).
As demonstrated by the ANOSIM and SIMPER analysis, fishes in open-water shoals consumed more chironomid pupae than did late juvenile fishes in SAV. The importance of chironomid pupae to the stomachs and muscle tissues of open-water fishes was most apparent for Mississippi silversides and Chinook salmon. For example, chironomid pupae accounted for the second-highest IRI in the stomachs of these species and were modeled by IsoSource to be the primary food source of untagged Chinook salmon (VCI) and Mississippi silversides at MI (1999). Sommer et al. (2001) found that chironomid pupae were the dominant prey of Chinook salmon in the Yolo Bypass floodplain upstream of the Delta, suggesting that there is a continuum in this prey selection between upstream and estuarine habitats. Interestingly, chironomid pupae are typically suspension feeders (Thorp and Covich 2001), but IsoSource modeled their energy as mostly arising from primary producers with enriched δ13C signatures at VCI. Because chironomid pupae were represented in many of the fish diets, resolving the importance of detrital energy in its assimilated energy could be helpful for understanding the role of the microbial loop to upper consumers in the food web (Sobczak et al. 2002; Howe and Simenstad 2007).
Hatchery Chinook salmon were on average 3‰ more depleted in δ13C and δ15N than untagged Chinook salmon, but their stomach contents were nearly identical. The isotopic differences between untagged and hatchery fish are probably best explained by the influence of the hatchery feed in the muscle tissues of hatchery fish, which were released in the Delta just 4 weeks prior to their capture (P. Cadrett, U.S. Fish and Wildlife Service, personal communication).
During the 1960s, mysid shrimp Neomysis mercedis and Corophium spp. were the dominant prey consumed by centrarchids in the Delta (Turner 1966a). We did not find any mysid shrimp in the stomachs of centrarchids, and only black crappies consumed Corophium spp. more frequently than Gammarus daiberi and Hyalella azteca. Gammarus daiberi was first detected in the Delta in 1983 and is now one of the most dominant amphipods in the Delta (California Department of Water Resources 2008). In contrast, mysid shrimp abundance has diminished to scant levels in the Delta since the overbite clam Corbula amurensis invaded the lower estuary and effectively wiped out pelagic phytoplankton, the major food resource for mysids (Orsi and Mecum 1996). The food sources used by centrarchids in this study (grazer amphipods) versus those sources consumed in the 1960s (i.e., mysids and Corophium; Turner 1966a) suggest that there has been a dramatic shift in energy flow in these species and perhaps other nearshore consumers. Feyrer et al. (2003) documented a dietary shift from mysids to amphipods for many fishes in the lower estuary between the 1980s and 2000s. This apparent shift to grazer amphipods may partially explain why centrarchids in the Delta have increased in abundance over the last two decades (Brown and Michniuk 2007), whereas declines in pelagic production have apparently had adverse consequences for pelagic fish populations in the estuary (Sommer et al. 2007).
Restoration planning for the Delta has emphasized creation of shallow habitat in the belief that such areas would support native fishes (Brown 2003; CALFED Bay–Delta Authority 2004). Our study and others (Feyrer and Healey 2003; Toft et al. 2003; Grimaldo et al. 2004; Nobriga et al. 2005; Nobriga and Feyrer 2007) show that native and introduced fishes in the Delta use a variety of habitats and that their trophic pathways vary with their body size and prey selection. Others have shown that physical habitat for native fishes can also be defined by water quality conditions (Feyrer et al. 2007) or some measure of freshwater inflow (Kimmerer 2002a, 2002b). Thus, no single habitat template or food source can be expected to benefit all native fishes.
Restoration efforts should focus on processes that govern predation, bioenergetics (i.e., growth, feeding, etc), and trophic relationships (Zedler et al. 1997; Madon et al. 2001; Madon 2008). For example, we found that open-water shoals supported the most native species (three), but the mechanisms that would explain their importance for native fishes are not clear. In other estuaries, intertidal shoals are key habitats where fishes reside to gain access to marsh plains during flood tides (Weisberg et al. 1981; Kneib 1984; Madon et al. 2001) or to escape predators from deep subtidal waters (Kneib 1987) or adjacent SAV habitats (Rozas and Odum 1988). We believe that creation of open-water shoals would promote native fish use in littoral areas; however, companion research on the functions of this habitat are needed to address uncertainty associated with long-term sustainability of this habitat and native fish populations in the estuary (Kwak and Zedler 1997; Madon 2008).
In the southeastern U.S. estuaries, SAV restoration is studied and promoted in regional management plans because it provides valuable habitat for many native invertebrates and fishes in those ecosystems (Orth et al. 1984; Rozas and Odum 1987; Rozas et al. 2005; Baldizar and Rybicki 2007). However, in the San Francisco Estuary, Brazilian waterweed and other introduced species of SAV are considered a nuisance because they impede recreational boat traffic, clog water diversions, and provide little or no economic value (California Department of Boating and Waterways 2000). Biologically, the Brazilian waterweed may be considered an ecosystem engineer (Jones et al. 1994) because it has altered the physical environment of the estuary, which in turn has had direct and indirect consequences for native fish populations in the estuary (Brown 2003; Nobriga et al. 2005; Brown and Michniuk 2007; Feyrer et al. 2007). Here, we show that Brazilian waterweed supports invertebrates that are important energy sources for fishes in the Delta. It also supports an abundance of habitat (i.e., leaves and stems) for epiphytic macroalgae, which along with the plant itself, play an important role in the basal source of energy supporting littoral food webs. By all accounts, Brazilian waterweed is well established and unlikely to be eradicated from the Delta. Thus, restoration projects may want to consider conditions that promote it in smaller patch sizes that provide the greatest enhancement to native species dependent on edge or open-water habitats. In many ecosystems, relationships between SAV patch size and fish or invertebrate communities are well understood (Werner et al. 1983; Rozas and Odum 1988; Thorp et al. 1997); such relationships have yet to be revealed in the Delta, where mixes of native and introduced species dominate (Brown 2003).
Finally, there is very little evidence that flooded islands support native pelagic fishes (delta smelt Hypomesus transpacificus and longfin smelt Spirinchus thaleichthys; Grimaldo et al. 2004; Nobriga et al. 2005). Much of the justification for restoring flooded islands hinged on the premise that such areas would provide beneficial habitat for imperiled smelts, but these species are often found in the tidally dominated open waters and channels of the Delta (Grimaldo et al. 2004; Rockriver 2004). Deep, flooded islands such as MI are productive areas (Lucas et al. 2002; Mueller-Solger et al. 2002; Lopez et al. 2006) that support large numbers of zooplankton and pelagic fishes (Grimaldo et al. 2004). Therefore, viable restoration alternatives for pelagic fishes could involve altering flooded island breach designs to allow maximum export of lower trophic production to larger channels in the Delta, where it can be incorporated into the pelagic food web.
We gratefully acknowledge the Interagency Ecological Program and CALFED Bay–Delta Science program for funding and project support. Data provided by Jim Cloern were instrumental for the interpretation of our results. We thank Ryon Kurth, Eric Santos, Alicia Seesholtz, Jody Sears, Chris Peregrin, Robert Miller, Tanya Veldhuizen, Cindy Messer, Bill Harrell, and Janet Thompson for field assistance. We thank Rosa Laucci, Gavin O Leary, Steve Zeug, and Wayne Fields for laboratory assistance and insect identifications and Dave Harris for running the stable isotope samples. We thank Ted Sommer, Matt Nobriga, Fred Feyrer, Janet Thompson, James Cloern, Elizabeth Canuel, and Anke Mueller-Solger for valuable study design input and assistance. This article was improved through the thoughtful suggestions of anonymous peer reviewers.
B. F. Atwater, S. G. Conard, J. N. Dowden, C. W. Hedel, R. L. MacDonald, and W. Savage . 1979. History, landforms, and vegetation of the estuary's tidal marshes. Pages 347–385. in T. J. Conomos San Francisco Bay: the urbanized estuary. Pacific Division of the American Association for the Advancement of Science. San Francisco. Google Scholar
J. Baldizar and N. B. Rybicki . 2007. Restoration potential of submerged aquatic vegetation in the tidal Pocomoke River (Chesapeake Bay, USA). Ecological Restoration 25:138–139. Google Scholar
L. R. Brown 2003. Will tidal wetland restoration enhance populations of native fishes? In L. R. Brown Issues in San Francisco Estuary tidal wetlands restoration. San Francisco Estuary and Watershed Science Available: http://repositories.cdlib.org. (May 2007). Google Scholar
L. R. Brown and D. Michniuk . 2007. Littoral fish assemblages of the alien-dominated Sacramento–San Joaquin Delta, California 1980–1983 and 2001–2003. Estuaries and Coasts 30:186–200. Google Scholar
CALFED Bay–Delta Authority. 2004. CALFED Bay–Delta program ecosystem restoration multi-year program plan (Years 5–8). California Bay–Delta Authority. Sacramento. Google Scholar
California Department of Boating and Waterways. 2000. Draft Environmental Impact Report for the E. densa Control Program, volume I. Prepared by the California Department of Boating and Waterways with consultation from the California Department of Water Resources. Environmental Services Office and NewPoint Group Management Consultants, Sacramento, California. Google Scholar
California Department of Water Resources. 2008. Water quality conditions in the Sacramento–San Joaquin Delta and Suisun and San Pablo Bays during 2006. Report to the State Water Resources Control Board in accordance with Water Right Decision 1641. Department of Water Resources. Sacramento, California. Google Scholar
E. A. Canuel, J. E. Cloern, D. B. Ringelberg, J. B. Guckert, and G. H. Rau . 1995. Molecular and isotopic tracers used to examine sources of organic matter and its incorporation into the food webs of San Francisco Bay. Limnology and Oceanography 40:67–81. Google Scholar
L. Cardona, M. Revelles, M. Sales, A. Aguilar, and A. Borrell . 2007. Meadows of the seagrass Posidonia oceanic are a significant source of organic matter for adjoining ecosystems. Marine Ecology Progress Series 335:123–131. Google Scholar
J. P. Chanton and G. Lewis . 2002. Examination of coupling between primary and secondary production in a river-dominated estuary: Apalachicola Bay, Florida, USA. Limnology and Oceanography 47:683–697. Google Scholar
K. R. Clarke 1993. Nonparametric multivariate analyses of changes in community structure. Australian Journal of Ecology 18:117–143. Google Scholar
J. E. Cloern, E. A. Canuel, and D. Harris . 2002. Stable carbon and nitrogen isotope composition of aquatic and terrestrial plants of the San Francisco Bay estuarine system. Limnology and Oceanography 47:713–729. Google Scholar
A. N. Cohen and J. T. Carlton . 1998. Accelerating invasion rate in a highly invaded estuary. Science 279:555–558. Google Scholar
L. A. Deegan and R. H. Garritt . 1997. Evidence for spatial variability in estuarine food webs. Marine Ecology Progress Series 147:31–47. Google Scholar
M. J. DeNiro and S. Epstein . 1978. Influence of diet on the distribution of carbon isotopes in animals. Geochimica et Cosmochimica Acta 42:495–506. Google Scholar
J. E. Duffy and A. M. Harvilicz . 2001. Species-specific impacts of grazing amphipods in an eelgrass-bed community. Marine Ecology Progress Series 223:201–211. Google Scholar
F. Feyrer and M. Healey . 2003. Fish community structure and environmental correlates in the highly altered southern Sacramento–San Joaquin Delta. Environmental Biology of Fishes 66:123–132. Google Scholar
F. Feyrer, B. Herbold, S. A. Matern, and P. B. Moyle . 2003. Dietary shifts in a stressed fish assemblage: consequences of a bivalve invasion in the San Francisco Estuary. Environmental Biology of Fishes 67:277–288. Google Scholar
F. Feyrer, M. L. Nobriga, and T. R. Sommer . 2007. Multi-decadal trends for three declining fish species: habitat patterns and mechanisms in the San Francisco Estuary, California, USA. Canadian Journal of Fisheries and Aquatic Sciences 64:723–734. Google Scholar
B. Fry 1981. Natural stable isotope tag traces Texas shrimp migrations. U.S. National Marine Fisheries Service Fishery Bulletin 79:337–345. Google Scholar
C. C. Garman and S. A. Macko . 1998. Contribution of marine-derived organic matter to an Atlantic coast, freshwater, tidal stream by anadromous clupeid fishes. Journal of the North American Benthological Society 17:277–285. Google Scholar
L. F. Grimaldo, R. E. Miller, C. M. Peregrin, and Z. P. Hymanson . 2004. Spatial and temporal distribution of ichthyoplankton in three habitat types of the Sacramento–San Joaquin Delta. Pages 81–96. in F. Feyrer, L. R. Brown, R. L. Brown, and J. J. Orsi . Early life history of fishes in the San Francisco Estuary and watershed. American Fisheries Society. Symposium 39,. Bethesda, Maryland. Google Scholar
R. E. Hecky and R. H. Hesslein . 1995. Contributions of benthic algae to lake food webs as revealed by stable isotope analysis. Journal of the North American Benthological Society 14:631–653. Google Scholar
J. C. Hoffman, D. A. Bronk, and J. E. Olney . 2007. Contribution of allochthonous carbon to American shad production in the Mattaponi River, Virginia using stable isotopes. Estuaries and Coasts 30:1034–1048. Google Scholar
R. W. Howarth, R. Schneider, and D. Swany . 1996. Metabolism and organic carbon fluxes in the tidal freshwater Hudson River. Estuaries 19:848–865. Google Scholar
E. R. Howe and C. A. Simenstad . 2007. Restoration trajectories and food web linkages in San Francisco Bay's estuarine marshes: a manipulative translocation experiment. Marine Ecology Progress Series 351:65–76. Google Scholar
G. A. Hyndes and P. S. Lavery . 2005. Does transported seagrass provide an important trophic link in unvegetated, nearshore areas? Estuarine, Coastal, and Shelf Science 63:633–643. Google Scholar
A. D. Jassby and J. E. Cloern . 2000. Organic matter sources and rehabilitation of the Sacramento–San Joaquin Delta (California, USA). Aquatic Conservation: Marine and Freshwater Ecosystems 10:323–352. Google Scholar
A. D. Jassby, J. E. Cloern, and B. E. Cole . 2002. Annual primary production: patterns and mechanisms of change in a nutrient-rich tidal ecosystem. Limnology and Oceanography 47:698–712. Google Scholar
C. G. Jones, J. H. Lawton, and M. Shachak . 1994. Organisms as ecosystem engineers. Oikos 69:373–386. Google Scholar
W. J. Kimmerer 2002a. Effects of freshwater flow on abundance of estuarine organisms: physical effects or trophic linkages? Marine Ecology Progress Series 243:39–55. Google Scholar
W. J. Kimmerer 2002b. Physical, biological, and management responses to variable freshwater flow into the San Francisco Estuary. Estuaries 25:1275–1290. Google Scholar
W. J. Kimmerer 2006. Response of anchovies dampens food web responses to an invasive bivalve (Corbula amurensis) in the San Francisco Estuary. Marine Ecology Progress Series 324:207–218. Google Scholar
C. L. Kitting, B. Fry, and M. D. Morgan . 1984. Detection of inconspicuous epiphytic algae supporting food webs in seagrass meadows. Oecologia 62:145–149. Google Scholar
R. T. Kneib 1984. Patterns in the utilization of the intertidal salt marsh by larvae and juveniles of Fundulus heteroclitus (Linnaeus) and Fundulus luciae (Baird). Journal of Experimental Marine Biology and Ecology 83:41–51. Google Scholar
R. T. Kneib 1987. Predation risk and use of intertidal habitats by young fishes and shrimp. Marine Ecology Progress Series 94:115–127. Google Scholar
T. J. Kwak and J. B. Zedler . 1997. Food web analysis of southern California coastal wetlands using multiple stable isotopes. Oecologia 110:262–277. Google Scholar
K. Lajtha and R. H. Michener . 1994. Stable isotopes in ecology and environmental science. Blackwell Scientific Publications. Cambridge, Massachusetts. Google Scholar
H. S. Liao, C. L. Pierce, and J. G. Larscheid . 2001. Empirical assessment of indices of prey importance in the diets of predacious fish. Transactions of the American Fisheries Society 130:583–591. Google Scholar
C. B. Lopez, J. E. Cloern, T. S. Schraga, A. J. Little, L. V. Lucas, J. K. Thompson, and J. R. Burau . 2006. Ecological values of shallow-water habitats: implications for restoration of disturbed ecosystems. Ecosystems 9:422–440. Google Scholar
L. V. Lucas, J. E. Cloern, J. K. Thompson, and N. E. Monsen . 2002. Functional variability of habitats within the Sacramento–San Joaquin Delta: restoration implications. Ecological Applications 12:1528–1547. Google Scholar
S. P. Madon 2008. Fish community responses to ecosystem stressors in coastal estuarine wetlands: functional basis for wetlands management and restoration. Wetlands Ecology and Management 16:219–236. Google Scholar
S. P. Madon, G. D. Williams, J. M. West, and J. B. Zedler . 2001. The importance of marsh access to growth of the California killifish, Fundulus parvipinnis, evaluated through bioenergetics modeling. Ecological Modelling 136:149–165. Google Scholar
A. J. Melville and R. M. Connolly . 2005. Food webs supporting fish over subtropical mudflats are based on transported organic matter not in situ microalgae. Marine Biology 148:363–371. Google Scholar
M. Minagawa and E. Wada . 1984. Stepwise enrichment of 15N along food chains: further evidence and the relation between d 15N and animal age. Geochimica et Cosmochimica Acta 48:1135–1140. Google Scholar
C. A. Moncrieff and M. J. Sullivan . 2001. Trophic importance of epiphytic macroalgae in subtropical seagrass beds: evidence from multiple stable isotope analyses. Marine Ecology Progress Series 215:93–106. Google Scholar
J. Mount and R. Twiss . 2005. Subsidence, sea level rise, and seismicity in the Sacramento–San Joaquin Delta. San Francisco Estuary and Watershed Science Available: http://repositories.cdlib.org. (May 2008). Google Scholar
A. Mueller-Solger, A. D. Jassby, and D. Mueller-Navarra . 2002. Nutritional value of particulate organic matter for zooplankton (Daphnia) in a tidal freshwater system Sacramento–San Joaquin Delta, USA. Limnology and Oceanography 47:1468–1476. Google Scholar
F. H. Nichols, J. E. Cloern, S. N. Luoma, and D. H. Peterson . 1986. The modification of an estuary. Science 231:567–573. Google Scholar
M. Nobriga and F. Feyrer . 2007. Shallow-water piscivore-prey dynamics in the Sacramento–San Joaquin Delta. San Francisco Estuary and Watershed Science Available http://repositories.cdlib.org. (June 2008). Google Scholar
M. Nobriga, F. Feyrer, R. Baxter, and M. Chotkowski . 2005. Fish community ecology in an altered river delta: spatial patterns in species composition, life history strategies, and biomass. Estuaries 28:776–785. Google Scholar
W. E. Odum and E. J. Heald . 1975. The detritus-based food web of an estuarine mangrove community. Pages 265–286. in M. Wiley Estuarine research, volume 1. Academic Press. New York. Google Scholar
W. E. Odum, E. P. Odum, and H. T. Odum . 1995. Nature's pulsing paradigm. Estuaries 18:547–555. Google Scholar
J. J. Orsi and W. L. Mecum . 1996. Food limitation as the probable cause of a long term decline in the abundance of Neomysis mercedis the opossum shrimp in the Sacramento–San Joaquin estuary. Pages 375–401. in J. T. Hollibaugh San Francisco Bay: the ecosystem. American Association for the Advancement of Science. San Francisco. Google Scholar
R. J. Orth, K. L. Heck Jr., and J. van Montfrans . 1984. Faunal communities in seagrass beds: a review of the influence of plant structure and prey characteristics on predator-prey relationships. Estuaries 7:339–50. Google Scholar
H. M. Page 1997. Importance of vascular plant and algal production to macro-invertebrate consumers in a southern California salt marsh. Estuarine, Coastal, and Shelf Science 45:823–834. Google Scholar
A. W. Paterson and A. K. Whitfield . 1997. A stable carbon isotope study of the food-web in a freshwater-deprived South African estuary, with particular emphasis on the ichthyofauna. Estuarine, Coastal, and Shelf Science 45:705–715. Google Scholar
D. L. Phillips and J. W. Gregg . 2001. Uncertainty in source partitioning using stable isotopes. Oecologia 127:171–179. Google Scholar
D. L. Phillips and J. W. Gregg . 2003. Source partitioning using stable isotopes: coping with too many sources. Oecologia 136:261–269. Google Scholar
D. L. Phillips, S. D. Newsome, and J. W. Gregg . 2005. Combining sources in stable isotope mixing models: alternative methods. Oecologia 144:520–527. Google Scholar
L. Pinkas, M. S. Oliphant, and I. L. K. Iverson . 1971. Food habits of albacore, bluefin tuna, and bonito in California water. California Department of Fish and Game Fish Bulletin 152. Google Scholar
D. J. Reed 2002. Understanding tidal marsh sedimentation in the Sacramento–San Joaquin Delta, California. Journal of Coastal Research 36:605–611. Google Scholar
A. K. Rockriver 2004. Vertical distribution of larval delta smelt and striped bass near the confluence of the Sacramento and San Joaquin rivers. Pages 281–295. in F. Feyrer, L. R. Brown, R. L. Brown, and J. J. Orsi . Early life history of fishes in the San Francisco estuary and watershed. American Fisheries Society. Symposium 39,. Bethesda, Maryland. Google Scholar
L. P. Rozas, T. J. Minello, I. Munuera-Fernández, B. Fry, and B. Wissel . 2005. Macrofaunal distributions and habitat change following winter–spring releases of freshwater into the Breton Sound Estuary, Louisiana (USA). Estuarine, Coastal, and Shelf Science 65:319–336. Google Scholar
L. P. Rozas and W. E. Odum . 1987. Fish and macrocrustacean use of submerged plant beds in tidal freshwater marsh creeks. Marine Ecology Progress Series 38:101–108. Google Scholar
L. P. Rozas and W. E. Odum . 1988. Occupation of submerged aquatic vegetation by fishes: testing the roles of food and refuge. Oecologia 77:101–106. Google Scholar
W. V. Sobczak, J. E. Cloern, A. D. Jassby, B. E. Cole, T. S. Schraga, and A. Arnsburg . 2005. Detritus fuels metabolism but not metazoan food web in San Francisco Estuary's freshwater Delta. Estuaries 28:124–137. Google Scholar
W. V. Sobczak, J. E. Cloern, A. D. Jassby, and A. Mueller-Solger . 2002. Bioavailability of organic matter in a highly disturbed estuary: the role of detrital and algal resources. Proceedings of the National Academy of Sciences of the United States of America 99:8101–8105. Google Scholar
T. Sommer, C. Armor, R. Baxter, R. Breuer, L. Brown, M. Chotkowski, S. Culberson, F. Feyrer, M. Gingras, B. Herbold, W. Kimmerer, A. Mueller-Solger, M. Nobriga, and K. Souza . 2007. The collapse of pelagic fishes in the upper San Francisco Estuary. Fisheries 32 (6):270–277. Google Scholar
T. Sommer, M. L. Nobriga, B. Harrell, W. Batham, and W. J. Kimmerer . 2001. Floodplain rearing of juvenile Chinook salmon: evidence of enhanced growth and survival. Canadian Journal of Fisheries and Aquatic Sciences 58:325–333. Google Scholar
A. R. Stewart, S. N. Luoma, C. E. Schlekat, M. A. Dobin, and K. A. Hieb . 2004. Food web pathway determines how selenium affects aquatic ecosystems: a San Francisco Bay case study. Environmental Science and Technology 38:4519–4526. Google Scholar
J. M. Teal 1962. Energy flow in the salt marsh ecosystem of Georgia. Ecology 43:614–624. Google Scholar
J. H. Thorp and A. P. Covich . 2001. Ecology and classification of North American freshwater invertebrates, 2nd edition. Academic Press. San Diego, California. Google Scholar
J. H. Thorp, R. C. Jones, and D. P. Kelso . 1997. A comparison of water-column macroinvertebrate communities in beds of differing submersed aquatic vegetation in the tidal freshwater Potomac River. Estuaries 20:86–95. Google Scholar
J. D. Toft, C. A. Simenstad, J. R. Cordell, and L. F. Grimaldo . 2003. The effects of water hyacinth on habitat structure, invertebrate assemblage, and fish diets. Estuaries 26:746–758. Google Scholar
J. L. Turner 1966a. Distribution and food habits of centrarchid fishes in the Sacramento–San Joaquin Delta. California Department of Fish and Game Fish Bulletin 136:144–153. Google Scholar
J. L. Turner 1966b. Distribution of threadfin shad, Dorosoma petenense, tule perch, Hysterocarpus traskii, and crayfish spp. in the Sacramento–San Joaquin Delta. California Department of Fish and Game Fish Bulletin 136:160–168. Google Scholar
M. J. Vander Zanden, M. Hushof, M. S. Ridgeway, and J. B. Rasmussen . 1998. Application of stable isotope techniques to trophic studies of age-0 smallmouth bass. Transactions of the American Fisheries Society 127:729–739. Google Scholar
M. J. Vander Zanden and J. B. Rasmussen . 2001. Variation in d15N and 13C trophic fractionation: implications for aquatic food web studies. Limnology and Oceanography 46:2061–2066. Google Scholar
S. Vizzini, G. Sara, R. H. Michener, and A. Mazzola . 2002. The role and contribution of the seagrass Posidonia oceanica (L.) Delile organic matter for secondary consumers as revealed by carbon and nitrogen stable isotope analysis. Oecologia 23:277–285. Google Scholar
S. B. Weisberg, R. Whalen, and V. A. Lotrich . 1981. Tidal and diurnal influence on food consumption of a salt marsh killifish Fundulus heteroclitus. Marine Biology 61:243–246. Google Scholar
E. E. Werner, J. F. Gilliam, D. J. Hall, and G. G. Mittelbach . 1983. An experimental test of the effects of predation risk on habitat use in fish. Ecology 64:1540–1548. Google Scholar
J. B. Zedler, G. D. Williams, and J. S. Desmond . 1997. Wetland mitigation: can fishes distinguish between natural and constructed wetlands? Fisheries 22 (3):26–28. Google Scholar
Map of the San Francisco Estuary and Sacramento–San Joaquin Delta, California. The study sites are Sherman, Mildred, and Venice Cut islands. Breach locations were either planned (P) for channel modification or accidentally (A) opened during a levee failure.
Upper and lower standard deviations (dashed lines) of primary producer stable isotopes (δ13C and δ15N) in the Sacramento–San Joaquin Delta. Data represent (A) those calculated from a subset of freshwater primary producers measured by Cloern et al. (2002) and (B) those measured in this study (EM = epiphytic macroalgae; SAV = submerged aquatic vegetation; EV = emergent vegetation; F = floating aquatic vegetation; TV = terrestrial vegetation; FA = filamentous algae, for which black circles = Sherman Island and black triangles = Venice Cut Island; S = phytoplankton-rich seston). Shading represents significantly different groups (see text for details).
Percent index of relative importance (% IRI) of diet items identified in the stomach contents of fishes collected from three habitats in the Sacramento–San Joaquin Delta: (A) fishes collected in pelagic (P) and open-water shoals (OWS); and (B) fishes collected in submerged aquatic vegetation. Data were pooled across study sites from 2,000 collections (AS = American shad; B = bluegill; BC = black crappie; CS = Chinook salmon; LB = largemouth bass; MS = Mississippi silverside; P = prickly sculpin; RK = rainwater killifish; RS = redear sunfish; S = splittail; SB = striped bass; SG = shimofuri goby; YG = yellowfin goby). Life stage codes (EJ, LJ, SA, A) and status codes (H, UT) are defined in Table 2.
Mean stable isotope (δ13C and δ15N) ratios (±SD) of consumers distinguished by functional groups for each study site in the Sacramento–San Joaquin Delta (SI = Sherman Island; MI = Mildred Island; VCI = Venice Cut Island). Invertebrates were grouped by their general feeding modes (open circles = suspension feeders; black circles = grazers/predators). Fishes were grouped by habitat and life stage (submerged aquatic vegetation [SAV] only; open squares = pelagic; gray triangles = open-water shoal; X-symbols = early juvenile SAV; black diamonds = late juvenile SAV).
Summary of consumers collected in the Sacramento–San Joaquin Delta for food web analysis. Samples were collected at one study site in fall 1999 and at three study sites in summer 2000. Consumer origin is indicated: native (N), introduced (I), or unknown (U). Organisms were collected in pelagic (P) and littoral areas, including open-water shoals (OWS) or submerged aquatic vegetation (SAV). The feeding mode of invertebrates are provided in parentheses (SF = suspension feeding, G = grazing, and P = predatory). The total number of samples (NS) pooled across sites and total number of individuals (NI) collected are provided.
Mean (±SD) stable isotope (δ13C and δ15N) signatures of invertebrates and fishes by study site in the Sacramento–San Joaquin Delta. Life stage is designated as early juvenile (EJ; fork length [FL] < 50 mm), late juvenile (LJ; FL = 50–99 mm), and subadult/adult (SA/A; FL > 100 mm). Chinook salmon were either hatchery (H) or untagged (UT). Zooplankton samples from Mildred Island (MI; 2000) were used for Venice Cut Island (VCI).
Extended.
Mean contribution (%) of enriched (>−27‰ δ13C) and depleted (<−27‰ δ13C) primary producers to the carbon assimilated by invertebrates as determined by IsoSource for three sites in the Sacromento–San Joaquin Delta (MI = Mildred Island; VCI = Venice Cut Island; SI = Sherman Island). Values in parentheses are the ranges of possible solutions. Feeding modes (FM) are defined in Table 1. The mean δ13C signatures of invertebrates and primary producers were used except in cases where standard deviations were applied to allow feasible solutions. Empty cells indicate where invertebrates were absent from field collections. In one case, no solution (ns) could be found.
Mean contribution (%) of invertebrates to the muscle tissues of fishes as determined by IsoSource for three sites in the Sacramento–San Joaquin Delta (MI = Mildred Island; VCI = Venice Cut Island; SI = Sherman Island). Invertebrates are distinguished by their relative δ13C signatures from each site. Values in parentheses are the ranges of possible solutions. The mean δ13C and δ15N signatures of fishes and invertebrates were used except in cases where standard deviations were applied to find feasible solutions. Sources were selected a priori from the stomach content analysis: zooplankton (Z); chironomid pupae (CP); Asiatic clams (C); Corophium spp. (CO); grazer amphipods (GA, Gammarus daiberi and/or Hyallella azteca); Zygoptera (ZY), and snails (S). Based on the stomach content analysis, contributions of rare prey (≤5% index of relative importance) were constrained to the most dominant prey item to reflect realistic feeding patterns. Habitat codes are defined in Table 1. Life stage codes are defined in Table 2.
Lenny F. Grimaldo, A. Robin Stewart, and Wim Kimmerer "Dietary Segregation of Pelagic and Littoral Fish Assemblages in a Highly Modified Tidal Freshwater Estuary," Marine and Coastal Fisheries: Dynamics, Management, and Ecosystem Science 2009(2009), 200-217, (24 August 2009). https://doi.org/10.1577/C08-013.1
Received: 10 July 2008; Accepted: 29 March 2009; Published: 24 August 2009
Lenny F. Grimaldo, A. Robin Stewart, Wim Kimmerer "Dietary Segregation of Pelagic and Littoral Fish Assemblages in a Highly Modified Tidal Freshwater Estuary," Marine and Coastal Fisheries: Dynamics, Management, and Ecosystem Science, 2009(2009), 200-217, (24 August 2009)

redpajama_set_name: RedPajamaCommonCrawl


text:
/*
 * =====================================================================================
 *
 *       Filename:  encore.cpp
 *
 *    Description:  Encore - A computational framework for analysis of GWAS and other
 *                  biological data
 *
 *					Includes epistasis interaction analysis (reGAIN), eigenvector
 *					centrality SNP ranking (SNPrank), and feature selection using the
 *					Evaporative Cooling machine learning tool.  Encore also utilizes
 *					plink for its ubiquitous data formats and wide array of GWAS
 *					functionality.
 *
 *        Created:  02/01/2012
 *
 *         Author:  Nick Davis, nick-davis@utulsa.edu
 *
 * =====================================================================================
 */

#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <boost/program_options.hpp>
#include <boost/program_options/positional_options.hpp>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>

#include "ec/Insilico.h"
#include "ec/EvaporativeCooling.h"
#include "plink/plinklibhandler.h"
#include "plink/options.h"
#include "plink/helper.h"
#include "plink/stats.h"

#include "snprank.h"
#include "regain.h"

using namespace boost;
namespace po = boost::program_options;

int main(int argc, char* argv[]) {
	// command line variables
	// data files
	string infile = "";
	string outfile_pref = "encore";
	string numfile = "";
	string covarfile = "";
	string phenofile = "";
	string extrfile = "";
	string remfile = "";
	string keepfile = "";
	string exclfile = "";
	// single numeric file without accompayning SNP
	bool numonly = false;
	// plink option defaults
	string miss_geno = "0";
	double ci = 0.95;
	double maf = 0.0;
	double geno = 1;
	double mind = 1;
	double hwe = 0.001;
	double hwe2 = 0.001;
	//snprank
	double gamma = 0.85;
	// reGAIN
	double sif_thresh = 0.05;
	double fdr = 0.5;
	// EC
	string ec_algo = "all";
	string ec_sm = "gm";
	int ec_numt = 0;

	po::options_description desc("Encore - a tool for analysis of GWAS and other "
			"biological data.\nUsage:  encore -i snpdata.ped [mode] -o output-prefix");
	desc.add_options()
		("input-file,i", po::value<string>(&infile),
		 "Input GWAS file (.bed or .ped) or GAIN/reGAIN matrix (tab- or comma-separated)"
		)
		("output-prefix,o", po::value<string>(&outfile_pref),
		 "Prefix to use for all output files"
		)
		("numeric,n", po::value<string>(&numfile),
		 "Numeric file for quantitative data (uses PLINK covariate file format)"
		)
		("data-summary,d",
		 "Simply print input file stats (for PLINK .ped/.bed files) *mode*"
		)
		("snprank,s",
		 "Perform SNPrank analysis *mode*"
		)
			("gamma", po::value<double>(&gamma)->default_value(0.85, "0.85"),
			 "SNPrank algorithm damping factor"
			)
		("gain,g",
		 "Calculate GAIN *mode*"
		)
		("regain,r",
		 "Calculate regression GAIN *mode*"
		)
			("component-matrices",
			 "Write component reGAIN matrices for integrative analyses"
			)
			("compress-matrices",
			 "Write binary (compressed) reGAIN matrices"
			)
			("sif-threshold", po::value<double>(&sif_thresh)->default_value(0.05, "0.05"),
			 "Numerical cutoff for SIF file (generated by reGAIN) interaction scores"
			)
			("fdr-prune",
			 "FDR prune reGAIN interaction terms"
			)
			("fdr", po::value<double>(&fdr)->default_value(0.5, "0.5"),
			 "FDR value for BH method applied to reGAIN"
			)
		("ec,e",
		 "Perform Evaporative Cooling (EC) analysis *mode*"
		)
			("ec-algorithm", po::value<string>(&ec_algo),
			 "EC ML algorithm (all|rf|rj)"
			)
			("ec-snp-metric", po::value<string>(&ec_sm),
			 "EC SNP metric (gm|am)"
			)
			("ec-num-target", po::value<int>(&ec_numt),
			 "EC target number of attributes to keep"
			)
		("extract", po::value<string>(&extrfile),
		 "Extract list of SNPs from specified file"
		)
		("remove", po::value<string>(&remfile),
		 "Remove list of individuals from specified file"
		)
		("keep", po::value<string>(&keepfile),
		 "Keep list of individuals from specified file"
		)
		("exclude", po::value<string>(&exclfile),
		 "Exclude list of SNPs"
		)
		("prune",
		 "Remove individuals with missing phenotypes"
		)
		("covar", po::value<string>(&covarfile),
		 "Include covariate file in analysis"
		)
		("pheno", po::value<string>(&phenofile),
		 "Include alternate phenotype file in analysis"
		)
		("make-bed",
		 "Make .bed, .fam and .bim *mode*"
		)
		("ci", po::value<double>(&ci)->default_value(0.95, "0.95"),
		 "Confidence interval for CMH odds ratios"
		)
		("assoc",
		 "Case/control, QTL association *mode*"
		)
		("linear",
		 "Test for quantitative traits and multiple covariates *mode*"
		)
		("logistic",
		 "Test for disease traits and multiple covariates *mode*"
		)
		("model",
		 "Cochran-Armitage and full-model C/C association *mode*"
		)
		("model-trend",
		 "Use CA-trend test from model *mode*"
		)
		("model-gen",
		 "Use genotypic test from model *mode*"
		)
		("model-dom",
		 "Use dominant test from model *mode*"
		)
		("model-rec",
		 "Use recessive test from model *mode*"
		)
		("freq",
		 "Allele frequencies *mode*"
		)
		("counts",
		 "Modifies --freq to report actual allele counts"
		)
		("missing",
		 "Missing rates (per individual, per SNP) *mode*"
		)
		("missing-genotype", po::value<string>(&miss_geno)->default_value("0", "\"0\""),
		 "Missing genotype code"
		)
		("maf", po::value<double>(&maf)->default_value(0.0, "0.0"),
		 "Minor allele frequency"
		)
		("geno", po::value<double>(&geno)->default_value(1, "1"),
		 "Maximum per-SNP missing"
		)
		("mind", po::value<double>(&mind)->default_value(1, "1"),
		 "Maximum per-person missing"
		)
		("hwe", po::value<double>(&hwe)->default_value(0.001, "0.001"),
		 "Hardy-Weinberg disequilibrium p-value (exact)"
		)
		("hwe2", po::value<double>(&hwe2)->default_value(0.001, "0.001"),
		 "Hardy-Weinberg disequilibrium p-value (asymptotic)"
		)
		("1",
		 "0/1 unaffected/affected coding"
		)
		("filter-founders",
		 "Include only founders"
		)
		("map3",
		 "Specify 3-column MAP file format"
		)
		("no-sex",
		 "PED file does not contain column 5 (sex)"
		)
		("allow-no-sex",
		 "Do not set ambiguously-sexed individuals missing"
		)
		("no-parents",
		 "PED file does not contain columns 3,4 (parents)"
		)
		("no-fid",
		 "PED file does not contain columns 1 (family ID)"
		)
		("r",
		 "Pairwise SNPxSNP LD (r) *mode*"
		)
		("r2",
		 "Pairwise SNPxSNP LD (r^2) *mode*"
		)
		("ld-prune,l",
		 "Linkage disequilibrium (LD) pruning *mode*"
		)
		("help,h",
		 "display this help screen"
		)
	;

	po::variables_map vm;
	po::store(po::parse_command_line(argc, argv, desc), vm);
	po::notify(vm);

	const char* margs[] = {
		"snprank",
		"gain",
		"regain",
		"ec",
		"assoc",
		"linear",
		"logistic",
		"model",
		"model-trend",
		"model-gen",
		"model-dom",
		"model-rec",
		"ld-prune",
		"freq",
		"missing",
		"r",
		"r2",
		"make-bed",
		"data-summary"
	};
	vector<string> modes(margs, margs + 19);
	PlinkHandler* ph;

	/********************************
	 * Help
	 *******************************/
	 if (vm.count("help")) {
		cout << desc << endl;
		return 1;
	}

	/*********************************
	 * Validate only one mode passed
	 ********************************/
	int nummodes = 0;
	for (po::variables_map::iterator iter = vm.begin(); iter != vm.end(); ++iter)
		if (find(modes.begin(), modes.end(), iter->first) != modes.end()) nummodes++;

	if (nummodes == 0) {
		cerr << "Error: Invalid command mode, must be one of:" << endl;
		for (int i = 0; i < modes.size(); i++)
			cerr << "\t--" << modes[i] << endl;
		cerr << endl << desc << endl;
		return 1;
	}

	else if (nummodes > 1) {
		cerr << "Error: Only one mode may be specified" << endl << endl << desc << endl;
		return 1;
	}

	/* Plink data file options *********************************/
	if (vm.count("1"))
		par::coding01 = true;

	if (vm.count("map3"))
		par::map3 = true;

	if (vm.count("no-sex"))
		par::ped_skip_sex = true;

	if (vm.count("allow-no-sex"))
		par::ignore_missing_sex = true;

	if (vm.count("no-parents"))
		par::ped_skip_parents = true;

	if (vm.count("no-fid"))
		par::ped_skip_fid = true;

	/********************************
	 * Missing genotype code
	 *******************************/
	if (!vm["missing-genotoype"].defaulted()) {
		par::missing_genotype = miss_geno;
		par::out_missing_genotype = par::missing_genotype;
	}
	/* Plink data file options *********************************/

	/********************************
	 * Input file
	 *******************************/
	// require input file, but allow no input if a numeric file
	// is passeod
		if (!vm.count("input-file")) {
			if (!vm.count("numeric")) {
				cerr << "Error: Must specify input file" << endl << endl << desc << endl;
				return 1;
			}
			// initialize output prefix and Plink handler here if we have a numeric file
			// without an accompanying input file
			else {
				numonly = true;
				// set Plink's output file prefix
				par::output_file_name = outfile_pref;
				// initialize requisite Plink data structures
				ph = new PlinkHandler();
			}
		}

		// ensure SNP/reGAIN file exists
		else if (!boost::filesystem::exists(infile)) {
			cerr << "Error: Input file " << infile << " does not exist" << endl;
			return 1;
		}

		// Plink input file
		else if (infile.find(".bed") != string::npos ||
				infile.find(".ped") != string::npos) {
			// set file root
			vector<string> fileparts;
			split(fileparts, infile, is_any_of("."));
			par::fileroot = "";

			// handle files with multiple .s in the name
			for (int i =0; i < fileparts.size() - 1; i++) {
				par::fileroot += fileparts[i];
				if (fileparts.size() > 2 && i < fileparts.size() - 2)
					par::fileroot += ".";
			}

			// set Plink's output file prefix
			par::output_file_name = outfile_pref;
			// initialize requisite Plink data structures
			ph = new PlinkHandler();

			// read SNP file in PLINK
			// binary file
			if (infile.find(".bed") != string::npos) ph->readBedFile();
			// plaintext file
			else if (infile.find(".ped") != string::npos) ph->readPedFile();

		}

		else if (infile.find(".gain") == string::npos &&
				infile.find(".regain") == string::npos) {
			cerr << "Error:  Input file must be a PLINK data file (.ped/.bed)"
				<< " or a GAIN/reGAIN matrix (.gain/.regain)" << endl;
			return 1;
		}

	/********************************
	 * Allele frequencies
	 *******************************/
	if (vm.count("freq")) {
		par::af_write = true;

		// display MAF counts instead of freqs?
		if(vm.count("counts")) par::af_count = true;
	}

	/* Plink filtering options *********************************/

	/********************************
	 * Missing rates
	 *******************************/
	if (vm.count("missing")) par::report_missing = true;

	/********************************
	 * Confidence interval for models
	 *******************************/
	if (!vm["ci"].defaulted()) {
		par::display_ci = true;
		par::ci_level = ci;
		if (par::ci_level < 0.01 || par::ci_level >= 1 )
			cerr << "CI level (--ci) must be between 0 and 1" << endl;

		par::ci_zt = ltqnorm( 1 - (1 - par::ci_level) / 2  );
	}

	// Note:  Plink resets the following three values from their defaults
	// in options.cpp of 0.01, 0.1, and 0.1, respectively, to 0.0, 1, and 1,
	// respectively.  So we must always set these to match Plink's behavior.

	/********************************
	 * Minor allele frequency
	 *******************************/
	par::min_af = maf;

	/********************************
	 * Maximum per-SNP missing
	 *******************************/
	par::MAX_GENO_MISSING = geno;

	/********************************
	 * Maximum per-SNP missing
	 *******************************/
	par::MAX_IND_MISSING = mind;

	/********************************
	 * Hardy-Weinberg (exact)
	 *******************************/
	if (!vm["hwe"].defaulted()) {
		par::HWD_test = par::HWD_report = true;
		par::HWD_limit = hwe;
	}

	/********************************
	 * Hardy-Weinberg (asymptotic)
	 *******************************/
	if (!vm["hwe2"].defaulted()) {
		par::HWD_test = par::HWD_report = true;
		par::HWD_standard = true;
		par::HWD_limit = hwe2;
	}

	/* end Plink filtering options ******************************/

	/********************************
	 * Numeric file
	 *******************************/
	// validate that numeric file is used with proper modes
	if (vm.count("numeric")) {
		if(!vm.count("regain")) {
			cerr << "Error: Numeric file may only be used with --regain"
				<< endl << desc << endl;
			return 1;
		}

		// ensure numeric file exists
		else if (!boost::filesystem::exists(numfile)) {
			cerr << "Error: Numeric file " << numfile << " does not exist" << endl;
			return 1;
		}

		// numeric only mode (no SNP file) must include an alternate phenotype file
		else if (numonly && !vm.count("pheno")) {
			cerr << "Error: Numeric only analysis must include an alternate phenotype file (--pheno)" << endl;
			return 1;
		}

		// read the numeric attributes using PLINK
		else ph->readNumFile(numfile, numonly);

	}

	/********************************
	 * Covar file
	 *******************************/
	if (vm.count("covar")) {
		// validate that covar file is used with proper modes
		if (!(vm.count("regain") || vm.count("linear"))) {
			cerr << "Error: Covariate file may only be used with --regain or --linear"
				<< endl << desc << endl;
			return 1;
		}

		// ensure covariate file exists
		else if (!boost::filesystem::exists(covarfile)) {
			cerr << "Error: Covariate file " << covarfile << " does not exist" << endl;
			return 1;
		}

		// read covariate file using PLINK
		else ph->readCovFile(covarfile);
	}

	/********************************
	 * Pheno file
	 *******************************/
	if (vm.count("pheno")) {
		// alternate phenotype validation
		if (vm.count("snprank")) {
			cerr << "Error: Alternate phenotype file cannot be used with "\
				"--snprank" << endl << desc << endl;
			return 1;
		}

		// ensure alternate phenotype file exists
		else if (!boost::filesystem::exists(phenofile)) {
			cerr << "Error: Alernate phenotype file " << phenofile << " does not exist" << endl;
			return 1;
		}

		// read alternate phenotype file using PLINK
		else {
			ph->readPhenoFile(phenofile);

		}
	}

	/********************************
	 * Prune
	 *******************************/
	if (vm.count("prune")) {
		// prune validation
		if (vm.count("snprank") || vm.count("ec") || vm.count("ld-prune")) {
			cerr << "Error: prune file cannot be used with "\
				"--snprank, --ec, or --ld-prune" << endl << desc << endl;
			return 1;
		}

		ph->pruneInd();
	}

	/********************************
	 * Extract file
	 *******************************/
	if (vm.count("extract")) {
		// extract validation
		if (vm.count("snprank") || vm.count("ec") || vm.count("ld-prune")) {
			cerr << "Error: Extract file cannot be used with "\
				"--snprank, --ec, or --ld-prune" << endl << desc << endl;
			return 1;
		}

		// ensure extract file exists
		else if (!boost::filesystem::exists(extrfile)) {
			cerr << "Error: Extract file " << extrfile << " does not exist" << endl;
			return 1;
		}

		// read extract file SNPs using PLINK
		else ph->readExtractFile(extrfile);
	}

	/********************************
	 * Exclude file
	 *******************************/
	if (vm.count("exclude")) {
		// exclude validation
		if (vm.count("snprank") || vm.count("ec") || vm.count("ld-prune")) {
			cerr << "Error: Extract file cannot be used with "\
				"--snprank, --ec, or --ld-prune" << endl << desc << endl;
			return 1;
		}

		// ensure exclude file exists
		else if (!boost::filesystem::exists(exclfile)) {
			cerr << "Error: Exclude file " << exclfile << " does not exist" << endl;
			return 1;
		}

		// read exclude file SNPs using PLINK
		else ph->readExcludeFile(exclfile);
	}

	/********************************
	 * Remove file
	 *******************************/
	if (vm.count("remove")) {
		// remove validation
		if (vm.count("snprank") || vm.count("ec") || vm.count("ld-prune")) {
			cerr << "Error: Remove file cannot be used with "\
				"--snprank, --ec, or --ld-prune" << endl << desc << endl;
			return 1;
		}

		// ensure remove file exists
		else if (!boost::filesystem::exists(remfile)) {
			cerr << "Error: Remove file " << remfile << " does not exist" << endl;
			return 1;
		}

		// read remove file individuals using PLINK
		else ph->readRemoveFile(remfile);
	}

	/********************************
	 * Keep file
	 *******************************/
	if (vm.count("keep")) {
		// keep validation
		if (vm.count("snprank") || vm.count("ec") || vm.count("ld-prune")) {
			cerr << "Error: keep file cannot be used with "\
				"--snprank, --ec, or --ld-prune" << endl << desc << endl;
			return 1;
		}

		// ensure keep file exists
		else if (!boost::filesystem::exists(keepfile)) {
			cerr << "Error: keep file " << keepfile << " does not exist" << endl;
			return 1;
		}

		// read keep file individuals using PLINK
		else ph->readKeepFile(keepfile);
	}

	// additional PLINK setup
	if (!vm.count("snprank"))
		ph->initData();

	/********************************
	 * Filter based on founders
	 *******************************/
	if (vm.count("filter-founders")) ph->filterFounders();

	/*********************************
	 * Validate mode sub-options
	 ********************************/
	if (!vm["gamma"].defaulted() && !vm.count("snprank")) {
		cerr << "Error: --gamma must be used with --snprank" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (vm.count("component-matrices") && !vm.count("regain")) {
		cerr << "Error: --component-matrices must be used with --regain" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (vm.count("component-matrices") && !vm.count("input-file")) {
		cerr << "Error: --component-matrices must include an input SNP file (--input-file)" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (vm.count("component-matrices") && !vm.count("numeric")) {
		cerr << "Error: --component-matrices must include an numeric file (--numeric)" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (vm.count("compress-matrices") && !vm.count("regain")) {
		cerr << "Error: --compress-matrices must be used with --regain" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (!vm["sif-threshold"].defaulted() && !vm.count("regain")) {
		cerr << "Error: --sif-threshold must be used with --regain" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (vm.count("fdr-prune") && !vm.count("regain")) {
		cerr << "Error: --fdr-prune must be used with --regain" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (!vm["fdr"].defaulted() && !vm.count("regain")) {
		cerr << "Error: --fdr must be used with --regain" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (vm.count("ec-algorithm") && !vm.count("ec")) {
		cerr << "Error: ec-algorithm must be used with --ec" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (vm.count("ec-snp-metric") && !vm.count("ec")) {
		cerr << "Error: ec-snp-metric must be used with --ec" << endl << endl <<
			desc << endl;
		return 1;
	}

	if (vm.count("ec-num-target") && !vm.count("ec")) {
		cerr << "Error: ec-num-target must be used with --ec" << endl << endl <<
			desc << endl;
		return 1;
	}

	/*********************************
	 * Check primary mode of operation
	 ********************************/
	// SNPrank
	if (vm.count("snprank")) {
		SNPrank* sr = new SNPrank(infile);
		cout << "Writing SNPrank results to [ " << outfile_pref << ".snprank ]" << endl;
		sr->snprank(sr->getHeader(), sr->getData(), gamma, outfile_pref + ".snprank");
		delete sr;
	}

	// reGAIN
	else if (vm.count("regain")) {
		if (!vm.count("extract"))
			cout << "Warning: It is recommended to use an --extract file of SNPs with "\
				"--regain" << endl;

		// set individual major mode
		ph->setInd();
		bool fdrprune = vm.count("fdr-prune");
		Regain* r;
		// set regain specific sub-options
		bool compressed = false, component = false, intregain = false;
		if (vm.count("compress-matrices")) compressed = true;
		if (vm.count("numeric")) intregain = true;
		if (vm.count("component-matrices")) component = true;

		r = new Regain(compressed, sif_thresh, intregain, component, fdrprune);
		r->run();
		if (fdrprune){
			r->writeRegain(false);
			r->fdrPrune(fdr);
		}
		r->writeRegain(false, fdrprune);
		r->writeRegain(true);
		delete r;
	}

	// Evaporative Cooling (EC)
	else if (vm.count("ec")) {
		// EC options map
		map<string,string> opts;
		// required options for EC
		opts.insert(pair<string,string>("ec-num-target",
					lexical_cast<string>(ec_numt)));
		opts.insert(pair<string,string>("snp-data", infile));
		opts.insert(pair<string,string>("out-files-prefix", outfile_pref));

		// defaults for ID matching
		string numericfile = "";
		vector<string> ind_ids;
		vector<string> numeric_ids;
		vector<string> pheno_ids;
		bool datasetLoaded = false;

		// validate algorithm
		if (ec_algo != "all" && ec_algo != "rj" && ec_algo != "rf")
			cerr << "Error: EC algorithm must be one of: (all|rj|rf)" << endl;
		else opts.insert(pair<string,string>("ec-algorithm-steps", ec_algo));

		// validate metric
		if (ec_sm != "gm" && ec_sm != "am")
			cerr << "Error: EC SNP metric must be one of: (gm|am)" << endl;
		else opts.insert(pair<string,string>("snp-metric", ec_sm));

		// find IDs for loading from the dataset
		if(!GetMatchingIds(numericfile, phenofile, numeric_ids, pheno_ids, ind_ids))
			cerr << "Error: could not get matching IDs from numeric " <<
				"and/or phenotype files" << endl;
		// initialize dataset by extension
		Dataset* ds = 0;
		// set snpFileType for EC
		string snp_type = "plinkped";
		if (par::read_bitfile) snp_type = "plinkbed";

		ds  = ChooseSnpsDatasetByType(infile, snp_type);
		bool loaded = ds->LoadDataset(infile, "", phenofile, ind_ids);
		if (!loaded) cerr << "Error: Failure to load dataset for analysis" << endl;

		// file data stats
		ds->PrintStats();

		// create ec object and run
		EvaporativeCooling* ec = new EvaporativeCooling(ds, opts, SNP_ONLY_ANALYSIS);
		if(!ec->ComputeECScores())
			cerr << "Error: Failed to calculate EC scores" << endl;

		// write results to file
		cout << "Writing EC results to [ " << outfile_pref << ".ec ]" << endl;
		ec->WriteAttributeScores(outfile_pref);
		delete ds;
		delete ec;
	}

	// GAIN
	else if (vm.count("gain")) {
		// defaults for ID matching
		string numericfile = "";
		vector<string> ind_ids;
		vector<string> numeric_ids;
		vector<string> pheno_ids;
		bool datasetLoaded = false;

		// find IDs for loading from the dataset
		if(!GetMatchingIds(numericfile, phenofile, numeric_ids, pheno_ids, ind_ids))
			cerr << "Error: could not get matching IDs from numeric " <<
				"and/or phenotype files" << endl;
		// initialize dataset by extension
		Dataset* ds = 0;
		// set snpFileType for EC
		string snp_type = "plinkped";
		if (par::read_bitfile) snp_type = "plinkbed";

		ds  = ChooseSnpsDatasetByType(infile, snp_type);
		bool loaded = ds->LoadDataset(infile, "", phenofile, ind_ids);
		if (!loaded) cerr << "Error: Failure to load dataset for analysis" << endl;

		// file data stats
		ds->PrintStats();

		double** gainMatrix = 0;
		/// create an attribute interactiom matrix
		vector<unsigned int> attributeIds = ds->MaskGetAttributeIndices(DISCRETE_TYPE);
		int numAttributes = attributeIds.size();
		gainMatrix = new double*[numAttributes];
		for(int i = 0; i < numAttributes; ++i) {
			gainMatrix[i] = new double[numAttributes];
			for(int j = 0; j < numAttributes; ++j)
				gainMatrix[i][j] = 0.0;
		}
		if(ds->CalculateGainMatrix(gainMatrix, outfile_pref + ".gain")) {
			for(unsigned int i=0; i < ds->NumAttributes(); ++i)
				delete [] gainMatrix[i];
			delete [] gainMatrix;
		}
		else {
			cerr << "ERROR: Could not calculate a GAIN matrix." << endl;
			exit(EXIT_FAILURE);
		}

		delete ds;
	}

	// Association tests and models
	else if (vm.count("assoc") || vm.count("linear") || vm.count("logistic") ||
			vm.count("model") || vm.count("trend") ||
			vm.count("model-trend") || vm.count("model-gen") ||
			vm.count("model-dom") || vm.count("model-rec")) {

		par::assoc_test = true;

		if (vm.count("model") || vm.count("trend") ||
			vm.count("model-dom") || vm.count("model-rec") ||
			vm.count("model-trend") || vm.count("model-gen"))
				par::full_model_assoc = true;

		if (vm.count("trend")) {
			par::trend_only = true;
			par::model_perm_trend = true;
		}
		else {
			if (vm.count("model-gen")) par::model_perm_gen = true;
			else if (vm.count("model-dom")) par::model_perm_dom = true;
			else if (vm.count("model-rec")) par::model_perm_rec = true;
			else if (vm.count("model-trend")) par::model_perm_trend = true;
			else par::model_perm_best = true;
		}

		if (vm.count("linear") || vm.count("logistic")) par::assoc_glm = true;

		ph->assocTest();
	}

	// LD-based pruning
	else if (vm.count("ld-prune")) ph->LDPrune();

	// LD-pruning using r and r^2
  	else if(vm.count("r") || vm.count("r2")) {
  		if (vm.count("r2")) par::disp_r2 = true;
		else if (vm.count("r")) {
			par::disp_r1 = true;
			par::disp_r2 = false;
		}

		ph->LDStats();
	}

	// Create PLINK binary files
	else if (vm.count("make-bed")) ph->writeBedFile();

	// Simply print PLINK stats
	else if (vm.count("data-summary")) {}

	// Plink exit
	if (!vm.count("snprank"))
		shutdown();
	return 0;
}

redpajama_set_name: RedPajamaGithub