Streamlining data-intensive biology with workflow systems

Abstract As the scale of biological data generation has increased, the bottleneck of research has shifted from data generation to analysis. Researchers commonly need to build computational workflows that include multiple analytic tools and require incremental development as experimental insights demand tool and parameter modifications. These workflows can produce hundreds to thousands of intermediate files and results that must be integrated for biological insight. Data-centric workflow systems that internally manage computational resources, software, and conditional execution of analysis steps are reshaping the landscape of biological data analysis and empowering researchers to conduct reproducible analyses at scale. Adoption of these tools can facilitate and expedite robust data analysis, but knowledge of these techniques is still lacking. Here, we provide a series of strategies for leveraging workflow systems with structured project, data, and resource management to streamline large-scale biological analysis. We present these practices in the context of high-throughput sequencing data analysis, but the principles are broadly applicable to biologists working beyond this field.


Introduction
Biological research has become increasingly computational. In particular, genomics has experienced a deluge of high-throughput sequencing data that has already reshaped our understanding of the diversity and function of organisms and communities, building basic understanding from ecosystems to human health. The analysis work ows used to produce these insights often integrate hundreds of steps and involve a myriad of decisions ranging from small-scale tool and parameter choices to largerscale design decisions around data processing and statistical analyses. Each step relies not just on analysis code written by the researcher, but on third-party software, its dependencies, and the compute infrastructure and operating system on which the code is executed. Historically, this has led to the patchwork availability of underlying code for analyses as well as a lack of interoperability of the resulting software and analysis pipelines across compute systems [1]. Combined with unmet training needs in biological data analysis, these conditions undermine the reuse of data and the reproducibility of biological research, vastly limiting the value of our generated data [2].
The biological research community is strongly committed to addressing these issues, recently formalizing the FAIR practices: the idea that all life sciences research (including data and analysis work ows) should be Findable, Accessible, Interoperable, and Reusable [3]. For computational analyses, these ideals are readily achievable with current technologies, but implementing them in practice has proven di cult, particularly for biologists with little training in computing [3]. However, the recent maturation of data-centric work ow systems designed to automate and facilitate computational work ows is expanding our capacity to conduct end-to-end FAIR analyses [5]. These work ow systems are designed to handle some aspects of computational work ows internally: namely, the interactions with software and computing infrastructure, and the ordered execution of each step of an analysis. By reducing the manual input and monitoring required at each analysis juncture, these integrated systems ensure that analyses are repeatable and can be executed at much larger scales. In concert, the standardized information and syntax required for rule-based work ow speci cation makes code inherently modular and more easily transferable between projects [5,6]. For these reasons, work ow systems are rapidly becoming the workhorses of modern bioinformatics.
Adopting work ow systems requires some level of up-front investment, rst to understand the structure of the system, and then to learn the work ow-speci c syntax. These challenges can preclude adoption, particularly for researchers without signi cant computational experience [4]. In our experiences with both research and training, these initial learning costs are similar to those required for learning more traditional analysis strategies, but then provide a myriad of additional bene ts that both facilitate and accelerate research. Furthermore, online communities for sharing reusable work ow code have proliferated, meaning the initial cost of encoding a work ow in a system is mitigated via use and re-use of common steps, leading to faster time-to-insight [5,7].
Building upon the rich literature of "best" and "good enough" practices for computational biology [8,9,10], we present a series of strategies and practices for adopting work ow systems to streamline data-intensive biology research. This manuscript is designed to help guide biologists towards project, data, and resource management strategies that facilitate and expedite reproducible data analysis in their research. We present these strategies in the context of our own experiences working with highthroughput sequencing data, but many are broadly applicable to biologists working beyond this eld.

Work ows facilitate data-intensive biology
Data-intensive biology typically requires that researchers execute computational work ows using multiple analytic tools and apply them to many experimental samples in a systematic manner. These work ows commonly produce hundreds to thousands of intermediate les and require incremental changes as experimental insights demand tool and parameter modi cations. Many intermediate steps are central to the biological analysis, but others, such as converting between le formats, are rote computational tasks required to passage data from one tool to the next. Some of these steps can fail silently, producing incomplete intermediate les that imperceptively invalidate downstream results and biological inferences. Properly managing and executing all of these steps is vital, but can be both time-consuming and error-prone, even when automated with scripting languages such as bash.
The emergence and maturation of work ow systems designed with bioinformatic challenges in mind has revolutionized computing in data intensive biology [11]. Work ow systems contain powerful infrastructure for work ow management that can coordinate runtime behavior, self-monitor progress and resource usage, and compile reports documenting the results of a work ow (Figure 1). These features ensure that the steps for data analysis are repeatable and at least minimally described from start to nish. When paired with proper software management, fully-contained work ows are scalable, robust to software updates, and executable across platforms, meaning they will likely still execute the same set of commands with little investment by the user after weeks, months, or years.
To properly direct an analysis, work ow systems need to encode information about the relationships between every work ow step. In practice, this means that each analysis step must specify the input (or types of inputs) needed for that step, and the output (or types of outputs) being produced. This structure provides several additional bene ts. First, work ows become minimally self-documented, as the directed graph produced by work ow systems can be exported and visualized, producing a graphical representation of the relationships between all steps in a pipeline (see Figure 5). Next, work ows are more likely to be fully enclosed without undocumented steps that are executed by hand, meaning analyses are more likely to be reproducible. Finally, each step becomes a selfcontained unit that can be used and re-used across multiple analysis work ows, so scientists can spend less time implementing standard steps, and more time on their speci c research questions. In sum, the internal sca olding provided by work ow systems helps build analyses that are generally better documented, repeatable, transferable, and scalable.

