12
Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L. Hurwitz a,1 , Anton H. Westveld b,c , Jennifer R. Brum a , and Matthew B. Sullivan a,1 a Department of Ecology and Evolutionary Biology, University of Arizona, Tucson, AZ 85721; b Research School of Finance, Actuarial Studies and Applied Statistics, College of Business and Economics, Australian National University, Canberra, ACT 0200, Australia; and c Statistics Laboratory at the Bio5 Institute and Statistics Graduate Interdisciplinary Program, University of Arizona, Tucson, AZ 85721 Edited by David M. Karl, University of Hawaii, Honolulu, HI, and approved June 16, 2014 (received for review October 21, 2013) Long-standing questions in marine viral ecology are centered on understanding how viral assemblages change along gradients in space and time. However, investigating these fundamental eco- logical questions has been challenging due to incomplete repre- sentation of naturally occurring viral diversity in single gene- or morphology-based studies and an inability to identify up to 90% of reads in viral metagenomes (viromes). Although protein cluster- ing techniques provide a significant advance by helping organize this unknown metagenomic sequence space, they typically use only 75% of the data and rely on assembly methods not yet tuned for naturally occurring sequence variation. Here, we introduce an anno- tation- and assembly-free strategy for comparative metagenomics that combines shared k-mer and social network analyses (regres- sion modeling). This robust statistical framework enables visualiza- tion of complex sample networks and determination of ecological factors driving community structure. Application to 32 viromes from the Pacific Ocean Virome dataset identified clusters of sam- ples broadly delineated by photic zone and revealed that geo- graphic region, depth, and proximity to shore were significant pre- dictors of community structure. Within subsets of this dataset, depth, season, and oxygen concentration were significant drivers of viral community structure at a single open ocean station, whereas variabil- ity along onshoreoffshore transects was driven by oxygen concen- tration in an area with an oxygen minimum zone and not depth or proximity to shore, as might be expected. Together these results demonstrate that this highly scalable approach using complete metagenomic network-based comparisons can both test and gen- erate hypotheses for ecological investigation of viral and microbial communities in nature. virus | microbial ecology | Bayesian network M icroorganisms drive global biogeochemical cycles (1), with abundances and taxonomic composition tuned to spatio- temporally varying environmental conditions (25). Viruses then modulate these biogeochemical processes through mortality, hori- zontal gene transfer, and metabolic reprogramming (6). However, our understanding of how viral communities change in response to biological, physical, and chemical factors and host availability has been limited by technical challenges. Most viruses in the ocean lack both cultivated representatives [85% of 1,100 sequenced phage genomes derive from only 3 of 45 bacterial phyla (7)] and a universally conserved marker gene (8); thus, metagenomics is commonly applied to characterize the ecology and evolution of viral assemblages. Problematically, however, our ability to investigate these assemblages via meta- genomics remains limited by the lack of known viruses and viral proteins in biological sequence databases. The first viral meta- genome (virome) used thousands of Sanger reads and found that 65% of sequences were unknown [i.e., no database match for reads >600 bp (9)]. Adoption of next-generation sequencing (NGS) technologies then generated hundreds of thousands of reads (averaging 102 bp in length) per virome and returned 90% sequence novelty (10). This unknown problem has not been significantly improved on in subsequent oceanic virome studies regardless of sequencing platform (11). This novelty limits taxonomic and functional inferences about viral assemblages and makes comparative analyses that only use the known por- tion of these datasets minimally informative at best and completely misleading at worst. Additionally, the standard practice of com- paring new datasets against large genomic databases is compute intensive and increasingly unfeasible given escalating scales in datasets and databases. To circumvent similar issues, Yooseph et al. (12) clustered environmental reads with known proteins from available data- bases to define sequence similarity-based protein clusters (PCs) to analyze the first global ocean microbial metagenomic datasets. This PC approach helps to both organize the vastly unknown sequence space in metagenomes and identify abundant proteins in environmental datasets even where taxonomy and function are unknown. Application of this approach to viromes has also been fruitful and has led to (i ) a dataset of 456K protein clusters (11), (ii ) comparative estimates of viral community diversity across sites (11, 13), and (iii ) an estimate that the global virome is three orders of magnitude less diverse than previously thought (14). Although a valuable approach for metagenomic data, particu- larly for viromes where functional and taxonomic information is Significance Microorganisms and their viruses are increasingly recognized as drivers of myriad ecosystem processes. However, our knowl- edge of their roles is limited by the inability of culture-dependent and culture-independent (e.g., metagenomics) methods to be fully implemented at scales relevant to the diversity found in nature. Here we combine advances in bioinformatics (shared k-mer analyses) and social networking (regression modeling) to develop an annotation- and assembly-free visualization and an- alytical strategy for comparative metagenomics that uses all the data in a unified statistical framework. Application to 32 Pacific Ocean viromes, the first large-scale quantitative viral meta- genomic dataset, tested existing and generated further hypoth- eses about ecological drivers of viral community structure. Highly computationally scalable, this new approach enables diverse sequence-based large-scale comparative studies. Author contributions: B.L.H. and A.H.W. designed research; B.L.H. and A.H.W. performed research; B.L.H. and A.H.W. contributed new reagents/analytic tools; B.L.H., A.H.W., and J.R.B. analyzed data; and B.L.H., A.H.W., J.R.B., and M.B.S. wrote the paper. The authors declare no conflict of interest. This article is a PNAS Direct Submission. Freely available online through the PNAS open access option. Data deposition: All methods and source code are fully documented and are freely available at http://code.google.com/p/tmpl/. Viromes are available in the iPlant Community Data folder (imicrobe/pov) at http://www.iplantcollaborative.org/. 1 To whom correspondence may be addressed. Email: [email protected] or [email protected]. This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10. 1073/pnas.1319778111/-/DCSupplemental. www.pnas.org/cgi/doi/10.1073/pnas.1319778111 PNAS Early Edition | 1 of 6 MICROBIOLOGY

Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

Modeling ecological drivers in marine viralcommunities using comparative metagenomicsand network analysesBonnie L. Hurwitza,1, Anton H. Westveldb,c, Jennifer R. Bruma, and Matthew B. Sullivana,1

aDepartment of Ecology and Evolutionary Biology, University of Arizona, Tucson, AZ 85721; bResearch School of Finance, Actuarial Studies and AppliedStatistics, College of Business and Economics, Australian National University, Canberra, ACT 0200, Australia; and cStatistics Laboratory at the Bio5 Institute andStatistics Graduate Interdisciplinary Program, University of Arizona, Tucson, AZ 85721

Edited by David M. Karl, University of Hawaii, Honolulu, HI, and approved June 16, 2014 (received for review October 21, 2013)

Long-standing questions in marine viral ecology are centered onunderstanding how viral assemblages change along gradients inspace and time. However, investigating these fundamental eco-logical questions has been challenging due to incomplete repre-sentation of naturally occurring viral diversity in single gene- ormorphology-based studies and an inability to identify up to 90%of reads in viral metagenomes (viromes). Although protein cluster-ing techniques provide a significant advance by helping organizethis unknownmetagenomic sequence space, they typically use only∼75% of the data and rely on assembly methods not yet tuned fornaturally occurring sequence variation. Here, we introduce an anno-tation- and assembly-free strategy for comparative metagenomicsthat combines shared k-mer and social network analyses (regres-sion modeling). This robust statistical framework enables visualiza-tion of complex sample networks and determination of ecologicalfactors driving community structure. Application to 32 viromesfrom the Pacific Ocean Virome dataset identified clusters of sam-ples broadly delineated by photic zone and revealed that geo-graphic region, depth, and proximity to shore were significant pre-dictors of community structure. Within subsets of this dataset, depth,season, and oxygen concentration were significant drivers of viralcommunity structure at a single open ocean station, whereas variabil-ity along onshore–offshore transects was driven by oxygen concen-tration in an area with an oxygen minimum zone and not depth orproximity to shore, as might be expected. Together these resultsdemonstrate that this highly scalable approach using completemetagenomic network-based comparisons can both test and gen-erate hypotheses for ecological investigation of viral and microbialcommunities in nature.

virus | microbial ecology | Bayesian network

Microorganisms drive global biogeochemical cycles (1), withabundances and taxonomic composition tuned to spatio-

temporally varying environmental conditions (2–5). Viruses thenmodulate these biogeochemical processes through mortality, hori-zontal gene transfer, and metabolic reprogramming (6). However,our understanding of how viral communities change in response tobiological, physical, and chemical factors and host availability hasbeen limited by technical challenges.Most viruses in the ocean lack both cultivated representatives

[85% of 1,100 sequenced phage genomes derive from only 3 of45 bacterial phyla (7)] and a universally conserved marker gene(8); thus, metagenomics is commonly applied to characterize theecology and evolution of viral assemblages. Problematically,however, our ability to investigate these assemblages via meta-genomics remains limited by the lack of known viruses and viralproteins in biological sequence databases. The first viral meta-genome (virome) used thousands of Sanger reads and found that65% of sequences were unknown [i.e., no database match forreads >600 bp (9)]. Adoption of next-generation sequencing(NGS) technologies then generated hundreds of thousands ofreads (averaging 102 bp in length) per virome and returned∼90% sequence novelty (10). This unknown problem has not

