{'fraction_non_alphanumeric': 0.03367382271468144, 'fraction_numerical': 0.024324792243767313, 'mean_word_length': 5.036050156739812, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Lightweight bioinformatics: evaluating the utility of Single Board Computer (SBC) clusters for portable, scalable Real-Time Bioinformatics in fieldwork environments via benchmarking

The versatility of the current DNA sequencing platforms and the development of portable, nanopore sequencers means that it has never been easier to collect genetic data for unknown sample ID. In fact, the distinction between fieldwork and the laboratory is becoming blurred since genome-scale data can now be collected in challenging conditions in a matter of hours. However, the full scientific and societal benefits of these new methods can only be realised with equally rapid and portable analyses. At present, field-based analyses of genomic data, despite advances in computing technology, remain problematic; laptop computers are relatively expensive and limited in scalability, while cloud- and cluster-based analyses depend, for the time being, on sufficiently reliable high-bandwidth data uplinks to transmit primary data for analysis. Single board computers (SBCs), such as the Raspberry Pi, offer a potential solution to this problem: while less powerful than their laptop cousins, their very individual low cost and power consumption mean modest arrays of SBCs could be used for field-based preprocessing, or complete analyses or primary data. In this study we investigate the performance of one SBC, the Pi 3 Model B+, on a range of typical field-sequencing tasks versus laptop and cloud-based form-factors. Our data analysis pipeline has been made available as a workflow on Github for simple, scalable deployment for a range of uses.


Introduction
The nucleic acids present in every living organism provide not only the essential information 36 needed for species identification to characterise biodiversity in a sample, site, or ecosystem.
They can also be interpreted to reconstruct evolutionary histories hundreds of millions of years 38 back into geologic time, or furnish us with detailed information about the metabolic and immunological activity of a sample of mud, blood, or water. From the discovery of the structure 40 of DNA (1953) this information was hard-won, requiring laboratories with specialised equipment and staff. 42 This is changing, fast. Portable single molecule, real-time DNA sequencers (such as the Oxford Nanopore MinION have now become a commercial reality. Portable sequencers allow 44 DNA-sequencing to happen anywhere, in real-time, with important applications that include disease surveillance and food-chain monitoring. In less than a decade, these devices have 46 moved from the drawing-board to the mainstream of genomics and there is every suggestion that science is set to undergo a transformation: millions of researchers, clinicians, conservation 48 professionals and citizen-scientists will have the potential to sequence and analyse genomic material anytime, anywhere (Erlich, 2015). Uses so far have included epidemic monitoring in traditional high-throughput sequencing (HTS) inserts (tens of thousands of base-pairs compared with a few hundred), plus the availability of PCR-free direct sequencing methods, also make 56 multilocus metagenomics and phylogenomics possible; a potential advantage over molecular barcoding approaches, which are far slower and also subject to error arising from reticulate 58  While bioinformaticians and experimentalists are well-versed in the seeming existence of Moore's Law as applicable to high-performance computing (HPC) clusters and its implications, 62 the past decade has also seen a parallel rise in the availability and interest of single-board computers (SBCs), most notably the Raspberry Pi family. These stripped-back computing 64 devices are cheap (€50 or so), tiny -typically described as 'credit-card-sized', although many are smaller still -and typically consume a tenth of the power needed for a laptop, much less a 66 powerful desktop, fatnode or cluster. Several authors have noted the potential for small (4-20 node) SBC clusters to replace on-site laptops or remote computing resources, in diverse 68 applications ranging from cyberwarfare (Matthews, 2016) to teaching (Barker et al, 2013;Cox et al., 2013). The application of SBC clusters to field-sequencing is nonetheless as immature as 70 the field-sequencing devices are new.

72
In the present study, we investigate the utility of SBCs for field-based bioinformatics analyses.
Several analyses of previously published datasets are carried out to test the performance of the 74 Raspberry Pi 3, perhaps the most common SBC available at the present time, in carrying out typical tasks. Run times are benchmarked and compared to typical values for other platforms. 76 Finally, the wider context and possible future development of this field are considered.

Equipment:
To conduct the present study we assembled a small cluster (6 nodes, plus headnode; see Figure 1a) of Raspberry Pi 3 Model B+ SBCs, and used this cluster to 82 benchmark typical field-sequencing genomics analyses tasks in comparison to a consumer laptop (Apple MacBook Pro, 2011) and a bioinformatics fatnode / enterprise HPC machine (Dell 84 PowerEdge). Field-analysis cluster components are listed in Table 1; specifications for comparison machines in Table 2.  Table 3. Briefly DNA was extracted from fresh plant tissue using commercial kits (Qiagen DNEasy Plant Miniprep) and whole genome shotgun libraries 90 were prepared for MinION R9 and R9.5 chemistry using rapid (SQK-RAD001/RAD003) protocols and kits. Field-extraction and sequencing were carried out in Richmond Park, London, 92 and Snowdonia National Park, Wales. A full list of equipment required for field-sequencing is given in the Supplementary Information for those papers. Operating system/pipeline: Ubuntu 16.04.3 LTS was installed on all nodes. Having 96 experimented with various job schedulers (Condor, Slurm) and chunking approaches, we determined that the most stable configuration was also the simplest (nodes dedicated to 98 individual tasks, working in series from a common read pool). A watch-script was used to monitor a shared 1TB NFS drive, to which the MinION sequencing laptop also had write access 100 to deposit newly sequenced reads in real-time. In prototype, 1000-read chunks were analysed and moved sequentially through the pipeline (shown in Figure 1b). 102 Guppy basecaller: The basecaller is an algorithm responsible for converting raw 104 measurements from the sequencing machine into nucleotide sequences. We used the experimental Guppy basecaller, source provided by Oxford Nanopore Technologies. To Guppy basecaller: 4000 .fast5 reads were basecalled using Guppy. Results are given in Table   S1. To execute adequately, the options for single threading and small (1000) chunk size were 132 required. Basecalling the whole set on a Raspberry pi required mean execution real / user time of 15,146/30,217s (s.d., 213/426s) for the set (approx 3.5s (real) / 7.6s (user) per read; N=5). 134 On the fatnode mean execution real / user time was 530/3194s (s.d., 33/27s) for the set (approx 0.25s (real) / 1s (user) per read; N=3). Effectively, reads were basecalled seven times slower 136 using a single Pi node.

138
Read mapping/matching: BLASTN (Camacho 2008) ran adequately on the Pi SBCs by comparison to other systems running equivalent query task sizes (    Table S3). Similarly, muscle and RAxMLboth installed to the Pi easily, and in series ran well on the SBC nodes though an order of magnitude slower than the lab node (Table S4; Figure  148 4b). Surprisingly higher thread count did not make an appreciable difference to run times.

150
Metagenomic classification: Kraken metagenomic classification of reads from mixed samples did not perform well. Owing to RAM constraints, only the very smallest databases could be 152 queried.

Successes: high-compute, low-memory tasks (BLASTN, Muscle, RAxML) 156
Those tasks focused on CPU resource rather than memory performed well on the SBCs, even in comparison with the other systems (roughly as a function of clock speed, 158 unsurprisingly).

Plausible: high-compute, intermediate-memory tasks (Guppy basecaller)
We found that execution of the experimental Guppy basecaller was plausible for these 162 machines, but higher memory (RAM) constraints meant the low availability on these SBCs limited performance, and careful argument optimisation was needed to gain stable behaviour. 164 Nonetheless, since performance on a single node was within an order of magnitude to that obtained with a lab node, it is feasible that a larger number of Pis (perhaps 4-8) could keep 166 pace with real-time nanopore read generation easily.

A failure: metagenomic classification via Kraken (high-memory)
Kraken is usually recommended for a minumum of 8Gb RAM and unsurprisingly all but 170 the smallest databases (a few taxa) could not be loaded into the limited physical RAM (1Gb) found on the Raspberry Pis. 172

Advantages of SBC clusters 174
Aside from their low cost (and so scalability), the power consumption and portability of SBC clusters compares well with other systems; a grid of 10-20 SBCs, powered from a single 176 AC generator outlet or vehicle cell, would draw no more than 10A/50W (~0.5A, 5vDC each), comparable to (or less than) a single laptop, and with more computational power. A 20-node 178 SBC cluster could, with careful design, dissemble into a small rucksack.

Outstanding challenges
The main shortcoming of these systems is their low RAM, since this precludes the 182 Kraken metagenomic classifier (and genome assembly). However, we have previously argued (Parker et al. 2017; 2018a) that classification of extremely long, but noisy, reads using an exact 184 k-mer approach (as in Kraken) is counterintuitive, and shown that mapping whole reads performance of BLASTN on the SBC cluster is heartening. Our job scheduling/load balancing approach is also naïve and while full MPI parallelisation is unlikely to be efficient (given the 188 limited node interconnect bandwidth available for these systems), further work to optimise an existing scheduler deployment (Slurm; Condor) or devise a new reatltime system, perhaps 190 based on Watchdog or node.js, is likely to yield quick rewards. Finally it should be borne in mind that, since these clusters' main use is envisaged for low-bandwidth sites, pushing software 192 updates or expanding reference datasets in the field will remain challenging.

Conclusion
We have shown that SBC clusters are adequate for a surprising range of useful bioinformatics 196 tasks related to field-based DNA sequencing and analysis. While a single SBC's performance is inferior to a laptop (let alone an HPC/cloud resource) in every aspect except power 198 consumption, the performance gap is not too great to render SBC clusters adequate to perform analyses in cases where cost is a factor, an expensive laptop might not survive, or insufficient 200 bandwidth exists for uplink to remote resources. However, high-memory tasks, including de novo assembly, remain outside the scope of these architectures, and are likely to remain so for 202 the near-future. In addition, improved load balancing / job scheduling efficiency for these resources would greatly improve their utility. 204

Acknowledgements 206
The author thanks James Crowe at RBG Kew, Dan Barker  assigned discrete tasks in the pipeline (delimited by subdirectory structure) with responsibility for monitoring upstream progress and passing completed outputs to the next node., 296 B 300