Getting started with work ows
The work ow system you choose will be largely dependent on your analysis needs. Here, we draw a distinction between two types of work ows: "research" work ows that are under iterative development to answer novel scienti c questions, and "production" work ows, which have reached maturity and are primarily used to run a standard analysis on new samples. In particular, research work ows require exibility and assessment at every step: outliers and edge cases may reveal interesting biological di erences, rather than sample processing or technical errors. Many work ow systems can be used for either type, but we note cases where their properties facilitate one of these types over the other.
Using work ows without learning work ow syntax While the bene ts of executing an analysis within a data-centric work ow system are immense, the learning curve associated with command-line systems can be daunting. It is possible to obtain the bene ts of work ow systems without learning new syntax. Websites like Galaxy, Cavatica, and EMBL-EBI MGnify o er online portals in which users build work ows around publicly-available or user-uploaded data [12,13,14]. On the command line, many research groups have used work ow systems to wrap one or many analysis steps (speci ed in an underlying work ow language) in a more user-friendly command-line application that accepts user input and executes the analysis. These pipeline applications allow users to take advantage of work ow software without needing to write the work ow syntax or manage software installation for each analysis step. Some examples include the nf-core RNA-seq pipeline [1,15], the PiGx genomic analysis toolkit [16], the ATLAS metagenome assembly and binning pipeline [17,18], the Sunbeam metagenome analysis pipeline [19,20], and two from our own lab, the dammit eukaryotic transcriptome annotation pipeline [21] and the elvers de novo transcriptome pipeline [22]. These pipeline applications typically execute a series of standard steps, but many provide varying degrees of customizability ranging from tool choice to parameter speci cation.
Choosing a work ow system If your use case extends beyond these tools, there are several scriptable work ow systems that o er comparable bene ts for carrying out your own data-intensive analyses. Each has it own strengths, meaning each work ow software will meet an individuals computing goals di erently (see Table 1). Our lab has adopted Snakemake [23], in part due to its integration with Python, its exibility for building and testing new analyses in di erent languages, and its intuitive integration with software management tools (described below). Snakemake and Next ow [25] are commonly used for developing new research pipelines, where exibility and iterative, branching development is a key feature. Common Work ow Language (CWL) and Work ow Description Language (WDL) are work ow speci cation formats that are more geared towards scalability, making them ideal for production-level pipelines with hundreds of thousands of samples [26]. WDL and CWL are commonly executed on platforms such as Terra [27] or Seven Bridges Platform [28]. Language-speci c work ow systems, such as ROpenSci's Drake [29], can take full advantage of the language's internal data structures, and provide automation and reproducibility bene ts for work ows executed primarily within the language ecosystem. Table 1: Four of the most widely used bioinformatics work ow systems (2020), with links to documentation, example work ows, and general tutorials. In many cases, there may be tutorials online that are tailored for use cases in your eld. All of these systems can interact with tools or tasks written in other languages and can function across cloud computing systems and high-performance computing clusters. Some can also import full work ows from other speci cation languages.

Work ow System Documentation Example Work ow Tutorial
The best work ow system to choose may be the one with a strong and accessible local or online community in your eld, somewhat independent of your computational needs. The availability of eld-speci c data analysis code for reuse and modi cation can facilitate the adoption process, as can community support for new users. Fortunately, the standardized syntax required by work ow systems, combined with widespread adoption in the open science community, has resulted in a proliferation of open access work ow-system code for routine analysis steps [30,31]. At the same time, consensus approaches for data analysis are emerging, further encouraging reuse of existing code [32,33,34,35,36].
The Getting started developing work ows section contains strategies for modifying and developing work ows for your own analyses.

Wrangling Scienti c Software
Analysis work ows commonly rely on multiple software packages to generate nal results. These tools are heterogeneous in nature: they are written by researchers working in di erent coding languages, with varied approaches to software design and optimization, and often for speci c analysis goals. Each program has a number of other programs it depends upon to function ("dependencies"), and as software changes over time to meet research needs, the results may change, even when run with identical parameters. As a result, it is critical to take an organized approach to installing, managing, and keeping track of software and software versions. On many compute systems, systemwide software management is overseen by system administrators, who ensure commonly-used and requested software is installed into a "module" system available to all users. Unfortunately, this system limits software version transparency and does not lend itself well to exploring new work ows and software, as researchers do not have permission to install software themselves. To meet this need, most work ow managers integrate with software management systems that handle software installation, management, and packaging, alleviating problems that arise from complex dependencies and facilitating documentation of software versions. Software management systems range from lightweight systems that manage only the software and its dependencies, to heavyweight systems that control for all aspects of the runtime and operating system, ensuring 100% reproducibility of results across computational platforms and time.
On the lightweight end, the conda package manager has emerged as a leading software management solution for research work ows (Figure 2). Conda handles both cluster permission and version con ict issues with a user-based software environment system, and features a straightforward "recipe" system which simpli es the process of making new software installable (including simple management of versions and updates). These features have led to widespread adoption within the bioinformatics community: packages for new software become quickly available, and can be installed easily across platforms. However, conda does not completely isolate software installations and aims neither for bitwise reproducibility nor long-term archiving of install packages, meaning installations will not be completely reproducible over time. Heavyweight software management systems package not only the software of interest, but also the runtime environment information, with the goal of ensuring perfect reproducibility in software installation over time. Tools such as singularity and docker [3,11,37,38] wrap software environments in "containers" that capture and reproduce the runtime environment information. Container-based management is particularly useful for systems where some dependencies may not be installable by lightweight managers. However, software installation within these containers can be limited by similar reproducibility issues, including changes in dependency installations over time. "Functional package managers" such as GNU Guix and Nix strictly require all dependency and con guration details be encoded within each software package, providing the most comprehensively reproducible installations. These have begun to be integrated into some bioinformatic tools [16], but have a steeper learning curve for independent use. In addition, standard installation of these managers requires system-wide installation permissions, requiring assistance from system administrators on most high-performance computing systems. Conda Recipe Repositories: Each program distributed via Conda has a "recipe" describing all software dependencies needed for installation using Conda (each of which must also be installable via Conda). Recipes are stored and managed in the cloud in separate "channels", some of which specialize in particular elds or languages (e.g. the "bioconda" channel specializes in bioinformatic software, while the "conda-forge" channel is a more general e ort to provide and maintain standardized conda packages for a wide range of software) [11]. B. Use Conda Environments to Avoid Installation Con icts: Conda does not require root privileges for software installation, thus enabling use by researchers working on shared cluster systems. However, even user-based software installation can encounter dependency con icts. For example, you might need to use python2 to install and run a program (e.g. older scripts written by members of your lab), while also using snakemake to execute your work ows (requires python>=3.5). By installing each program into an isolated "environment" that contains only the software required to run that program, you can ensure all programs used throughout your analysis will run without issue. Using small, separate environments for your software, specifying the desired software version, and building many simple environments to accommodate di erent steps in your work ow is critical for reducing the amount of time it takes conda to resolve dependency con icts between di erent software tools ("solve" an environment). Conda virtual environments can be created and installed either on the command line, or via an environment YAML le, as shown. In this case, the environment le also speci es which conda channels to search and download programs from. When speci ed in a YAML le, conda environments are easily transferable between computers and operating systems. Broad community adoption has resulted in a proliferation of both conda-installable scienti c software and tools that leverage conda installation speci cations. For example, the Mamba package manager is an open source reimplementation of the conda manager that can install conda-style environments with increased e ciency [39]. The BioContainers Registry is a project that automatically builds and distributes docker and singularity containers for bioinformatics software packages using each package's conda installation recipe [40].