been significantly improved on in subsequent oceanic viromestudies regardless of sequencing platform (11). This novelty limitstaxonomic and functional inferences about viral assemblagesand makes comparative analyses that only use the known por-tion of these datasets minimally informative at best and completelymisleading at worst. Additionally, the standard practice of com-paring new datasets against large genomic databases is computeintensive and increasingly unfeasible given escalating scales indatasets and databases.To circumvent similar issues, Yooseph et al. (12) clustered

environmental reads with known proteins from available data-bases to define sequence similarity-based protein clusters (PCs)to analyze the first global ocean microbial metagenomic datasets.This PC approach helps to both organize the vastly unknownsequence space in metagenomes and identify abundant proteinsin environmental datasets even where taxonomy and function areunknown. Application of this approach to viromes has also beenfruitful and has led to (i) a dataset of 456K protein clusters (11),(ii) comparative estimates of viral community diversity acrosssites (11, 13), and (iii) an estimate that the global virome is threeorders of magnitude less diverse than previously thought (14).Although a valuable approach for metagenomic data, particu-larly for viromes where functional and taxonomic information is

Significance

Microorganisms and their viruses are increasingly recognizedas drivers of myriad ecosystem processes. However, our knowl-edge of their roles is limited by the inability of culture-dependentand culture-independent (e.g., metagenomics) methods to befully implemented at scales relevant to the diversity found innature. Here we combine advances in bioinformatics (sharedk-mer analyses) and social networking (regression modeling) todevelop an annotation- and assembly-free visualization and an-alytical strategy for comparative metagenomics that uses all thedata in a unified statistical framework. Application to 32 PacificOcean viromes, the first large-scale quantitative viral meta-genomic dataset, tested existing and generated further hypoth-eses about ecological drivers of viral community structure. Highlycomputationally scalable, this new approach enables diversesequence-based large-scale comparative studies.

Author contributions: B.L.H. and A.H.W. designed research; B.L.H. and A.H.W. performedresearch; B.L.H. and A.H.W. contributed new reagents/analytic tools; B.L.H., A.H.W., andJ.R.B. analyzed data; and B.L.H., A.H.W., J.R.B., and M.B.S. wrote the paper.

The authors declare no conflict of interest.

This article is a PNAS Direct Submission.

Freely available online through the PNAS open access option.

Data deposition: All methods and source code are fully documented and are freely availableat http://code.google.com/p/tmpl/. Viromes are available in the iPlant Community Data folder(imicrobe/pov) at http://www.iplantcollaborative.org/.1To whom correspondence may be addressed. Email: [email protected] [email protected].

This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1319778111/-/DCSupplemental.

www.pnas.org/cgi/doi/10.1073/pnas.1319778111 PNAS Early Edition | 1 of 6

MICRO

BIOLO

GY

Page 2: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

especially limiting, there are drawbacks to the PC approach in-cluding (i) only mapping ∼75% of the data (11) and (ii) a re-liance on metagenomic assembly algorithms not yet optimizedfor handling sequence variation derived from sequencing artifactand real population heterogeneity (15).Recently, k-mer–based approaches were introduced to facili-

tate genome annotation (16) and for whole genome comparisonto identify relationships among organisms without assembly andsynteny analysis (17). For larger-scale metagenomic datasets, thisapproach offers a computationally scalable option for directcomparisons. Specifically, this shared k-mer strategy enables asimilarity metric and the ability to identify clusters of metagenomesto infer how microbial communities are affected by environmentalfactors (18). These are significant advances, but they suffer from thelack of a unified statistical framework for evaluating genetic pre-dictors of community structure based on multiple ecological varia-bles that can be dependent on one another.Here, we introduce a strategy to comparatively evaluate complete

metagenomes by combining a shared k-mer approach with socialnetwork analysis to place all data into a unified context. Expandingon prior k-mer-based metagenomic methods (17, 18), a model wasused to determine the statistical significance of ecological variablesin forming the network while also accounting for dependencyamong these variables. The resulting network allows for data-driven hypothesis testing and generation through the evaluation ofk-mer–based virome proximity in network space and statisticalevaluation of ecological variables that drive these relationships.Application of this approach to 32 Pacific Ocean viromes (POVs)reveals a high-level overview of shared sequence space betweenthese viromes, investigates the environmental characteristics thatdrive variability in viral community structure, and identifies test-able hypotheses regarding viral community dynamics. Finally, al-though demonstrated on viromes, this strategy can be efficientlyimplemented on many large-scale sequence datasets with broaduses from environmental to clinical applications.

ResultsSimilar to previous metagenomic studies of ocean viruses (9, 10,19–21), the 6,000,000 read POV dataset was dominated by theunknown (<6% of reads matched known viruses) (22). To moreholistically compare viral metagenomes in a computationallyscalable way (57× faster than BLAST and comparable to heu-ristic clustering algorithms; Tables S1 and S2), a strategy wasemployed using read-level k-mer similarity analyses betweenviromes as input to a social network analysis (SNA) to modelrelationships between viromes and metadata using statisticalregression methodologies (23–25) (for details, see SI Methods).These analyses resulted in (i) a unified comparative network ofviromes based on sequence composition (Fig. 1) and (ii) a statisticalmeasure of the effect of covariates (i.e., season, proximity to shore,and depth) on the network structure using Eq. 1 (Table 1). Thistechnique was applied to the complete dataset and two subsampleddatasets to examine broad-scale, temporal, and spatial patterns asfollows: (i) all 32 Pacific Ocean samples (Fig. 1 A and B), (ii) openocean, station P26 LineP samples that vary by season and depth(Fig. 1C), and (iii) spring LineP transect samples that vary byproximity to shore and depth (Fig. 1D).

Broad-Scale Patterns Across 32 Pacific Ocean Viral Communities. Vi-sually, eight regions emerged from the full 32 POV network thatbroadly differed by photic zone (three photic vs. five aphotic; Fig.1A). In the aphotic portion of the network, the first region con-tained three viromes from summer at LineP open ocean station P26and the second region contained three spring LineP samples fromdeep samples of the transect. The third region in the aphotic regionof the network contained viromes from all three biomes with deepsamples and across seasons, whereas the fourth and fifth regionscontained outlier LineP spring viromes sampled from the base ofthe oxygen minimum zone.A sixth region, in the photic portion of the network, con-

tained all four of the spring/summer surface ocean LineP samples

regardless of whether they were coastal, intermediate, or openocean stations, as well as one Monterey Bay (MBARI) viromesampled in fall from the deep chlorophyll maximum (DCM; 42m) at an intermediate ocean transect site. The seventh regioncontained surface water viromes including four near-replicateviromes [a single viral-concentrate that was differentially con-centrated or purified (13)], sampled in the spring from Scripps Pier,one MBARI fall coastal virome, and one LineP winter open oceanvirome. Finally, an eighth region contained five viromes includingthree from theMBARI photic zone at intermediate and open oceanstations and two shallow samples from the Great Barrier Reef.To complement these overall qualitative patterns (based on

quantitative underpinnings), our unified network regression modelwas also used to evaluate ecological drivers of the observed networkstructure. Here, biogeographic region, depth, and proximity toshore were significant predictors of the overall POV network,but season was not (Table 1). Overall, only 3% of reads (n =196,924) were universal to all samples within the POV net-work, whereas 23% and 10% of reads were exclusive to photicor aphotic parts of the network, respectively (Fig. 1B). Thefour near-replicate viromes from Scripps Pier contained themost activity (shared reads) in the network, whereas theshallow Great Barrier Reef viromes and one MBARI viromehad the least (Fig. S1).

Finer-Scale Patterns Across Subnetworks. Given the complexity ofthe overall POV network, smaller refined subnetworks were ex-amined to differentiate spatiotemporal features. First, analyseswere focused on the most temporally well-resolved subsets ofsamples that included 11 viromes from the LineP open ocean

Fig. 1. Visualizing relationships between marine viral communities. (A) Socialnetwork of all POV samples with clusters circled in red. (B) Euler diagram (stress =0.1027) depicting the portion of sequences shared by the eight clusters circled inA and the percent of sequences unique to the photic or aphotic zone. (C) Socialnetwork of all samples from LineP open ocean station P26. (D) Social network ofall samples from the spring LineP transect. Dots in the social network graphsrepresent statistical samples taken from the marginal posterior distributions.Labels are placed at the posterior mean for each virome.

2 of 6 | www.pnas.org/cgi/doi/10.1073/pnas.1319778111 Hurwitz et al.

Page 3: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

P26 station. Visually, again upper ocean, photic zone viromeswere clearly separated from deep water, aphotic zone viromes,with seasonality leading to structure within these zones (Fig. 1C).Statistical regressions suggested that ecological drivers includeddepth, season, and oxygen concentration (Table 1).A second subset of the data from LineP allowed focus on