Getting started with software management
Using software without learning software management systems First, there are a number of ways to test software before needing to worry about installation. Some software packages are available as web-based tools and through a series of data upload and parameter speci cations, allow the user to interact with a tool that is running on a back-end server. Integrated development environments (IDE) like PyCharm and RStudio can manage software installation for language-speci c tools, and can be very helpful when writing analysis code. While these approaches do not integrate into reproducible work ows, they may be ideal for testing a tool to determine whether it is useful for your data before integration in your analysis.
Choosing a software management system It is important to balance the time needed to learn to properly use a software management system with the needs of both the project and the researchers. Software management systems with large learning curves are less likely to be widely adopted among researchers with a mix of biological and computational backgrounds. In our experience, software management with conda nicely balances reproducibility with exibility and ease of use. These tradeo s are best for research work ows under active development, where exible software installation solutions that enable new analysis explorations or regular tool updates are critical. For production work ows that require maximal reproducibility, it is worth the larger investment required to use heavyweight systems. This is particularly true for advanced users who can more easily navigate the steps required for utilizing these tools. Container-based software installation via docker and singularity are common for production-level work ows, and Guix and Nix-based solutions are gaining traction. Importantly, the needs and constraints of a project can evolve over time, as may the system of choice.
Integrating software management within work ows Work ow systems provide seamless integration with a number of software management tools. Each work ow system requires di erent speci cation for initiation of software management, but typically requires about one additional line of code per step that requires the use of software. If the software management tool is installed locally, the work ow will automatically download and install the speci ed environment or container and use it for speci ed step.
In our experience, the complete solution for using scienti c software involves a combination of approaches. Interactive and exploratory analyses conducted in IDEs and jupyter notebooks (usually with local software installation with conda) are useful for developing an analysis strategy and creating an initial work ow. This is then followed by work ow-integrated software management via conda, singularity, or nixOS for executing the resulting work ow on many samples. This process not linear: we often cycle between exploratory testing and automation as we iteratively extend our analyses.

Systematically document your work ows
Pervasive documentation provides indispensable context for biological insights derived from an analysis, facilitates transparency in research, and increases reusability of the analysis code. Good documentation covers all aspects of a project, including le and results organization, clear and commented code, and accompanying explanatory documents for design decisions and metadata. Work ow systems facilitate building this documentation, as each analysis step (with chosen parameters) and the links between those steps are completely speci ed within the work ow syntax. This feature streamlines code documentation, particularly if you include as much of the analysis as possible within the automated work ow framework. Outside of the analysis itself, applying consistent organizational design can capitalize on the structure and automation provided by work ows to simplify the generation of quality documentation for all aspects of your project. Below, we discuss project management strategies for building reproducible work ow-enabled biological analyses.

Use consistent, self-documenting names
Using consistent and descriptive identi ers for your les, scripts, variables, work ows, projects, and even manuscripts helps keep your projects organized and interpretable for yourself and collaborators. For work ow systems, this strategy can be implemented by tagging output les with a descriptive identi er for each analysis step, either in the lename or by placing output les within a descriptive output folder. For example, the le shown in Figure 3 has been preprocessed with a quality control trimming step. For large work ows, placing results from each step of your analysis in isolated, descriptive folders can be essential for keeping your project workspace clean and organized. For ease of grouping and referring to input les, it is useful to keep unique sample identi cation in the lename, often with a metadata le explaining the meaning of each unique descriptor. For analysis scripts, it can help to implement a numbering scheme, where the name of rst le in the analysis begins with "00", the next with "01", etc. For output les, it can help to add a short, unique identi er to output les processed with each analysis step. This particular le is a RAD sequencing fastq le of a sh species that has been preprocessed with a fastq quality trimming tool.

Store work ow metadata with the work ow
Developing biological analysis work ows can involve hundreds of small decisions: What parameters work best for each step? Why did you use a certain reference le for annotation as compared with other available les? How did you nally manage to get around the program or installation error? All of these pieces of information contextualize your results and may be helpful when sharing your ndings. Keeping information about these decisions in an intuitive and easily accessible place helps you nd it when you need it. To capitalize on the utility of version control systems described below, it is most useful to store this information in plain text les. Each main directory of a project should include notes on the data or scripts contained within, so that a collaborator could look into the directory and understand what to nd there (especially since that "collaborator" is likely to be you, a few months from now!). Code itself can contain documentation -you can include comments with the reasoning behind algorithm choice or include a link to online documentation or solution that helped you decide how to shape your di erential expression analysis. Larger pieces of information can be kept in "README" or notes documents kept alongside your code and other documents. For example, a GitHub repository documenting the reanalysis of the Marine Microbial Eukaryote Transcriptome Sequencing Project uses a README alongside the code to document the work ow and digital object identi ers for data products [41,42]. While this particular strategy cannot be automated, it is critical for interpreting the nal results of your work ow.

Document data and analysis exploration using computational notebooks
Computational notebooks allow users to combine narrative, code, and code output (e.g. visualizations) in a single location, enabling the user to conduct analysis and visually assess the results in a single le (see Figure 4). These notebooks allow for fully documented iterative analysis development, and are particularly useful for data exploration and developing visualizations prior to integration into a work ow or as a report generated by a work ow that can be shared with collaborators. shows a Jupyter Notebook, where code, text, and results are rendered inline as each code chunk is executed [44]. The second grey chunk is a raw Markdown chunk with text that will be rendered inline when executed. Both notebooks generate a histogram of a metadata feature, number of generations, from a long-term evolution experiment with Escherichia coli [45]. Computational notebooks facilitate sharing by packaging narrative, code, and visualizations together. Sharing can be enhanced further by packaging computational notebooks with tools like Binder [46]. Binder builds an executable environment (capable of running RStudio and Jupyter notebooks) out of a GitHub repository using package management systems and docker to build reproducible and executable software environments as speci ed in the repository. Binders can be shared with collaborators (or students in a classroom setting), and analysis and visualization can be ephemerally reproduced or altered from the code provided in computational notebooks.

Visualize your work ow
Visual representations can help illustrate the connections in a work ow and improve the readability and reproducibility of your project. At the highest level, owcharts that detail relationships between steps of a work ow can help provide big-picture clari cation, especially when the pipeline is complicated. For individual steps, a graphical representation of the output can show the status of the project or provide insight on additional analyses that should be added. For example, Figure 5 exhibits a modi ed Snakemake work ow visualization from an RNA-seq quanti cation pipeline [47].

Figure 5:
A directed acyclic graph (DAG) that illustrates connections between all steps of a sequencing data analysis work ow. Each box represents a step in the work ow, while lines connect sequential steps. The DAG shown in this gure illustrates a real bioinformatics work ow for RNA-seq quanti cation was generated by modifying the default Snakemake work ow DAG. This example of an initial work ow used only to quality control and then quantify one FASTQ le against a transcriptome more than doubles the amount of les in a project. When the number of steps are expanded to carry out a full research analysis and the number of initial input les are increased, a work ow can generate hundreds to thousands of intermediate les. Fortunately, work ow system coordination alleviates the need for a user to directly manage le interdependencies. For a larger analysis DAG, see [48] Version control your project As your project develops, version control allows you to keep track of changes over time. You may already do this in some ways, perhaps with frequent hard drive backups or by manually saving di erent versions of the same le -e.g. by appending the date to a script name or appending "version_1" or "version_FINAL" to a manuscript draft. For computational work ows, using version control systems such as Git or Mercurial can be used to keep track of all changes over time, even across multiple systems, scripting languages, and project contributors (see Figure 6). If a key piece of a work ow inexplicably stops working, consistent version control can allow you to rewind in time and identify di erences from when the pipeline worked to when it stopped working. Backing up your version controlled analysis in an online repository such as GitHub, GitLab, or Bitbucket provides critical insurance as you iteratively modify and develop your work ow. To visualize the di erences between each version, text editors such as Atom and online services such as GitHub, GitLab and Bitbucket use red highlighting to denote deletions, and green highlighting to denote additions. In this trivial example, a typo in version 1 (in red) was corrected in version 2 (in green). These systems are extremely useful for code and manuscript development, as it is possible to return to the snapshot of any saved version. This means that version control systems save you from accidental deletions, preserve code you thought you no longer needed and preserve a record of project changes over time.
When combined with online backups, version control systems also facilitate code and data availability and reproducibility for publication. For example, to preserve the version of code that produced published results, you can create a "release": a snapshot of the current code and les in a GitHub repository. You can then generate a digital object identi er (DOI) for that release using a permanent documentation service such as Zenodo ( [49]) and make it available to reviewers and beyond (see "sharing" section, below).

Share your work ow and analysis code
Sharing your work ow code with collaborators, peer reviewers, and scientists seeking to use a similar method can foster discussion and review of your analysis. Sticking to a clear documentation strategy, using a version control system, and packaging your code in notebooks or as a work ow prepare them to be easily shared with others. To go one step further, you can package your code with tools like Binder, ReproZip, or Whole Tale, or make interactive visualizations with tools like Shiny apps or Plotly. These approaches let others run the code on cloud computers in environments identical to those in which the original computation was performed (Figure 4, Figure 7) [46,50,51]. These tools substantially reduce overhead associated with interacting with code and data, and in doing so, make it fast and easy to rerun portions of the analysis, check accuracy, or even tweak the analysis to produce new results. If you also share your code and work ows publicly, you will also help contribute to the growing resources for open work ow-enabled biological research.  [52,53]. Shiny allows you to build interactive web pages using R code. Data is manipulated by R code in real-time in a web page, producing analysis and visualizations of a data set. Shiny apps can contain user-speci able parameters, allowing a user to control visualizations or analyses. As seen above, sample "PT1" is selected, and taxonomic ranks class and order are excluded. Shiny apps allow collaborators who may or may not know R to modify R visualizations to t their interests. B. Plotly heatmap of transcriptional pro ling in human brain samples [54]. Hovering over a cell in the heatmap displays the sample names from the x and y axis, as well as the intensity value. Plotting tools like plotly and vega-lite produce single interactive plots that can be shared with collaborators or integrated into websites [55,56]. Interactive visualizations are also helpful in exploratory data analysis.