spatial variability from the coastal to open ocean samples col-lected on a springtime research cruise (Fig. 1D). Visually, againthe photic and aphotic zone viromes were separated in sharedk-mer space, but this time no strong patterns were observed withdepth within these larger zones or with proximity to shore. Sta-tistical analyses supported these qualitative observations, as onlyoxygen represented a structuring factor (Table 1).

LineP: A Case Study in Niche Specialization by Season. The power ofthe above analyses is the ability to visually represent viromes anddefine significant metadata factors to drive further investigationinto underlying patterns. Given that reads have associated abun-dances (via the k-mer mode; SI Methods and Figs. S2 and S3), readsthat are exclusive to specific viromes or parts of the network can bemined out of the underlying data. We demonstrate this by exam-ining reads that are distinct by season (summer vs. winter) andphotic zone (photic vs. aphotic) at open ocean station P26 atLineP in the Pacific Ocean based on Fig. 1C and Table 1. Theexclusive read data demonstrate metabolic differences in parts ofthe network that likely derive from viral-encoded auxiliary meta-bolic genes as follows (Fig. 2), given the purity of these viromes(11, 13, 26).The largest proportion of exclusive reads in all viromes, irre-

spective of photic zone or season, encodes genes related to nucle-otide metabolism (Fig. 2). Given that viruses require nucleotides forreplication, this result is not unexpected. When broadly comparingthe photic zone and aphotic zone, aphotic viromes contain moreoverall metabolic functional capacity. In particular, genes related tothe tricarboxylic acid (TCA) cycle, mannose and fructose metabo-lism, and electron transport chain (ETC) are more highly repre-sented in aphotic viromes and are likely involved in energy pro-duction (26). These genes may be less represented in photicsamples, given the capacity for viruses to encode and express pho-tosynthetic genes (6) that allow them to derive energy for phagereplication. Fatty acid metabolism may also be a source of energyproduction in phage in all seasons and photic zones, but most highlyrepresented in summer aphotic viromes perhaps due to increased

phage production in the summer and less energy derived from othersources. Interestingly, aphotic viromes and winter photic viromescontain genes related to cysteine and methionine metabolism,whose role is currently unknown but may be related to scavengingiron from Fe-S clusters in iron limited regions given that cysteine isimportant for Fe-S cluster biogenesis and degradation (27).Last, pyrimidine, purine, and glutathione metabolism may beimportant in winter aphotic viromes. Given that glutathioneimproves cold resistance in bacteria (28), viruses may help toprovide protection to their infected hosts in the winter. Thesedata suggest that viruses coevolve with their hosts and bolsterhost metabolism to improve host vitality for phage productiongiven environmental selective pressures on the host.

Table 1. Bayesian inference numerical summaries for social networks with selected covariates

Network dataset/Covariate Parameter Posterior medianLower limit credible

interval (2.5%)Upper limit credibleinterval (97.5%)

Full dataset [32 samples (nodes)]logðni,jÞ γ 0.63 0.42 0.88Geographic region β1 0.14 0.06 0.21Depth β2 0.12 0.06 0.19Season β3 0.03 −0.02 0.08Proximity to shore β4 0.12 0.08 0.16Oxygen β5 −0.00 −0.21 0.08

LineP open ocean [11 samples (nodes)]logðni,jÞ γ 0.828 0.206 1.298Depth β1 0.224 0.11 0.343Season β2 0.124 0.032 0.257Oxygen β3 −0.336 -0.589 -0.084

LineP spring transect [11 samples (nodes)]logðni,jÞ γ 6.737 5.555 7.874Depth β1 0.117 −0.053 0.287Proximity to shore β2 0.047 −0.063 0.147Oxygen β3 0.867 0.253 1.205

Statistically significant covariates for each network are shown in bold. Covariates are considered significant if the upper and lowercredible intervals (Baysian confidence intervals) do not overlap with zero. The covariate logðni,jÞ is an offset (although we do not restrictthe coefficient to be equal to 1), which accounts for the fact that more shared read space may occur between two viromes if the eitherof the viromes is larger.

Summer, Photic Winter, PhoticA B

Summer, Aphotic Winter, AphoticC D

Nucleotide Metabolism

Nucleotide Metabolism Nucleotide Metabolism

Fatty Acid Metabolism

Nucleotide Metabolism

TCA Cycle

TCA Cycle

TCA Cycle

Cysteine + Methionine Metabolism

Pyrimadine+Purine+Glutathione MetabolismCysteine + Methionine Metabolism

TCA Cycle

Fatty Acid Metabolism Fatty Acid Metabolism

Fatty Acid Metabolism

ETC ETC

ETC ETC

Cysteine + Methionine Metabolism

Mannose + Fructose Metabolism Mannose + Fructose Metabolism

Fig. 2. Map of viral-encoded metabolic host genes from summer/winterand photic/aphotic at open ocean station P26 at LineP in the Pacific Ocean.The width of the lines corresponds to the normalized read abundance forviral encoded host genes in metabolic pathways from (A) summer photic (10m) virome at LineP P26, (B) winter photic (10 m) virome at LineP P26, (C)summer aphotic (500, 1,000, and 2,000 m) viromes at LineP P26, and (D)winter aphotic (500, 1,000, and 2,000 m) viromes at LineP P26. ETC, electrontransport chain. For map generation, see ref. 59.

Hurwitz et al. PNAS Early Edition | 3 of 6

MICRO

BIOLO

GY

Page 4: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

DiscussionMicrobes are now well recognized as critical players in ecosys-tems ranging from oceans and soils to humans and bioreactors.Their viruses are often as important, but methodological chal-lenges have made it difficult to investigate even relatively fun-damental questions such as how viral communities change overspace and time. All currently used methods (e.g., morphology,viral genome fingerprinting, single-gene analyses, database-de-pendent annotation, and PC-based metagenomics) have issuesthat prevent extrapolating inferences to whole viral communi-ties. The approach presented here that combines shared k-mer and social network analysis uses all of the reads, does notrequire assembly or database-dependent annotation, and includesa statistical framework (i.e., regression modeling) to evaluate eco-logical drivers of the resulting network structure. Application to32 Pacific Ocean viromes allowed us to test hypotheses about howviral communities change over space and time, as well as generatenew hypotheses where expectations were not met.

Broad-Scale Inferences About Pacific Ocean Viral Communities.Comparisons made across the entire POV dataset revealed thatseasonality and oxygen were relatively unimportant in structuringviral communities, whereas geography, depth, and proximity toshore were significant. These first findings, that seasonality andoxygen do not structure POV communities, are likely a result ofthe overall dataset containing samples with many differing eco-logical features: e.g., half the dataset is associated with an oxygenminimum zone (LineP) and the rest have relatively invariantoxygen conditions. Thus, other features that strongly vary withinthe dataset overwhelm the more specific effects of season andoxygen (but see discussion of subnetworks below).That geography is a strong driver of viral community structure

is striking as ocean viruses have been posited to have extensivedispersion capability [inferred from global distribution of iden-tical genetic marker sequences (29)] and a recent morphologicalsurvey of ocean viral communities found that geographic dis-tance was not significant in explaining their variability across sixoceans and seas (30). However, genome-wide variation likely farexceeds that of highly conserved marker genes and morphology-based metrics. A previous metagenomic study also suggested thatfour spatially diverse ocean viral communities were quite dif-ferent (10), but the viromes were prepared in a nonquantitativemanner (31), and only the known portion of these viromes (∼2%of the total reads with annotation to known phage) were ana-lyzed to make this inference. Our observation of geographicvariability in total viral metagenomes is consistent with variabilityof their dominant hosts, bacteria, which have geographic vari-ability at the community level (18, 32), as well as within abundantphyla, including either large-scale genomic changes (e.g., in Pelagi-bacter) (33) or small-scale genomic changes more strongly localizedto genomic islands (e.g., in cyanobacteria) (34).Beyond geography, both depth and proximity to shore repre-

sent some of the strongest gradients available in the oceans, so itis not surprising they might also structure viral community com-position across this larger sample set. Total viral particle countsbroadly mirror those of prokaryotes across depth profiles in theoceans (35), which suggests that as microbial population abundan-ces and structure change with depth, so too would their viruses. Forexample, microbial metagenomes from an open ocean depth profileshow cyanophage abundance broadly mirrors that of their hosts(36). As well, depth-related variability in extracellular marine viralcommunities has been documented using viral genome finger-printing (37, 38), and our findings support this, showing that depthis a clear driver of viral community structure. The latter driving factor,proximity to shore, is discussed with the subnetwork findings below.

Finer-Scale Evaluation of Ecological Factors That Structure ViralCommunities. The decades of study along the LineP oceanographictransect (39) present an ideal backdrop for investigating temporaland spatial variability in viral communities. To focus on temporalvariability, we examined a subnetwork of 11 viromes from February