Getting started developing work ows
In our experience, the best way to have your work ow system work for you is to include as much of your analysis as possible within the automated work ow framework, use self-documenting names, include analysis visualizations, and keep rigorous documentation alongside your work ow that enables you to understand each decision and entirely reproduce any manual steps. Some of the tools discussed above will inevitably change over time, but these principles apply broadly and will help you design clear, well-documented, and reproducible analyses. Ultimately, you will need to experiment with strategies that work for you -what is most important is to develop a clear set of strategies and implement them tenaciously. Below, we provide a few practical strategies to try as you begin developing your own work ows.
Start with working code When building a work ow for the rst time, start from working examples provided as part of the tool documentation or otherwise available online. This functioning example code then provides a reliable work ow framework free of syntax errors which you can customize for your data without the overhead of generating correct work ow syntax from scratch. Be sure to run this analysis on provided test data, if available, to ensure the tools, and command line syntax function at a basic level. Table 1 provides links to o cial repositories containing tutorials and example biological analysis work ows, and work ow tutorials and code sharing websites like GitHub, GitLab, and Bitbucket have many publicly available work ows for other analyses. If a work ow is available through Binder, you can test and experiment with work ow modi cation on Binder's cloud system without needing to install a work ow manager or software management tool on your local compute system [46].
Test with subsampled data Once you have working work ow syntax, test the step on your own data or public data related to your species or condition of interest. First, create a subsampled dataset that you can use to test your entire analysis work ow. This set will save time, energy, and computational resources throughout work ow development. If working with FASTQ data, a straightforward way to generate a small test set is to subsample the rst million lines of a le ( rst 250k reads): head -n 1000000 FASTQ_FILE.fq > test_fastq.fq While there are many more sophisticated ways to subsample reads, this technique should be su cient for testing each step of a most work ows prior to running your full dataset. In speci c cases, such as eukaryotic genome assembly, you may need to be more intentional with how you subsample reads and how much sample data you use as a test set. Document your process Document your changes, explorations, and errors as you develop. We recommend using the Markdown language so your documentation is in plain text (to facilitate version control), but can still include helpful visual headings, code formatting, and embedded images. Markdown editors with visual previewing, such as HackMD, can greatly facilitate notetaking, and Markdown documents are visually rendered properly within your online version control backups on services such as GitHub [57].
Develop your work ow From your working code, iteratively modify and add work ow steps to meet your data analysis needs. This strategy allows you to nd and x mistakes on small sections of the work ow. Periodically clean your output directory and rerun the entire work ow, to ensure all steps are fully interoperable (using small test data will improve the e ciency of this step!). If possible, using mock or control datasets can help you verify that the analysis you are building actually returns correct biological results. Tutorials and tool documentation are useful companions during development; as with any language, remembering work ow-speci c syntax takes time and practice.

Assess your results
Evaluate your work ow results as you go. Consider what aspects (e.g. tool choice, program parameters) can be evaluated rigorously, and assess each step for expected behavior. Other aspects (e.g. ltering metadata, joining results across programs or analysis, software and work ow bugs) will be more di cult to evaluate. Wherever possible, set up positive and negative controls to ensure your analysis is performing the desired analysis properly. Once you're certain an analysis is executing as designed, tracking down unusual results may reveal interesting biological di erences.

Back up early and often
As you write new code, back up your changes in an online repository such as GitHub, GitLab, or Bitbucket. These services support both drag-and-drop and command line interaction.
Scale up your work ow Bioinformatic tools vary in the resources they require: some analysis steps are compute-intensive, other steps are memory intensive, and still others will have large intermediate storage needs. If using high-performance computing system or the cloud, you will need to request resources for running your pipeline, often provided as a simultaneous execution limit or purchased by your research group on a cost-per-compute basis. Work ow systems provide built-in tools to monitor resource usage for each step. Running a complete work ow on a single sample with resource monitoring enabled generates an estimate of computational resources needed for each step. These estimates can be used to set appropriate resource limits for each step when executing the work ow on your remaining samples.

Find a community and ask for help when you need it
Local and online users groups are helpful communities when learning a work ow language. When you are rst learning, help from more advanced users can save you hours of frustration. After you've progressed, providing that same help to new users can help you cement the syntax in your mind and tackle more advanced uses. Datacentric work ow systems have been enthusiastically adopted by the open science community, and as a consequence, there is a critical mass of tutorials and open access code, as well as code discussion on forums and via social media, particularly Twitter. Post in the relevant work ow forums when you have hit a stopping point you are unable to work through. Be respectful of people's time and energy and be sure to include appropriate details important to your problem (see Strategic troubleshooting section).

Data and resource management for work ow-enabled biology
Advancements in sequencing technologies have greatly increased the volume of data available for biological query [58]. Work ow systems, by virtue of automating many of the time-intensive project management steps traditionally required for data-intensive biology, can increase our capacity for data analysis. However, conducting biological analyses at this scale requires a coordinated approach to data and computational resource management. Below, we provide recommendations for data acquisition, management, and quality control that have become especially important as the volume of data has increased. Finally, we discuss securing and managing appropriate computational resources for the scale of your project.

Managing large-scale datasets
Experimental design, nding or generating data, and quality control are quintessential parts of data intensive biology. There is no substitute for taking the time to properly design your analysis, identify appropriate data, and conduct sanity checks on your les. While these tasks are not automatable, many tools and databases can aid in these processes.

Look for appropriate publicly-available data
With vast amounts of sequencing data already available in public repositories, it is often possible to begin investigating your research question by seeking out publicly available data. In some cases, these data will be su cient to conduct your entire analysis. In others cases, particularly for biologists conducting novel experiments, these data can inform decisions about sequencing type, depth, and replication, and can help uncover potential pitfalls before they cost valuable time and resources.
Most journals now require data for all manuscripts to be made accessible, either at publication or after a short moratorium. Further, the FAIR ( ndable, accessible, interoperable, reusable) data movement has improved the data sharing ecosystem for data-intensive biology [59, 60,61,62,63,64,64,65]. You can nd relevant sequencing data either by starting from the "data accessibility" sections of papers relevant to your research or by directly searching for your organism, environment, or treatment of choice in public data portals and repositories. The International Nucleotide Sequence Database Collaboration (INSDC), which includes the Sequence Read Archive (SRA), European Nucleotide Archive (ENA), and DataBank of Japan (DDBJ) is the largest repository for raw sequencing data, but no longer accepts sequencing data from large consortia projects [66]. These data are instead hosted in consortia-speci c databases, which may require some domain-speci c knowledge for identifying relevant datasets and have unique download and authentication protocols. For example, raw data from the Tara Oceans expedition is hosted by the Tara Ocean Foundation [67]. Additional curated databases focus on processed data instead, such as gene expression in the Gene Expression Omnibus (GEO) [68]. Organism-speci c databases such as Wormbase (Caenorhabditis elegans) specialize on curating and integrating sequencing and other data associated with a model organism [69]. Finally, rather than focusing on certain data types or organisms, some repositories are designed to hold any data and metadata associated with a speci c project or manuscript (e.g. Open Science Framework, Dryad, Zenodo [70]).

Consider analysis when generating your own data
If generating your own data, proper experimental design and planning are essential. For costintensive sequencing data, there are a range of decisions about experimental design and sequencing (including sequencing type, sequencing depth per sample, and biological replication) that impact your ability to properly address your research question. Conducting discussions with experienced bioinformaticians and statisticians, prior to beginning your experiments if possible, is the best way to ensure you will have su cient statistical power to detect e ects. These considerations will be di erent for di erent types of sequence analysis. To aid in early project planning, we have curated a series of domain-speci c references that may be useful as you go about designing your experiment (see Table 2). Given the resources invested in collecting samples for sequencing, it's important to build in a bu er to preserve your experimental design in the face of unexpected laboratory or technical issues. Once generated, it is always a good idea to have multiple independent backups of raw sequencing data, as it typically cannot be easily regenerated if lost to computer failure or other unforeseeable events.

Sequencing type Resources
RNA-sequencing [32,71,72] Metagenomic sequencing [33,73,74] Amplicon sequencing [75,76,77] Microbial isolate sequencing [78] Eukaryotic genome sequencing [79,80,81,82] Whole-genome resequencing [83] RAD-sequencing [84,84,85,86,87,88] single cell RNA-seq [89,90] As your experiment progresses, keep track of as much information as possible: dates and times of sample collection, storage, and extraction, sample names, aberrations that occurred during collection, kit lot used for extraction, and any other sample and sequencing measurements you might be able to obtain (temperature, location, metabolite concentration, name of collector, well number, plate number, machine your data was sequenced, on etc). This metadata allows you to keep track of your samples, to control for batch e ects that may arise from unintended batching during sampling or experimental procedures and makes the data you collect reusable for future applications and analysis by yourself and others. Wherever possible, follow the standard guidelines for formatting metadata for scienti c computing to limit downstream processing and simplify analyses requiring these metadata (see: [10]). We have focused here on sequencing data; for data management over long-term ecological studies, we recommend [91].

Getting started with sequencing data Protect valuable data
Aside from the code itself, raw data are the most important les associated with a work ow, as they cannot be regenerated if accidentally altered or deleted. Keeping a read-only copy of raw data alongside a work ow as well multiple backups protects your data from accidents and computer failure. This also removes the imperative of storing intermediate les as these can be easily regenerated by the work ow.
When sharing or storing les and results, data version control can keep track of di erences in les such as changes from tool parameters or versions. The version control tools discussed in the Work ow-based project management section are primarily designed to handle small les, but GitHub provides support for Git Large File Storage (LFS), and repositories such as the Open Science Framework (OSF), Figshare, Zenodo, and Dryad can be used for storing larger les and datasets [49,70,92,93,94].
In addition to providing version control for projects and datasets, these tools also facilitate sharing and attribution by enabling generation of digital object identi ers (doi) for datasets, gures, presentations, code, and preprints. As free tools often limit the size of les that can be stored, a number of cloud backup and storage services are also available for purchase or via university contract, including Google Drive, Box, Dropbox, Amazon Web Services, and Backblaze. Full computer backups can be conducted to these storage locations with tools like rclone [95].

Ensure data integrity during transfers
If you're working with publicly-available data, you may be able to work on a compute system where the data are already available, circumventing time and e ort required for downloading and moving the data. Databases such as the Sequence Read Archive (SRA) are now available on commercial cloud computing systems, and open source projects such as Galaxy enable working with SRA sequence les directly from a web browser [12,96]. Ongoing projects such as the NIH Common Fund Data Ecosystem aim to develop a data portal to make NIH Common Fund data, including biomedical sequencing data, more ndable, accessible, interoperable, and reusable (FAIR).
In most cases, you'll still need to transfer some data -either downloading raw data or transferring important intermediate and results les for backup and sharing (or both). Transferring compressed les (gzip, bzip2, BAM/CRAM, etc.) can improve transfer speed and save space, and checksums can be used to to ensure le integrity after transfer (see Figure 8). Figure 8: Use Checksums to ensure le integrity Checksum programs (e.g. md5, sha256) encode le size and content in a single value known as a "checksum". For any given le, this value will be identical across platforms when calculated using the same checksum program. When transferring les, calculate the value of the checksum prior to transfer, and then again after transfer. If the value is not identical, there was an error introduced during transfer (e.g. le truncation, etc). Checksums are often provided alongside publicly available les, so that you can verify proper download. Tools like rsync and rclone that automate le transfers use checksums internally to verify that les were transferred properly, and some GUI le transfer tools (e.g. Cyberduck) can assess checksums when they are provided [95]. If you generated your own data and receieved sequencing les from a sequencing center, be certain you also receive a checksum for each of your les to ensure they download properly.