(winter), June (spring), and August (summer) at a single LinePstation (open ocean station P26). This analysis revealed that depth,season, and oxygen were significant drivers of viral communitystructure in this subset of the data. In addition to the discussion ofdepth above, it is noteworthy that the LineP transect region isstrongly stratified to the point of establishing one of the largestocean interior oxygen minimum zones (40), so it is not surprisingthat viral community structure would significantly vary with depthand oxygen. That seasonality was also a driver is consistent withstudies demonstrating annual cyclical changes in marine bacterialcommunity structure (3, 41, 42). Although our single-year viromedataset does not permit inferences about year-to-year variation,similar annual repeatability has been observed in total viral abun-dance at the Bermuda Atlantic Time Series station (41), suggestingthat annual repeatability of microbial hosts may lead to the samefor their viral predators.Additionally, the LineP transect is ideal for evaluating spatial

changes in viral community structure along coastal to open oceangradients. The strong vertical oxygen gradients along this transect(43) structured the viral community in the temporally focusedsubnetwork analysis above and also do so here in the spatial sub-network analysis for a single season. Mechanistically, these stronggradients in oxygen are likely structuring LineP microbial pop-ulations as observed for total bacterial community composition (43)and dominant bacterial phyla [e.g., SUP05 and Marine Group A(MGA) (43)], which in turn structure their viral communities. Theseresults are supported by studies of viral communities along strongoxygen gradients in stratified lakes using morphology or viral ge-nome fingerprinting (37, 44), as well as a metagenomic investigationof viruses in a marine oxygen minimum zone off of Chile (45).Notable outliers in our dataset include viromes from the base

of the deep ocean oxycline (LineP spring 2,000-m viromes fromthe intermediate and open ocean). Distinct viral communitieshave been observed within oxyclines of marine and saline lakeenvironments (44, 45), and thus these samples may representviruses infecting bacteria adapted to dysoxic conditions (43).Alternatively, these deep oxycline viral communities could in-clude surface water viruses that were entrapped on sinking par-ticles and released at depth as a result of degradation, explainingtheir greater similarity to photic zone samples.Additionally, although proximity to shore was a significant driver

of viral community variability in the network with all samples, it wasnot significant when focusing solely on the LineP transect despitegradients in nutrients and productivity that occur along this transect(46). A lack of spatial variability in abundance of a specific bacterialphyla (MGA) along this transect has been observed (47), supportingour findings. Thus, the change in significance of proximity to shoreas a structuring variable may be explained in the same fashion as foroxygen concentration. Specifically, the inclusion of coastal samplesfrom MBARI, Scripps Pier, and the Great Barrier Reef may havebeen the primary drivers of this relationship in the full samplenetwork, and their exclusion in the LineP transect network resultedin oxygen being the overwhelmingly dominant structuring variable,as was also noted for MGA distribution along this transect (47).Last, we note that activity between viromes (shared reads) varies

with sequencing effort. Four deeply sequenced near-replicateviromes from Scripps Pier showed the highest activity with otherviromes (Fig. S1) likely due to greater representation of reads de-rived from the rare virosphere. Because the network is normalizedfor sequencing effort, this does not affect network structure, but isimportant when considering activity between viromes.

Analytical Advances. The approach outlined here provides a signifi-cant advance over alternative ecological methods for dimensionalityreduction such as principle components analysis (PCoA) and non-metric multidimensional scaling (nMDS; for details, see SI Meth-ods). Broadly, the contrast lies in the fact that PCoA and nMDSare generally descriptive approaches (48), whereas the networkapproach outlined here provides a full inferential framework.Specifically, relational data methods are used to create a de-pendence structure in ordination space that includes random

4 of 6 | www.pnas.org/cgi/doi/10.1073/pnas.1319778111 Hurwitz et al.

Page 5: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

effects and as a result allows for the proper inference for re-gression coefficients (i.e., metadata). Or, in simple terms, the dis-tances between viromes based on shared reads can be visuallyrepresented, while at the same time accounting for biologicalfactors in a single statistical model. The importance of singlemodeling and inferential framework is highlighted in Chiu andWestveld (25).This approach is also inherently different from other statistical

frameworks [e.g., MaAsLin (49)] that identify associations be-tween metadata and the abundance of operational taxonomicunits (OTUs) or functions in metagenomic samples. Specifically,MaAsLin outputs a list of OTUs or functions that are significantgiven a metadata type. Given that the results are granular (byOTU or function) and only account for only one metadata typeat a time, they cannot be combined. In contrast, our analyticalframework (i) uses a model that enables simultaneous exami-nation of shared sequence space between viromes in conjunctionwith multiple metadata types and (ii) requires no prior organi-zational bins (e.g., OTUs for MaAsLin), which is critical forviruses that lack a universal barcode gene for such taxonomicassignations. Both advances are fundamental for surveying complexviral communities to look for ecological drivers of communitystructure but also help broaden the toolkit available for othercomparative metagenomic datasets (e.g., bacterial).This approach may also prove to be important in other microbial

analyses wherein taxonomic identification is less of a concern givenrRNA sequence datasets. Specifically, we use entire metagenomesrather than a single gene (like 16S in bacteria) to assess the com-position of microbial communities. The use of complete meta-genomes is particularly important in cases where metagenomesmay contain closely related species, indistinguishable on the levelof the 16S gene alone, that have functional differences thatmake them distinct.Further, because reads that represent significant patterns in

the network can be mined out (see results LineP seasonal nichedifferentiation), this approach drives functional comparativemetagenomic analyses. This approach is also important prag-matically in terms of runtime because fewer reads require ex-tensive functional annotation. Moreover, the remaining unknownfraction of reads exclusive to a certain part of the network pro-vides a starting point for future empirical analyses to understandthe function of novel viral species. This approach is broadlyapplicable to metagenomes comprised of any microbe fromviruses, to bacteria or fungi, and extends current approachesthrough the use of whole metagenomes and a comprehensivestatistical framework.

Conclusions. Although marine microbes and their viruses arefundamental to Earth system function, the culture-independentmetagenomic techniques used to study them present “big data”analytical challenges. The combination of shared k-mer andsocial network analysis presented here provides a powerfulway to visualize and explore relationships between metagenomicsamples and populations and statically evaluate the underlyingfactors that drive this variability. These methods are compu-tationally tractable and widely applicable across sequence data-sets and have the capacity to affect how data are stored, visualized,and analyzed, making use of big data analytics and the large-scalecontext that is now becoming available in metagenomic datarepositories. These types of analyses and scales of data areneeded to predictively model Earth’s most abundant biologicalentities, viruses, and their predominant hosts, microorganisms.

MethodsMethods detailed below are further documented in SI Methods, Figs. S2 andS3, and Tables S1–S4. All source code is freely available at ref. 50.

Dataset. The 32-virome POV dataset (Table S3) (11) was examined to identifypatterns of sequence similarity in viromes and determine the relationshipbetween these patterns and depth, season, proximity to shore, geographicdistance, and oxygen concentration. This dataset is a recently available

public resource that leverages well-characterized sample-to-sequence prep-aration methods to generate quantitative viromes (13, 31). A full descriptionof metadata associated with each virome and methods used to prepare theviromes and perform read quality control is included in SI Methods andTable S3. One additional filtering step was applied beyond the qualitycontrol steps for the POV dataset (11) that entailed removing reads with lowabundance k-mers (k-mer = 1) in their own virome that were suspected ofbeing contaminants (13) and reads with high-abundance k-mers (>1,000)that are likely to be either sequencing artifacts or highly conserved proteindomains that may distort the overall abundance of that read.

k-mer Analyses. In the k-mer analysis below, suffix arrays were created usingmkvtree from the vmatch package version 2.1.5 (51) using parameters (-pl -allout -v).Reads were compared with suffix arrays using vmatch’s vmerstat (-minocc 1-counts) to search for the frequency of 20-bp k-mers across the read. The k-mersize was set by examining the uniqueness ratio in the dataset (52). The k-mervalue of 20 was chosen given that it represented an inflection point wherek-mer hits moved from random to representative of the sequence content.

Pairwise All-vs.-All Analysis of Viromes. High-quality reads for each viromewere compared with suffix arrays from all other viromes in a pairwise fashion(compute pipeline kmercompare.tar) to achieve an all-vs.-all analysis of theviromes [virome i vs. virome j, (for i = 1,. . .,32) and (for j = 1,. . .,32)]. Theabundance for each read (in virome i) was calculated by finding the modek-mer value for all k-mers in that read compared with the virome j suffixarray (SI Methods and Figs. S2 and S3). This analysis resulted in a singleabundance value (k-mer mode) for each read in virome i compared withvirome j. The data were then normalized by averaging ðyi,jÞ (shared readcount) and ðni,jÞ (total read count) between virome i and virome j. Nor-malized shared read counts were used to construct a 32 × 32 matrixof viromes.

Network Analysis. To model the valued (nonbinary) nondirected data above,we consider the latent space approach outlined in Eq. 1 (23–25, 53). Ournetwork modeling framework, via random effects, decomposes the statis-tical variation in the data to account for (i) the activity level ðaiÞ of eachvirome i (average amount of sequence space shared across the network foreach virome i) and (ii) similarity (clustering) of shared sequence amountamong viromes. For i ), z′i zj is measure of distance and similarity betweenviromes i and j. Each virome’s position ðziÞ may be visualized in ak-dimensional latent space Z (after a Procrustes’ transformation to convertinto a similar grid to compare) where virome i and virome j are consideredsimilar if they are close in that space. For ease of visualization, we considerthe case where k= 2 (ref. 53 considered a 1D space).