Perform quality control at every step
The quality of your input data has a major impact on the quality of the output results, no matter whether your work ow analyzes six samples or six hundred. Assessing data at every analysis step can reveal problems and errors early, before they waste valuable time and resources. Using quality control tools that provide metrics and visualizations can help you assess your datasets, particularly as the size of your input data scales up. However, data from di erent species or sequencing types can produce anomalous quality control results. You are ultimately the single most e ective quality control tool that you have, so it is important to critically assess each metric to determine those that are relevant for your particular data.
Look at your les Quality control can be as simple as looking at the rst few and last few lines of input and output data les, or checking the size of those les (see Table 3). To develop an intuition for what proper inputs and outputs look like for a given tool, it is often helpful to rst run the test example or data that is packaged with the software. Comparing these input and output le formats to your own data can help identify and address inconsistencies. Table 3: Some commands to quickly explore the contents of a le. These commands can be used on Unix and Linux operating systems to detect common formatting problems or other abnormalities. Visualize your data Visualization is another powerful way to pick out unusual or unexpected patterns. Although large abnormalities may be clear from looking at les, others may be small and di cult to nd. Visualizing raw sequencing data with FastQC ( Figure 9A) and processed sequencing data with tools like the Integrative Genome Viewer and plotting tabular results les using python or R can make aberrant or inconsistent results easier to track down [98,99]. MultiQC summary of FastQC Per Sequence GC Content for 1905 metagenome samples. FastQC provides quality control measurements and visualizations for raw sequencing data from a single sample, and is a near-universal rst step in sequencing data analysis because of the insights it provides [98,99]. FastQC measures and summarizes 10 quality metrics and provides recommendations for whether an individual sample is within an acceptable quality range. Not all metrics readily apply to all sequencing data types. For example, while multiple GC peaks might be concerning in whole genome sequencing of a bacterial isolate, we would expect a non-normal distribution for some metagenome samples that contain organisms with diverse GC content. Samples like this can be seen in red in this gure. B. MultiQC summary of Salmon quant reads mapped per sample for RNA-seq samples [100]. In this gure, we see that MultiQC summarizes the number of reads mapped and percent of reads mapped, two values that are reported in the Salmon log les.
Pay attention to warnings and log les Many tools generate log les or messages while running.
These les contain information about the quantity, quality, and results from the run, or error messages about why a run failed. Inspecting these les can be helpful to make sure tools ran properly and consistently, or to debug failed runs. Parsing and visualizing log les with a tool like MultiQC can improve interpretability of program-speci c log les (Figure 9 [101]).
Look for common biases in sequencing data Biases in sequencing data originate from experimental design, methodology, sequencing chemistry, or work ows, and are helpful to target speci cally with quality control measures. The exact biases in a speci c data set or work ow will vary greatly between experiments so it is important to understand the sequencing method you have chosen and incorporate appropriate ltration steps into your work ow. For example, PCR duplicates can cause problems in libraries that underwent an ampli cation step, and often need to be removed prior to downstream analysis [102,103,104,105,106].
Check for contamination Contamination can arise during sample collection, nucleotide extraction, library preparation, or through sequencing spike-ins like PhiX, and could change data interpretation if not removed [107,108,109]. Libraries sequenced with high concentrations of free adapters or with low concentration samples may have increased barcode hopping, leading to contamination between samples [110].
Consider the costs and bene ts of stringent quality control for your data Good quality data is essential for good downstream analysis. However, stringent quality control can sometimes do more harm than good. For example, depending on sequencing depth, stringent quality trimming of RNAsequencing data may reduce isoform discovery [111]. To determine what issues are most likely to plague your speci c data set, it can be helpful to nd recent publications using a similar experimental design, or to speak with experts at a sequencing core.
Because sequencing data and applications are so diverse, there is no one-size-ts-all solution for quality control. It is important to think critically about the patterns you expect to see given your data and your biological problem, and consult with technical experts whenever possible.

Securing and managing appropriate computational resources
Sequence analysis requires access to computing systems with adequate storage and analysis power for your data. For some smaller-scale datasets, local desktop or even laptop systems can be su cient, especially if using tools that implement data-reduction strategies such as minhashing [112]. However, larger projects require additional computing power, or may be restricted to certain operating systems (e.g. linux). For these projects, solutions range from research-focused high performance computing systems to research-integrated commercial analysis platforms. Both research-only and and commercial clusters provide avenues for research and educational proposals to enable access to their computing resources (see Table 4). In preparing for data analysis, be sure to allocate su cient computational resources and funding for storage and analysis, including large intermediate les and resources required for personnel training. Note that work ow systems can greatly facilitate faithful execution of your analysis across the range of computational resources available to you, including distribution across cloud computing systems.

Getting started with resource management
As the scale of data increases, the resources required for analysis can balloon. Bioinformatic work ows can be long-running, require high-memory systems, or involve intensive le manipulation. Some of the strategies below may help you manage computational resources for your project.

Apply for research units if eligible
There are a number of cloud computing services that o er grants providing computing resources to data-intensive researchers ( Table 4). In some cases, the resources provided may be su cient to cover your entire analysis.
Develop on a local computer when possible Since work ows transfer easily across systems, it can be useful to develop individual analysis steps on a local laptop. If the analysis tool will run on your local system, test the step with subsampled data, such as that created in the Getting started developing work ows section. Once working, the new work ow component can be run at scale on a larger computing system. Work ow system tool resource usage reporting can help determine the increased resources needed to execute the work ow on larger systems. For researchers without access to free or granted computing resources, this strategy can save signi cant cost.
Gain quick insights using sketching algorithms Understanding the basic structure of data, the relationship between samples, and the approximate composition of each sample can very helpful at the beginning of data analysis, and can often drive analysis decisions in di erent directions than those originally intended. Although most bioinformatics work ows generate these types of insights, there are a few tools that do so rapidly, allowing the user to generate quick hypotheses that can be further tested by more extensive, ne-grained analyses. Sketching algorithms work with compressed approximate representations of sequencing data and thereby reduce runtimes and computational resources. These approximate representations retain enough information about the original sequence to recapitulate the main ndings from many exact but computationally intensive work ows. Most sketching algorithms estimate sequence similarity in some way, allowing you to gain insights from these comparisons. For example, sketching algorithms can be used to estimate all-by-all sample similarity which can be visualized as a Principal Component Analysis or a multidimensional scaling plot, or can be used to build a phylogenetic tree with accurate topology. Sketching algorithms also dramatically reduce the runtime for comparisons against databases (e.g. all of GenBank), allowing users to quickly compare their data against large public databases.
Rowe 2019 [113] reviewed programs and genomic use cases for sketching algorithms, and provided a series of tutorial workbooks (e.g. Sample QC notebook: [114]).
Use the right tools for your question RNA-seq analysis approaches like di erential expression or transcript clustering rely on transcript or gene counts. Many tools can be used to generate these counts by quantifying the number of reads that overlap with each transcript or gene. For example, tools like STAR and HISAT2 produce alignments that can be post-processed to generate per-transcript read counts [115,116]. However, these tools generate information-rich output, specifying per-base alignments for each read. If you are only interested in read quanti cation, quasi-mapping tools provide the desired results while reducing the time and resources needed to generate and store read count information [117,118].
Seek help when you need it In some cases, you may nd that your accessible computing system is ill-equipped to handle the type or scope of your analysis. Depending on the system, sta members may be able to help direct you to properly scale your work ow to available resources, or guide you in tailoring computational unit allocations or purchases to match your needs.

Strategies for troubleshooting
Work ows, and research software in general, invariably require troubleshooting and iteration. When rst starting with a work ow system, it can be di cult to interpret code and usage errors from unfamiliar tools or languages [2]. Further, the iterative development process of research software means functionality may change, new features may be added, or documentation may be out of date [119]. The challenges of learning and interacting with research software require time and patience [4].
One of the largest barriers to surmounting these challenges is learning how, when, and where to ask for help. Below we outline a strategy for troubleshooting that can help build your own knowledge while respecting both your own time and that of research software developers and the larger bioinformatic community. In the "where to seek help" section, we also recommend locations for asking general questions around data-intensive analysis, including discussion of tool choice, parameter selection, and other analysis strategies. Beyond these tips, workshops and materials from training organizations such as the Carpentries, R-Ladies, RStudio can arm you with the tools you need to start troubleshooting and jump-start software and data literacy in your community [120]. Getting involved with these workshops and communities not only provides educational bene ts but also networking and career-building opportunities.

How to help yourself: Try to pinpoint your issue or error
Software errors can be the result of syntax errors, dependency issues, operating system con icts, bugs in the software, problems with the input data, and many other issues. Running the software on the provided test data can help narrow the scope of error sources: if the test data successfully runs, the command is likely free of syntax errors, the source code is functioning, and the tool is likely interacting appropriately with dependencies and the operating system. If the test data runs but the tool still produces an error when run with your data and parameters, the error message can be helpful in discovering the cause of the error. In many cases, the error you've encountered has been encountered many times before, and searching for the error online can turn up a working solution. If there is a software issue tracker for the software (e.g. on the GitHub, GitLab, or Bitbucket repository), or a Gitter, Slack, or Google Groups page, performing a targeted search with the error message may provide additional context or a solution for the error. If targeted searches do not return a results, Googling the error message with the program name is a good next step. Searching with several variants and iteratively adding information such as the type of input data, the name of the coding language or computational platform, or other relevant information, can improve the likelihood that a there will be a match. There are a vast array of online resources for bioinformatic help ranging from question sites such as Stack Over ow and BioStars, to personal or academic blogs and even tutorials and lessons written by experts in the eld [121]. This increases the discoverability of error messages and their solutions.
Sometimes, programs fail without outputting an error message. In cases like these, the software's help (usually accessible on the command line via tool-name --help ) and o cial documentation may provide clues or additional example use cases that may be helpful in resolving an error. Syntax errors are extremely common, and typos as small as a single, misplaced character or amount of whitespace can a ect the code. If a command matches the documentation and appears syntactically correct, the software version (often accessible at the command line tool-name --version ) may be causing the error. Best practices for software development follow "semantic versioning" principles, which aim to keep the arguments and functionality the same for all minor releases of the program (e.g. 1.1 to 1.2) and only change functions with major releases (e.g. 1.x to 2.0).

How to seek help: include the right details with your question
When searching for the error message and reading the documentation do not resolve an error, it is usually appropriate to for seek help either from the software developers or from a bioinformatics community. When asking for help, it's essential to provide the right details so that other users and developers can understand the exact conditions that produced the error. At minimum, include the name and version of the program, the method used to install it, whether or not the test data ran, the exact code that produced the error, the error message, and the full output text from the run (if any is produced). The type and version of the operating system you are using is also helpful to include. Sometimes, this is enough information for others to spot the error. However, if it appears that there may bug in the underlying code, specifying or providing the minimum amount of data required to reproduce the error (e.g. reproducible example [122,123]) enables other to reproduce and potentially solve the error at hand. Putting the e ort into gathering this information both increases your own understanding of the problem and makes it easier and faster for others to help solve your issue. Furthermore, it signals respect for the time that these developers and community members dedicate to helping troubleshoot and solve user issues.

Where to seek help: online and local communities of practice
Online communities and forums are a rich source of archived bioinformatics errors with many helpful community members. For errors with speci c programs, often the best place to post is the developers' preferred location for answering questions and solving errors related to their program. For open source programs on GitHub, GitLab, or Bitbucket, this is often the "Issues" tab within the software repository, but it could alternatively be a Google groups list, gitter page, or other speci ed forum. Usually, the documentation indicates the best location questions. If question is more general, such as asking about program choice or work ows, forums relevant to your eld such as Stack Over ow, BioStars, or SEQanswers are good choices, as posts here are often seen by a large community of researchers. Before posting, search through related topics to double check the question has not already been answered. As more research software development and troubleshooting is happening openly in online repositories, it is becoming more important than ever to follow a code of conduct that promotes open and harassment-free discussion environment [124]. Look for codes of conduct in the online forums you participate in, and make sure you do your part to help ensure a welcoming community for participants of all backgrounds and computational competencies.
While there is lots of help available online, there is no substitute for local communities. Local communities may come in the form of a tech meetup, a users group, a hacky hour, or an informal meetup of researchers using similar tools. While this may seem like just a local version of Stack Over ow, the local, member-only nature can help create a safe and collaborative online space for troubleshooting problems often encountered by your local bioinformatics community. The bene t to beginners is clear: learning the best way to post questions and the important parts of errors, while getting questions answered so they can move forward in their research. Intermediate users may actually nd these communities most useful, as they can also accelerate their own troubleshooting skills by helping others solve issues that they have already struggled through. While it can be helpful to have some experts available to help answer questions or to know when to escalate to Stack Over ow or other communities, a collaborative community of practice with members at all experience levels can help all its members move their science forward faster.
If such a community does not yet exist in your area, building this sort of community (discussed in detail in [125]), can be as simple as hosting a seminar series or starting meetup sessions for data analysis co-working. In our experience, it can also be useful to set up a local online forum (e.g. discourse) for group troubleshooting.

Conclusion
Bioinformatics-focused work ow systems have reshaped data-intensive biology, reducing execution hurdles and empowering biologists to conduct reproducible analyses at the massive scale of data now available. Shared, interoperable research code is enabling biologists to spend less time rewriting common analysis steps, and more time on interesting biological questions. We believe these work ow systems will become increasingly important as dataset size and complexity continue to grow. This manuscript provides a directed set of project, data, and resource management strategies for adopting work ow systems to facilitate and expedite reproducible biological research. While the included data management strategies are tailored to our own experiences in high-throughput sequencing analysis, we hope that these principles enable biologists both within and beyond our eld to reap the bene ts of work ow-enabled data-intensive biology.