Finally, we account for a set of relational covariates (xij = 1 if similar, 0 ifnot) based on geographic region, season, proximity to shore, depth, andoxygen concentration using values in Table S3. In the case of oxygen con-centration, which is a continuous value, high and low oxygen values weredetermined based on a cutoff of 0.06 mL/L.

log�yi,j

�= α+ γ log

�ni,j

�+ β′xij + ai + aj + z′i zj + «ij

i< j,ai ∼ identically  distributed  normal

�0,σ2a

�,

zi,1∼ identically  distributed  normal�0,σ2z1

�,

zi,2 ∼ identically  distributed  normal�0,σ2z2

�,

«ij ∼ identically  distributed  normal�0,σ2«

�:

[1]

To estimate the parameters in the model, a Bayesian inferential approach wasconsidered using the R statistical software (54) and gbme.R obtained fromrefs. 24 and 55. For our analyses, empirical Bayes priors were considered (thedefault for the gbme.R). To examine the joint posterior distribution of theparameters, a Markov chain of 1,000,000 scans was constructed. The first500,000 scans were removed for burn-in, and the chain was thinned by every100th scan, leaving 5,000 samples.

Construction of Euler Diagrams Depicting Shared Read Content in Networks.Using data from the pairwise k-mer analysis described above, reads weredetected that were unique or shared between subsets of viromes that visuallyclustered in the networks using a PERL script (get_section.pl). Reads wereconsidered exclusive if they were present (mode k-mer ≥ 2) in two or moreviromes in a cluster and absent (mode k-mer < 2) from viromes outside thatcluster. For single virome clusters, all reads that were not shared with otherviromes and present within that single virome at a k-mer abundance > 2were considered exclusive. Reads that were present in a virome just once

Hurwitz et al. PNAS Early Edition | 5 of 6

MICRO

BIOLO

GY

Page 6: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

(k-mer = 1) were removed from the analysis given a higher probability ofcontamination (13) per the discussion above. The results were then used tocompute an Euler diagram using the venneuler function (56) in the R statisticalsoftware (54).

Annotating Exclusive Reads. Exclusive reads per the method above for LinePsummer photic viromes, summer aphotic viromes, winter photic viromes, andwinter aphotic viromes were compared against the similarity matrix ofproteins (SIMAP) released on August 20, 2013 (57) using BLASTX (58) to assignfunction as previously described (22). Briefly, these analyses were imple-mented using a custom data analysis pipeline written in Perl and bash shelland executed on a high-performance computer using PBSPro (blastpipeline_simap.tar). Hits were considered significant if they had an E value < 0.001,and only top hits were retained. Interpro ids in the SIMAP functional anno-tation were mapped to EC numbers using the swissprot_kegg_proteins_ec.csvas a mapping (59) (ipr_to_ec.pl). Read hit counts were normalized based on

sequencing effort in the included viromes and converted into ipath2 format(create_ipath.pl) for visual representation in the ipath2 viewer (58).

ACKNOWLEDGMENTS. We thank Tucson Marine Phage Laboratory mem-bers for comments on the manuscript; D. D. Billheimer for statisticssupport; E. Allers, L. Deng, M. Dude-Duhaime, B. Poulos, J. Wright, K. Mitchell,C. Mewis, and A. Worden for logistical support, sample collection, and/orprocessing of viral concentrates; and University Information Technology ServicesResearch Computing Group for high throughput computing access and support.Sequencing was provided by the US Department of Energy Joint Genome In-stitute Community Sequencing Program under the Office of Science of the USDepartment of Energy Contract DE-AC02-05CH11231 and the Gordon and BettyMoore Foundation Marine Microbial Initiative, whereas funding was from Na-tional Science Foundation Grants DBI-0850105 and OCE-0961947, Biosphere2, BIO5, and Gordon and Betty Moore Foundation Grant GBMF3790 (toM.B.S.), as well as an Integrative Graduate Education Research Trainee-ship and National Science Foundation graduate research fellowship(to B.L.H.).

1. Falkowski PG, Fenchel T, Delong EF (2008) The microbial engines that drive Earth’sbiogeochemical cycles. Science 320(5879):1034–1039.

2. Caporaso JG, Paszkiewicz K, Field D, Knight R, Gilbert JA (2012) The Western EnglishChannel contains a persistent microbial seed bank. ISME J 6(6):1089–1093.

3. Chow CE, Fuhrman JA (2012) Seasonality and monthly dynamics of marine myoviruscommunities. Environ Microbiol 14(8):2171–2183.

4. Fortunato CS, Herfort L, Zuber P, Baptista AM, Crump BC (2012) Spatial variabilityoverwhelms seasonal patterns in bacterioplankton communities across a river toocean gradient. ISME J 6(3):554–563.

5. Zaikova E, et al. (2010) Microbial community dynamics in a seasonally anoxic fjord:Saanich Inlet, British Columbia. Environ Microbiol 12(1):172–191.

6. Breitbart M (2012) Marine viruses: Truth or dare. Annu Rev Mar Sci 4:425–448.7. Holmfeldt K, et al. (2013) Twelve previously unknown phage genera are ubiquitous in

global oceans. Proc Natl Acad Sci USA 110(31):12798–12803.8. Edwards RA, Rohwer F (2005) Viral metagenomics. Nat Rev Microbiol 3(6):504–510.9. Breitbart M, et al. (2002) Genomic analysis of uncultured marine viral communities.

Proc Natl Acad Sci USA 99(22):14250–14255.10. Angly FE, et al. (2006) The marine viromes of four oceanic regions. PLoS Biol 4(11):

e368.11. Hurwitz BL, Sullivan MB (2013) The Pacific Ocean virome (POV): A marine viral met-

agenomic dataset and associated protein clusters for quantitative viral ecology. PLoSONE 8(2):e57355.

12. Yooseph S, et al. (2007) The Sorcerer II Global Ocean Sampling expedition: Expandingthe universe of protein families. PLoS Biol 5(3):e16.

13. Hurwitz BL, Deng L, Poulos BT, Sullivan MB (2013) Evaluation of methods to con-centrate and purify ocean virus communities through comparative, replicated met-agenomics. Environ Microbiol 15(5):1428–1440.

14. Ignacio-Espinoza JC, Solonenko SA, Sullivan MB (2013) The global virome: Not as bigas we thought? Curr Opin Virol 3(5):566–571.

15. Degnan PH, Ochman H (2012) Illumina-based analysis of microbial community di-versity. ISME J 6(1):183–194.

16. Edwards RA, et al. (2012) Real time metagenomics: Using k-mers to annotate meta-genomes. Bioinformatics 28(24):3316–3317.

17. Song K, et al. (2013) Alignment-free sequence comparison based on next-generationsequencing reads. J Comput Biol 20(2):64–79.

18. Jiang B, et al. (2012) Comparison of metagenomic samples using sequence signatures.BMC Genomics 13:730.

19. Dinsdale EA, et al. (2008) Functional metagenomic profiling of nine biomes. Nature452(7187):629–632.

20. Williamson SJ, et al. (2008) The Sorcerer II Global Ocean Sampling Expedition: Met-agenomic characterization of viruses within aquatic microbial samples. PLoS ONE 3(1):e1456.

21. Bench SR, et al. (2007) Metagenomic characterization of Chesapeake Bay vir-ioplankton. Appl Environ Microbiol 73(23):7629–7641.

22. Hoff PD, Raftery A, Handcock M (2002) Latent space approaches to social networkanalysis. J Am Stat Assoc 97(460):1090–1098.

23. Hoff PD (2005) Bilinear mixed-effects models for dyadic data. J Am Stat Assoc100(469):286–295.

24. Chiu GS, Westveld AH (2011) A unifying approach for food webs, phylogeny, socialnetworks, and statistics. Proc Natl Acad Sci USA 108(38):15881–15886.

25. Hurwitz BL, Hallam SJ, Sullivan MB (2013) Metabolic reprogramming by viruses in thesunlit and dark ocean. Genome Biol 14(11):R123.

26. Sharon I, et al. (2011) Comparative metagenomics of microbial traits within oceanicviral communities. ISME J 5(7):1178–1190.

27. Zhang J, Li Y, Chen W, Du GC, Chen J (2012) Glutathione improves the cold resistanceof Lactobacillus sanfranciscensis by physiological regulation. Food Microbiol 31(2):285–292.

28. Breitbart M, Rohwer F (2005) Here a virus, there a virus, everywhere the same virus?Trends Microbiol 13(6):278–284.

29. Brum JR, Schenck RO, Sullivan MB (2013) Global morphological analysis of marineviruses shows minimal regional variation and dominance of non-tailed viruses. ISME J7(9):1738–1751.

30. Duhaime MB, Sullivan MB (2012) Ocean viruses: Rigorously evaluating the metagenomicsample-to-sequence pipeline. Virology 434(2):181–186.

31. Ladau J, et al. (2013) Global marine bacterial diversity peaks at high latitudes inwinter. ISME J 7(9):1669–1677.

32. Brown MV, et al. (2012) Global biogeography of SAR11 marine bacteria. Mol Syst Biol8:595.

33. Coleman ML, Chisholm SW (2007) Code and context: Prochlorococcus as a model forcross-scale biology. Trends Microbiol 15(9):398–407.

34. Weinbauer MG (2004) Ecology of prokaryotic viruses. FEMS Microbiol Rev 28(2):127–181.

35. DeLong EF, et al. (2006) Community genomics among stratified microbial assemb-lages in the ocean’s interior. Science 311(5760):496–503.

36. Jiang S, Fu W, Chu W, Fuhrman JA (2003) The vertical distribution and diversity ofmarine bacteriophage at a station off Southern California.Microb Ecol 45(4):399–410.

37. Steward G, Montiel JL, Azam F (2000) Genome size distributions indicate variabilityand similarities among marine viral assemblages from diverse environments. LimnolOceanogr 45(8):1697–1706.

38. Freeland H (2007) A short history of ocean station papa and Line P. Prog Oceanogr 75(2):120–125.

39. Whitney FA, Freeland HJ, Robert M (2007) Persistently declining oxygen levels in theinterior waters of the eastern subarctic Pacific. Prog Oceanogr 75(2):179–199.

40. Parsons RJ, Breitbart M, Lomas MW, Carlson CA (2012) Ocean time-series reveals re-curring seasonal patterns of virioplankton dynamics in the northwestern SargassoSea. ISME J 6(2):273–284.

41. Gilbert JA, et al. (2012) Defining seasonal marine microbial community dynamics.ISME J 6(2):298–308.

42. Wright JJ, Konwar KM, Hallam SJ (2012) Microbial ecology of expanding oxygenminimum zones. Nat Rev Microbiol 10(6):381–394.

43. Brum JR, Steward GF (2010) Morphological characterization of viruses in the stratifiedwater column of alkaline, hypersaline Mono Lake. Microb Ecol 60(3):636–643.

44. Cassman N, et al. (2012) Oxygen minimum zones harbour novel viral communitieswith low diversity. Environ Microbiol 14(11):3043–3065.

45. Whitney F, Crawford WR, Harrison PJ (2005) Physical processes that enhance nutrienttransport and primary productivity in the coastal and open ocean of the subarctic NEPacific. Deep Sea Res Part II Top Stud Oceanogr 52(5):681–706.

46. Allers E, et al. (2013) Diversity and population structure of Marine Group A bacteriain the Northeast subarctic Pacific Ocean. ISME J 7(2):256–268.

47. Dinsdale EA, et al. (2013) Multivariate analysis of functional metagenomes. Front Genet 4:41.

48. Huttenhower C (2014) MaAsLin: Multivariate analysis by linear models. Available at http://huttenhower.sph.harvard.edu/maaslin. Accessed December 30, 2013.

49. Hurwitz BL (2014) TMPL source code. Available at http://code.google.com/p/tmpl.Accessed December 30, 2013.

50. vmatch (2013) vmatch package version 2.1.5. Available at www.vmatch.de.51. Kurtz S, Narechania A, Stein JC, Ware D (2008) A new method to compute K-mer

frequencies and its application to annotate large repetitive plant genomes. BMCGenomics 9:517.

52. Chiu GS, Westveld AH (2014) A statistical social network model for consumption datain trophic food webs. Stat Methodol 17(4432):139–160.

53. R Core Team (2012) R: A Language and Environment for Statistical Computing (RFoundation for Statistical Computing, Vienna).

54. Hoff P (2013) gbme.R. http://www.stat.washington.edu/hoff/Code/hoff_2005_jasa.Accessed on December 31, 2013.

55. Wilkinson L (2012) Exact and approximate area-proportional circular Venn and Eulerdiagrams. IEEE Trans Vis Comput Graph 18(2):321–331.

56. Rattei T, et al. (2006) SIMAP: the similarity matrix of proteins. Nucleic Acids Res34(Database issue):D252–D256.

57. Yamada T, Letunic I, Okuda S, Kanehisa M, Bork P (2011) iPath2.0: Interactive path-way explorer. Nucleic Acids Res 39(Web Server issue):W412–W415.

58. De Ferrari L, Aitken S, van Hemert J, Goryanin I (2012) EnzML: Multi-label predictionof enzyme classes using InterPro signatures. BMC Bioinformatics 13:61.

59. Altschul SF, et al. (1997) Gapped BLAST and PSI-BLAST: A new generation of proteindatabase search programs. Nucleic Acids Res 25(17):3389–3402.

6 of 6 | www.pnas.org/cgi/doi/10.1073/pnas.1319778111 Hurwitz et al.

Page 7: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

Supporting InformationHurwitz et al. 10.1073/pnas.1319778111SI MethodsVirome, Metadata, and K-mer Analysis Details. Constructing viromes.As previously described, viromes were constructed from 32 sea-water samples in the Pacific Ocean that varied by depth, season,proximity to shore, geographic distance, and oxygen concentration(Table S3 and Fig. S2) (1, 2). Briefly, seawater samples wereprefiltered using a 150-μm grade A glass microfiber filter toenrich for bacterial and viral-sized particles in the filtrate (Fig.S2). The filtrate was then passed through a subsequent 0.22-μmfilter to enrich for viral-sized particles only. Viral-sized particleswere then concentrated from the remaining filtrate using FeCl3precipitation and purified by DNase and CsCl. Three com-parison viromes were also constructed from a single sample atScripps Pier (SIO) using the following concentration andpurification protocols: (i) tangential flow filtration (TFF) andDNase and CsCl, (ii) FeCl3 precipitation and DNase only, and(iii) FeCl3 precipitation and DNase and sucrose as previouslydescribed (1). Following DNA extraction using Wizard PCRDNA Purification Resin and Minicolumns as previously described(3), viral DNA was randomly size sheared and amplified usinglinker amplification (LA) as described previously (4) in prepara-tion for sequencing. Samples were sequenced using GS FLXTitanium sequencing chemistry on a 454 Genome Sequencer.Multiple samples were multiplexed on a single sequencing run byadding sample specific molecular barcodes during adapterligation in the library preparation step.Data preparation.

Quality control of reads. Following sequencing, reads were passedthrough a quality filter to remove low-quality reads that were lessthan 2 SDs from the mean length and quality or contained an “N”

anywhere in the read (Fig. S2). To remove technical replicates,high-quality reads were then passed through cd-hit-454 (usingdefault parameters, version 4.5.5) (5). Next, reads were binnedby sample based on their molecular barcode, and the barcodeand platform-specific adapter were trimmed to produce the 32viromes used in this analysis. Custom quality filtering code waswritten in Perl and shell script to implement this protocol as apipeline on a compute cluster running PBSPro (screenpipe.tar).

K-mer analyses. In each k-mer analysis below (both for removingcontaminating reads and for pairwise all-vs.-all comparisonof viromes), suffix arrays were created using mkvtree from thevmatch package version 2.1.5 (www.vmatch.de) using parame-ters (-pl -allout -v). Reads were compared with suffix arrays usingvmatch’s vmerstat (-minocc 1 -counts) to search for the frequencyof 20-bp k-mers across the read.

Removal of high and low abundance contaminating reads. To removeother potential sequencing errors, a k-mer–based approach wasapplied to compare reads from each virome to a suffix arrayfrom the same virome (Figs. S2 and S3). The main concept wasthat rare reads, wherein the mode value of k-mers in the readis <1 in the same virome (Fig. S3), are likely to be con-taminants (1, 6) and therefore were removed before furtheranalysis. Moreover, portions of the read with k-mers that ap-pear >1,000 [more than 10× the average read coverage bycontig assembly analysis (2)] in the suffix array for the samevirome are likely to be either sequencing artifacts or highlyconserved protein domains that may distort the overall abun-dance of that read. As a result, these high-abundance k-merswere masked out with Ns in the read and trimmed from thebeginning or end of the read. Further, any reads that were lessthan 100 bp after masking and trimming were removed. Giventhis k-mer filtering approach, we are able to detect reads with

aberrant k-mers (from sequencing artifact or in highly con-served protein domains) that could confound an analysis of therelative abundance of reads between metagenomes.

Pairwise all-vs.-all analysis of viromes. After reads with aberrantk-mers were removed (both low and extremely high abundancek-mers), reads for each virome were compared with suffix arraysfrom all other viromes in a pairwise fashion (compute pipelinekmercompare.tar) to achieve an all-vs.-all analysis of the viromes[virome i vs. virome j, for ði= 1; . . . ; 32Þ and ðfor j= 1; . . . ; 32Þ].Data analysis pipeline.

Matrix of read counts based on reads with shared k-mers. Followingthe k-mer–based pairwise analysis of viromes, read mode tableswere created to capture the abundance of each read betweenviromes (number of times virome i read appears in virome j; Fig.S3). The abundance for each read (in virome i) was calculated byfinding the mode k-mer value for all k-mers in that read com-pared with the virome j suffix array (Fig. S3). This analysis re-sulted in a single abundance value (k-mer mode) for each read invirome i compared with virome j (Fig. S3). The mode tables werethen used to construct a 32 × 32 matrix of shared read countsðyi;jÞ between pairwise combinations of viromes. Reads in viromei were considered to be shared with virome j, if the mode k-mervalue for the read was >2. Each shared read in the mode tableincrements the total shared read ðyi;jÞ count for the pair of vi-romes by 1.

Creating matrices of covariates. Matrices of relational covariateswere created for each metadata type in Table S3, specificallygeographic region, season, proximity to shore, depth, and oxygenconcentration. For each cell in the matrix comparing two viromes,if two samples have exactly the same value, then they are codedðxij = 1Þ for being the same; otherwise, they are coded as ðxij = 0Þ.In the case of oxygen concentration, which is a continuous value,high and low oxygen values were established using a cutoff of0.06 mL/L (low oxygen values are indicated in bold in Table S3).Viromes were then coded ðxij = 1Þ for being the same if they wereboth high or low oxygen. Network analyses were performed ac-cording to the detailed methods provided later.

Runtime analyses and comparison with other methods. Given thedramatic decrease in sequencing costs with next-generation se-quencing technologies, rapid and scalable methods to analyzelarge-scale genomic and metagenomic datasets are fundamental.Beyond the biological conclusions outlined here, this article alsooffers a method for dealing with the computational complexity ofmodern datasets. Specifically, our k-mer method is 57× fasterthan an all-vs.-all blast comparison of the same dataset (TableS1). Extrapolation to the scale of datasets currently being gen-erated (∼80,000,000 high-quality reads on a next-generationsequencing platform), the k-mer analysis would complete in 6 hcompared with 1.5 wk for an all-vs.-all blast analysis on a 32-corehigh performance compute cluster (Table S2). Moreover, the k-mer method is comparable in computing time to other scalableheuristic clustering algorithms such as usearch and cdhit (7, 8)(Table S1). Although run times are similar, the k-mer method usesthe entire dataset to compute read abundance across metagenomes(with mode k-mer abundance reported for the read; Fig. S3),whereas such abundance data are lost with clustering methodsbecause the fast heuristics find only the top few hits resulting inpresence/absence data (7, 8). Thus, the k-mer method pro-vides comparable run times but more comprehensive analysisof metagenomes.

Hurwitz et al. www.pnas.org/cgi/content/short/1319778111 1 of 6

Page 8: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

Statistical Modeling Details. Model structure. The relational data thatwe are modeling, in its simplest form, is a proportion yi,j/ni,j, whereyi,j represents the number of reads in common (reading in onedirection) over the total possible number of counts ni,j (reading inone direction). Although a natural approach to deal with thesetype of data are through binomial distribution, we consider analternative by taking the natural log of the proportion within thefollowing regression setting

log�yi; j�ni; j�= β′xi; j + δi; j

log�yi; j�− log

�ni; j�= β′xi; j + δi; j

log�yi; j�= log

�ni; j�+ β′xi; j + δi; j;

where xi,j is a vector of covariates (see the main text and SIMethods for information on their construction), and δi,j is anerror term. Moving the term log(ni,j) over to the right side ofthe regression makes that term an offset (9). However, as ourdata actually consist of reading in two directions and averagingthose results, we have

log�yi; j�= log

�ni; j�+ β′xi; j + δi; j:

Finally, we allow for more generality by not forcing the coefficientof logðni;jÞ to be equal to 1

log�yi; j�= γ log

�ni; j�+ β′xi; j + δi; j: [S1]

As the data are nondirected (yi;j ≡ yj;i and ni;j ≡ nj;i), we only con-sider the data for i < j. To accommodate the potential depen-dencies that arise in nondirected relational data, consider thefollowing decomposition of δi,j into the following mean zero ran-dom effects (based on refs. 10–12):

δi; j = ai + aj + z′i zj + ei; j

ai ∼iid normal

�0; σ2a

zi ∼iid multivariate normalk=2

0;

"σ2z1 00 σ2z2

#!

ei; j ∼iid normal

�0; σ2e

�:

[S2]

Our network modeling framework, via the random effects,decomposes the statistical variation in the data to account for(i) the activity level (ai) of each virome i (average amount ofsequence space shared across the network for each virome i)and (ii) similarity (clustering) of shared sequence amount amongviromes. For ii, z′i zj is measure of distance between viromes i and j.Each virome’s position (zi) may be visualized in a k-dimensionallatent space Z (after a Procrustes’ transformation; see below),where virome i and virome j are considered similar if they areclose in that space. For ease of visualization we consider a 2Dspace (k = 2; considered a 1D space) (13).This modeling approach generalizes stand-alone techniques

based on multidimensional scaling [e.g., principle componentsanalysis (PCoA) and nonmetric multidimensional scaling (nMDS)]by embedding an ordination metric z′i zj into a single inferentialmodel that additionally accounts for the activity level for eachvirome in the network and covariates of interest (10–13). Ac-counting for this dependence structure (expressed by the statis-tical moments below) allows for appropriate quantification ofuncertainty for parameters of interest, including the regressioncoefficients. The importance of single modeling and inferentialframework is highlighted in ref. 11.In particular, the error term leads to the following first moment:

E�δi; j�= 0;

which implies the following first moments for each of the obser-vations:

E�log�yi; j��

= log�ni; j�+ β′xi; j:

The following are the nonzero second and third moments for theerrors (as well as the observations). Note that even though ourdata are dyadic, the third moment is not equal to zero

E�δ2i; j�≡E�δi; jδj; i

�≡E�δ2j;i�= 2σ2a + σ2e + σ4z1 + σ4z2

E�δi; jδi; k

�=E�δi; jδk; j

�=E�δi; jδk; i

�= σ2a

E�δi; jδj; kδk; i

�= σ6z1 + σ6z2:

To estimate the parameters in the model, a Bayesian inferentialapproach was considered using the R statistical software (14) andgbme.R obtained from ref. 10 (www.stat.washington.edu/hoff/Code/hoff_2005_jasa). For our analyses, empirical Bayes priorswere considered (the default for the gbme.R). To examine thejoint posterior distribution of the parameters, a Markov chain of1,000,000 scans was constructed. The first 500,000 scans wereremoved for burn-in, and the chain was thinned by every 100thscan, leaving 5,000 samples.Procrustes transformation. Although the inner products ðzi′zjÞ areidentifiable, individually the random effects (zi) corresponding tothe latent space are unidentifiable without constraints (10, 11,15). Specifically, the inner products are invariant to rotation andreflection of the latent space Z. To circumvent this unidentifi-ability for visualization, for each sth Markov chain Monte Carlo(MCMC) scan, a Procrustes transformation is applied to rotatethe space to a common orientation.Goodness-of-fit. In Table S4, we report the Akaike and Bayesianinformation criteria (AIC and BIC) to compare the networkmixed model (based on Eqs. S1 and S2) to a simpler standardregression model

log�yi; j�= log

�ni; j�+ β′xi;j + ei;j

ei; j ∼iid normal

�0; σ2e

�:

[S3]

Specifically, we considered the following criteria:

AIC=−2 log p�yjθ̂Bayes

�+ 2k

BIC=−2 log p�yjθ̂Bayes

�+ klogðNÞ;

where k is the number of parameters, and N is the number ofdata points. The log likelihoods were evaluated at the means ofthe posterior distributions ½θ̂Bayes =EðθjyÞ� (16, 17); please seeref. 18 for an overview of model selection for mixed models.In considering the effective number of parameters for the ran-dom effects portion of the network model, additional number ofparameters compared with the standard regression model, weused both an optimistic (o) lower bound, consisting of threeadditional parameters ðσ2a; σ2z1; σ2z2Þ, and a pessimistic (p) upperbound where all of the random effects were treated as fixed (si,zi, ∀i = {1, . . ., A = number of nodes}; leading to 3 × A additionalparameters).Based on the AIC values, for both the optimistic and pessi-

mistic effective number of parameters, the network model ispreferred to the standard regression model. The same holdstrue for the BIC values, except for one case (the pessimisticeffective number of parameters for LineP open ocean data).Overall these results suggest that the network structure is animportant consideration when modeling relational metage-nomics data.

Hurwitz et al. www.pnas.org/cgi/content/short/1319778111 2 of 6

Page 9: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

1. Hurwitz BL, Deng L, Poulos BT, Sullivan MB (2013) Evaluation of methods toconcentrate and purify ocean virus communities through comparative, replicatedmetagenomics. Environ Microbiol 15(5):1428–1440.

2. Hurwitz BL, Sullivan MB (2013) The Pacific Ocean virome (POV): A marine viralmetagenomic dataset and associated protein clusters for quantitative viral ecology.PLoS ONE 8(2):e57355.

3. Henn MR, et al. (2010) Analysis of high-throughput sequencing and annotationstrategies for phage genomes. PLoS ONE 5(2):e9083.

4. DuhaimeMB, Deng L, Poulos BT, SullivanMB (2012) Towards quantitative metagenomicsof wild viruses and other ultra-low concentration DNA samples: A rigorous assessmentand optimization of the linker amplification method. Environ Microbiol 14(9):2526–2537.

5. Niu B, Fu L, Sun S, Li W (2010) Artificial and natural duplicates in pyrosequencingreads of metagenomic data. BMC Bioinformatics 11:187.

6. Zhang Q, Pell J, Canino-Koning R, Howe AC, Brown CT (2013) These are not the k-mersyou are looking for: Efficient online k-mer counting using a probabilistic data structure.arXiv:1309.2975.

7. Edgar RC (2010) Search and clustering orders of magnitude faster than BLAST.Bioinformatics 26(19):2460–2461.

8. Huang Y, Niu B, Gao Y, Fu L, Li W (2010) CD-HIT Suite: A web server for clustering andcomparing biological sequences. Bioinformatics 26(5):680–682.

9. Chiu GS, Westveld AH (2011) A unifying approach for food webs, phylogeny, socialnetworks, and statistics. Proc Natl Acad Sci USA 108(38):15881–15886.

10. Chiu GS, Westveld AH (2011) A statistical social network model for consumption datain trophic food webs. Stat Methodol 17(4432):139–160.

11. Gelman A, Carlin JB, Stern HS, Dunson DB, Rubin DB (2014) Bayesian Data Analysis(CRC, Boca Raton, FL).

12. Hoff PD, Raftery AE, Handcock MS (2002) Latent space approaches to social networkanalysis. J Am Stat Assoc 97(460):1090–1098.

13. Hoff PD (2005) Bilinear mixed-effects models for dyadic data. J Am Stat Assoc100(469):286–295.

14. Hoff PD (2007) Model averaging and dimension selection for the singular valuedecomposition. J Am Stat Assoc 102(478):674–685.

15. Kass RE, Raftery AE (1995) Bayes factors. J Am Stat Assoc 90(430):773–795.16. McCullagh P, Nelder JA (1989) Generalized Linear Models (CRC, Boca Raton, FL).17. Muller S, Scealy JL, Welsh AH (2013) Model selection in linear mixed models. Stat Sci

28(2):135–167.18. R Core Team (2013) R: A Language and Environment for Statistical Computing

(R Foundation for Statistical Computing, Vienna).

Fig. S1. Activity levels for viromes in the POV dataset. Dots are the median of the posteriors and bars are the 95% credible intervals for the activity levels ofeach virome. Viromes labeled in red are the four most active in the network (i.e., share the most reads across the network), and those labeled in blue are thethree least active. Virome names follow the convention for the POV dataset as described by Hurwitz and Sullivan (1). Briefly, the initial letter indicates location(G, Great Barrier Reef; S, Scripps Pier; M, MBARI; L, LineP), season is indicated after the first period (Spr, spring; Sum, summer; Fall, fall; Win, winter), proximityto shore is indicated after the second period (C, coastal; I, intermediate; O, open ocean), and depth in meters is indicated after the third period.

1. Hurwitz BL, Sullivan MB (2013) The Pacific Ocean virome (POV): A marine viral metagenomic dataset and associated protein clusters for quantitative viral ecology. PLoS ONE 8(2):e57355.

Hurwitz et al. www.pnas.org/cgi/content/short/1319778111 3 of 6

Page 10: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

Fig. S2. Overview of the methods for molecular analysis, data preparation, and data analysis pipeline.

Hurwitz et al. www.pnas.org/cgi/content/short/1319778111 4 of 6

Page 11: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

Fig. S3. Detailed overview of k-mer analyses and creation of the sample read abundance matrix.

Table S1. Benchmark comparison of pairwise sequence analysismethods for Pacific Ocean viromes

Method used Total reads CPU (s)Runtime(reads/s)

All-vs.-all blast 6,120,792 2,268,000 3k-mer analysis (used here) 6,120,792 39,600 155Usearch (uclust) 6,120,792 38,520 159

Usearch version 7.0.1090 was run with the following parameters: cluster_smallmem -id 0.95’. Given that usearch failed at 49% runtime due to a 4-GBmemory constraint in the open source version, total runtime was calculatedbased on the partial runtime. All-vs.-all blast was run using NCBI Blast version2.2.22 with the following parameters : a 12 -p blastn -v 10 -b 10 -e 1e-3.

Table S2. Compute time on a cluster for all-vs.-all blast analysis vs. k-mer analysis of viromes

Method used Total reads CPU hours CPU daysCPU days on an HPCcluster (32 cores)

Weeks on an HPCcluster (32 cores) Runtime

All-vs.-all blast 6,120,792 630.0 26.3 0.8 0.0 Actual80,000,000 8233.8 343.1 10.7 1.53 Calculated

k-mer analysis (used here) 6,120,792 11.0 0.46 0.0 0.0 Actual80,000,000 143.8 5.99 0.2 0.0 Calculated

Hurwitz et al. www.pnas.org/cgi/content/short/1319778111 5 of 6

Page 12: Modeling ecological drivers in marine viral communities ... · Modeling ecological drivers in marine viral communities using comparative metagenomics and network analyses Bonnie L

Table S3. Thirty-two POV samples and metadata

Sample No. readsGeographic

region Depth (m) SeasonProximity to

shore Oxygen (mL/L)

GD.Spr.C.8m 116,855 GBR 8 Spring Coastal NAGF.Spr.C.9m 82,739 GBR 9 Spring Coastal NAL.Spr.C.10m 107,244 LineP 10 Spring Coastal 7.20L.Spr.I.10m 92,415 LineP 10 Spring Intermediate 6.79L.Spr.O.10m 75,036 LineP 10 Spring Open ocean 7.03L.Sum.O.10m 165,256 LineP 10 Summer Open ocean 6.22L.Win.O.10m 192,685 LineP 10 Winter Open ocean 6.93L.Spr.C.500m 136,876 LineP 500 Spring Coastal 0.59L.Spr.I.500m 58,108 LineP 500 Spring Intermediate 0.94L.Sum.O.500m 42,118 LineP 500 Summer Open ocean 0.89L.Win.O.500m 167,616 LineP 500 Winter Open ocean 0.82L.Spr.C.1000m 97,126 LineP 1,000 Spring Coastal 0.19L.Spr.I.1000m 122,565 LineP 1,000 Spring Intermediate 0.21L.Spr.O.1000m 101,179 LineP 1,000 Spring Open ocean 0.32L.Sum.

O.1000m70,596 LineP 1,000 Summer Open ocean 0.38

L.Win.O.1000m 147,537 LineP 1,000 Winter Open ocean 0.37L.Spr.C.1300m 98,478 LineP 1,300 Spring Coastal 0.35L.Spr.I.2000m 49,914 LineP 2,000 Spring Intermediate 1.34L.Spr.O.2000m 55,332 LineP 2,000 Spring Open ocean 1.24L.Sum.

O.2000m68,516 LineP 2,000 Summer Open ocean 1.23

L.Win.O.2000m 125,896 LineP 2,000 Winter Open ocean 1.31M.Fall.C.10m 303,519 MBARI 10 Fall Coastal 4.01M.Fall.I.10m 321,754 MBARI 10 Fall Intermediate 3.95M.Fall.O.10m 203,238 MBARI 10 Fall Open ocean 3.66M.Fall.I.42m 31,528 MBARI 42 Fall Intermediate 3.90M.Fall.O.105m 156,509 MBARI 105 Fall Open ocean 3.95M.Fall.

O.1000m225,833 MBARI 1,000 Fall Open ocean 0.32

M.Fall.O.4300m

144,588 MBARI 4,300 Fall Open ocean 2.25

SFC.Spr.C.5m 487,339 SIO 5 Spring Coastal NASFD.Spr.C.5m 645,463 SIO 5 Spring Coastal NASFS.Spr.C.5m 504,826 SIO 5 Spring Coastal NASTC.Spr.C.5m 821,404 SIO 5 Spring Coastal NA

Low oxygen samples (<0.60 mL/L) are denoted in bold. NA, not applicable.

Table S4. AIC and BIC to compare the network mixed model to a simpler standard regressionmodel

Network dataset/model logpðy j θ̂BayesÞ k AIC BIC

Full dataset (32 samples)Network 1.687 11 (o) 18.626 64.898

104 (p) 204.626 642.110Standard regression −400.085 8 816.171 849.823

LineP open ocean (11 samples)Network 24.066 9 (o) −30.132 −12.066

39 (p) 29.868 108.154Standard regression −27.374 6 66.748 78.792

LineP spring transect (11 samples)Network 36.755 9 (o) −55.511 −37.445

39 (p) 4.489 82.775Standard regression −31.357 6 74.714 86.758

Optimistic and pessimistic effective numbers of parameters are represented by (o) and (p), respectively.Noticeably smaller AIC and BIC values suggest a better fit.

Hurwitz et al. www.pnas.org/cgi/content/short/1319778111 6 of 6