<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Italian Conference on Big Data and Data Science, September</journal-title>
      </journal-title-group>
      <issn pub-type="ppub">1613-0073</issn>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Enhancing Scalability of Distributed SNPs Calling Pipelines Using Cluster-Driven Partitioning Strategy</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lorenzo Di Rocco</string-name>
          <email>lorenzo.dirocco@uniroma1.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Umberto Ferraro Petrillo</string-name>
          <email>umberto.ferraro@uniroma1.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giorgio Grani</string-name>
          <email>g.grani@uniroma1.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Graph Partitioning, Distributed Computing, Computational Genomics</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dipartimento di Scienze Statistiche, Università di Roma “La Sapienza”</institution>
          ,
          <addr-line>P.le Aldo Moro 5, I-00185 Rome</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>1</volume>
      <fpage>1</fpage>
      <lpage>13</lpage>
      <abstract>
        <p>The genetic composition of individuals within the same species may difer due to mutations in their genomes. Variants calling procedures are pivotal to detect these polymorphisms. Typically, variants calling algorithms use the De Bruijn graph data structure for storing the k-nucleotide long strings sequenced from the genomes of multiple individuals. Subsequently, mutations in an individual can be identified by searching for divergent paths (known as bubbles) in the corresponding De Bruijn graph.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>CEUR</p>
      <p>ceur-ws.org
SNPs.</p>
      <p>However, experimental results have shown that scalability is limited due to the overhead of traversing
paths scattered across diferent computers.</p>
      <p>In this work, we address one of the main problems that prevent distributed De Bruijn graphs from
performing well in practice. Namely, we analyze how a bad distributed partitioning of a De Bruijn graph
may hinder the eficiency of the</p>
      <p>SNPs detection process. Then, we introduce a distributed partitioning
strategy based on a hierarchical clustering method able to overcome this problem. We also provide
an experimental analysis showing how this approach allows for a relevant performance boost of the
considered pipeline and ensures for better scalability.</p>
    </sec>
    <sec id="sec-2">
      <title>1. Introduction</title>
      <p>Advances in New Generation Sequencing (NGS) technologies have led to an explosion in the
amount of genomics data at afordable costs. Because of this massive production of biological
datasets, pivotal tasks in Bioinformatics have become computationally expensive.</p>
      <p>One of the most relevant tasks is variants calling. We use this term to denote a procedure
aimed at detecting variants between the genomes of two or more diferent individuals.
Referencebased algorithms are commonly used to detect the presence of mutations with respect to the
average genome of the corresponding species. However, high-quality reference genomes are
not available for all species and for all applications. For these reasons, it is useful to consider
CEUR
Workshop
Proceedings
reference-free algorithms. These allow comparison of individuals by evaluating reads sequenced
from the corresponding genomes, without relying on an average species sequence.</p>
      <p>The state-of-the-art reference-free methods are usually based on the exploration of a
graphbased data structure, called De Bruijn (DB) graph, that is built from an input collection of reads.
The presence of a polymorphism is then detected by finding some specific types of divergent
paths in the corresponding DB graph. However, the computational and memory requirements of
these algorithms can be prohibitive, making them unsuitable for processing large DB on a single
workstation. Some alternative methods that have emerged recently therefore use distributed
computing to develop reference-free pipelines for variants calling, able to take advantage of the
large availability of memory and computational resources of a computer cluster.</p>
      <p>Despite the theoretical advantages, analyzing a DB graph on a distributed architecture poses
significant challenges. For example, the data trafic required to explore a region of the graph
where each vertex of a path is on a diferent node of the underlying distributed system can
create excessive overhead that negatively afects algorithm performance and scalability.</p>
      <p>
        In this work, we focus on the specific problem of reducing the communication overhead to
pay for exploring distributed DB graphs by considering a recent distributed pipeline presented
in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], that aims at calling a specific type of polymorphisms, namely the Single Nucleotide
Polymorphisms (SNPs). The solution we present is based on a cluster-driven partitioning
strategy used in the initial creation of a DB graph. We expect that this will significantly reduce
the amount of data exchanged between nodes during the invocation of SNPs, which should have
a positive impact on the eficiency and scalability of the pipeline.
      </p>
      <p>
        We also present the results of an experimental analysis performed on a real dataset to compare
our improved partitioning scheme with the default partitioning strategy used by [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>2. Background</title>
      <sec id="sec-3-1">
        <title>2.1. De Bruijn graphs</title>
        <p>The DNA structure consists of two antiparallel strands comprising nucleotide bases, commonly
represented by the alphabet Σ = {, , ,  } . The strands run in opposite directions, and the
bases in the corresponding positions are paired according to specific rules (A-T and C-G).
Consequently, a genomic sequence is usually encoded as a single string of characters drawn
from the alphabet Σ, as the reverse strand is easily obtainable. However, modern sequencing
technologies do not return the entire genome in one continuous sequence. Instead, they generate
huge amounts of nucleotide fragments, called reads. These reads are randomly sequenced from
both strands, and the coverage level determines the number of reads associated with a particular
genomic region.</p>
        <p>Consequently, reconstructing a genome becomes a complex task due to the chaotic reads
samples that need to be assembled. The assembly phase is extremely expensive from the
computational viewpoint since it need to face the time complexity of computing the matching
score for each pair of reads.</p>
        <p>Assembly techniques based on k-mers and the DB graph have revolutionized genomic
analysis. The k-mer-based approach involves splitting the genomic reads into smaller overlapping
subsequences of length k (called k-mers) and building the corresponding DB graph. The
vertices of a DB graph represent the distinct k-mers extracted from the reads sample, while the
edges connect the k-mers that overlap for  − 1 characters. The DB graph provides a compact
and eficient representation of the genome, and traversing its path of overlapping sequences
enhances an eficient reconstruction of the original genomic sequence.</p>
        <p>DB graphs play also crucial role in variants calling. Variants calling refers to the process of
identifying genetic variations between diferent individuals, such as single nucleotide
polymorphisms (SNPs) and insertions/deletions (indels), in a given genomic dataset. The structure of
the DB graph enables eficient and accurate detection of variants. Indeed, when dealing with
sequencing data referring to two or more individuals, the presence of polymorphisms generate
divergent paths, called bubbles. There exist diferent type of bubbles according to corresponding
polymorphisms. In the case of isolated SNPs, we have simple bubble. Figure 1 shows an example.
In real world scenario the topology of graph is extremely complex and the detection of the
divergent is not straightforward.</p>
      </sec>
      <sec id="sec-3-2">
        <title>2.2. Large-scale variants calling</title>
        <p>
          DB graphs tend to become very large and, consequently, dificult to store, when based on
genomic datasets returned by modern sequencing technologies. A possible solution to this
problem consists of introducing compressed data structures for storing a DB graph. This problem
is addressed in [
          <xref ref-type="bibr" rid="ref2 ref3">2, 3</xref>
          ], where a concise representation of a colored DB graph is obtained by
using data structures for string compression and indexing, as the positional Burrows-Wheeler
transform [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>
          Further solutions take into account a probabilistic representation of the DB graph. Among
the proposed techniques,  [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] is one that outperforms many others in terms of space
and time eficiency, when used to retrieve isolated SNPs on genomes of complex organisms. It
features an eficient storage layout where only the nodes of an input DB graph are stored using
a cascade of Bloom Filters [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. The edges are found by properly querying these filters to obtain
paths corresponding to isolated SNPs, even though the Bloom Filters may return non existing
paths due to false positive matches.
        </p>
        <p>
          Despite the potential advantages, the usage of distributed computing for large-scale variants
calling analysis still remains a relatively unexplored field. To the best of our knowledge, [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]
is the only pipeline that leverages a distributed representation of a DB graph to perform SNPs
calling.
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>2.3. Distributed Computing</title>
        <p>Computations on distributed systems enable the processing of huge collections of data. In
distributed computing architectures, a number of computers (called nodes) work together
to solve a single problem. The nodes coordinate their hardware resources using messages
exchanged over a network.</p>
        <sec id="sec-3-3-1">
          <title>2.3.1. MapReduce</title>
          <p>
            The MapReduce (MR) paradigm [
            <xref ref-type="bibr" rid="ref7">7</xref>
            ] is a programming model designed for implementing
distributed algorithms. It considers an input dataset of key-value pairs distributed across a computer
cluster and provides a flow that combines two types of functions:
• map functions. They process each key-value pair to obtain a new (possibly empty) set of
key-value pairs.
• reduce functions. They first collect on a same node all pairs sharing the same key and, then,
they aggregate all values in this collection, returning a (possibly empty) set of key-value
pairs
          </p>
          <p>
            Apache Spark [
            <xref ref-type="bibr" rid="ref8">8</xref>
            ] is the standard framework for developing MapReduce algorithms to be
executed on a distributed computing architecture. Resilient Distributed Datasets (RDDs) are
the core data structures of Spark. RDDs are an abstract representation of the key-value pairs
distributed across the nodes of the distributed system.
          </p>
        </sec>
        <sec id="sec-3-3-2">
          <title>2.3.2. Apache Spark for distributed graph processing</title>
          <p>
            Apache Spark also provides libraries (built on top of RDDs) dedicated to specific tasks. The
GraphX API [
            <xref ref-type="bibr" rid="ref9">9</xref>
            ] is designed for large-scale graph processing on a Spark cluster. This API
introduces a distributed representation of a graph built on top of two RDDs, storing respectively
the vertices and the edges of a graph, with their associated properties. In details, each vertex is
associated with an automatically-generated unique id (vid) and (optionally) a set user-defined
attributes. The edges are modeled as triplets containing the source vertex id, the destination
vertex id, a virtual partition identifier ( pid) and (optionally) a set user-defined attributes.Vertices
and edges are scattered across the nodes of a computer cluster, according to their vid/pid. The
GraphX API employs a default partition strategy and generates the so-called VertexMap RDD
that maps each vertex to the list of partitions containing its incident edges. Leveraging on the
vertices and the edges identifiers, GraphX allows also to consider user-defined graph partition
strategies that may minimize the trafic data and balance the workload of the computing nodes.
GraphX allows to traverse and to analyze a graph, by means of algorithms written using a
special-purpose message-passing paradigm.
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>3. A MapReduce Pipeline for Isolated SNPs Calling</title>
      <p>
        The distributed pipeline we consider in this work has been recently proposed in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. It has
been designed according to the MapReduce paradigm (see Section 2.3.1) and it is a distributed
reformulation of the  algorithm [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], with some relevant improvements. We recall
that  uses a cascade of Bloom filters to store the DB graph. This allows to maintain
very large graphs in a small amount of memory, but it has the disadvantage of leading to the
generation of paths that were not present in the original graph (i.e., chimeric sequences) and,
therefore, have to be eliminated in a subsequent step.
      </p>
      <p>
        In a distributed system, the amount of available memory is usually much larger, since we can
leverage on the computational resources of all nodes of the system. Therefore, in the approach
presented in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the input DB graph is explicitly represented, with no compression at all, thanks
to a distributed representation, thus avoiding the creation of useless chimeric sequences.
      </p>
      <p>Specifically, the proposed algorithm is formulated in three steps, each made of a sequence
of distributed transformations. In the first step, a DB graph  is created from from an initial
distributed collection  of reads. In the second step,  is processed by a distributed algorithm
that searches for all simple bubbles. In the third step, all isolated bubbles, i.e., the SNPs, are
returned in the output. More details on the algorithm follow.</p>
      <sec id="sec-4-1">
        <title>3.1. Step 1: Graph Creation</title>
        <p>
          Given two FASTA/FASTQ files, each containing a set of reads extracted from two diferent
individuals, their contents are loaded in memory using the FASTdoop library [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]. Then, ( + 1)
mers are extracted from each read and stored in a RDD distributed data structure. Finally, a
reduce transformation is executed to count the frequency of each distinct ( + 1) -mer. The
results are stored in a new RDD, containing all the ( + 1) -mers that have been found in the
input reads collection, with their associated overall frequencies.
        </p>
        <p>A map transformation is used to filter out ( +1) -mers with low coverage. Then, after merging
all samples, a DB distributed graph is created using the GraphX library (see Section 2.3.2). Next,
we extract consecutive k-mers from the ( + 1) -mers to feed the distributed collection of vertices
of the DB graph. Then, ( + 1) -mers are added to the distributed collection storing the edges of
the DB graph. The edges connect the vertices corresponding to the two consecutive k-mers.
This process is also performed for the backward strand of each ( + 1) -mer.</p>
      </sec>
      <sec id="sec-4-2">
        <title>3.2. Step 2: Centrality Indices Evaluation</title>
        <p>In this step, two centrality indices telling the number of incoming and outgoing edges for each
vertex  , respectively denoted inDegree and outDegree, are evaluated.</p>
        <p>To do this, for each vertex  , the number of triples containing  in the distributed representation
of  is counted, distinguishing the cases where  is the source vertex from those where  is the
destination vertex. Then, for each vertex, these counts are computed by a distributed reduce
transformation to obtain the corresponding centrality indices.</p>
      </sec>
      <sec id="sec-4-3">
        <title>3.3. Step 3: Simple Bubbles Detection</title>
        <p>In this step, a distributed algorithm is executed over  to find all paths that represent simple
bubbles.</p>
        <p>Initially, vertices with an outDegree greater than 1 are considered as starting vertices and
are marked as enabled. In the first iteration, each enabled triplet sends a path-building message
to its adjacent vertices, including information about the current path (which initially contains
only the starting point) and the iteration number.</p>
        <p>In subsequent iterations, the triplets containing vertices that received messages in the previous
iteration are enabled. When a vertex receives a path-building message from a neighbor, it updates
the received message by adding its own identity and increasing the iteration number. The
vertex stores a copy of the iteration number in its state and broadcasts the updated message to
its adjacent vertices.</p>
        <p>To handle branching bubbles, the algorithm modifies the transmission of path-building
messages. In the first  -1 iterations, the message is only transmitted to destination vertices
with one incoming edge and one outgoing edge. Once the number of iterations reaches  , the
messages are forwarded without checking the degrees of the destination vertex. This change
is because at iteration  , the destination vertex is expected to be the end vertex of the bubble,
allowing multiple incoming and outgoing edges.</p>
        <p>At the end of the execution, after running  iterations, the algorithm identifies vertices with
iteration number  + 1 that have received two messages. These messages contain paths starting
from the same vertex and with the same length. These vertices represent terminal nodes of
sequence pairs containing simple bubbles and are considered as isolated SNPs. They are encoded
as a distributed collection of string pairs.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>4. Our Proposal</title>
      <sec id="sec-5-1">
        <title>4.1. Motivation</title>
        <p>
          When using a distributed approach, one expects that the solution time of a given problem could
be reduced by just employing more computational resources. However, the ability to eficiently
exploit the computational capability of a distributed system is not always a given. This is either
due to the inherent non-parallelism of the problem being solved, or to issues involving the
algorithm itself, its implementation and the way it interacts with the underlying distributed
system. This is the case of the pipeline presented in [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. As shown in Figure 2, the experiments
therein presented have shown a promising level of scalability when exploiting an increasing
number of computing units. However, the reduction in execution times is gradually less and
less pronounced.
        </p>
        <p>A more detailed investigation revealed that this lack of scalability is mainly due to the
suboptimal strategy GraphX uses for partitioning the vertices of the DB graph across diferent
nodes of a distributed system, resulting in a very high number of x-cross paths, i.e. paths of a
distributed graph where vertices are placed over two or more nodes of the distributed system.</p>
        <p>In this scenario, the advantages of adding further computing nodes may be burdened by the
communication overhead introduced by the message-passing mechanism required to explore
the distributed graph. This overhead includes both the exchange of data between computing
units within a node and across diferent nodes. The latter case is significantly more expensive
in terms of network communication times and scalability level.</p>
        <p>Our work focuses on assessing the positive impact on the performance of the considered
algorithm coming from the adoption of a partitioning strategy diferent from the standard one
available with GraphX. Our expectation is that the usage of an improved scheduling strategy
would significantly reduce, when not eliminating at all, the number of x-cross paths. In turn,
this would lead to a significant reduction in the communication overhead between diferent
computing nodes and/or computing units, thus allowing for shorter overall execution times. To
achieve this, our proposal leverages a hierarchical clustering approach to group reads referring
to the same genomic region, enabling an intra-cluster solution for bubbles detection.</p>
      </sec>
      <sec id="sec-5-2">
        <title>4.2. Cluster-driven Partitioning Strategy</title>
        <p>The strategy we propose to improve the partitioning of a DB graph over a distributed system
is based on the assumption that clustering the reads according to an appropriate similarity
metric isolates specific genomic regions, allowing to perform the bubble detection procedure
mostly within them. Consequently, assigning these clusters to diferent independent computing
units for parallel processing is expected to require less communication overhead than using the
standard partitioning strategy, thus enhancing the scalability of the DB graph exploration in a
distributed environment.</p>
        <p>
          It requires two steps. In the Hierarchical Clustering step, the collection of input reads about
two distinct individuals are clustered using a bottom-up approach and a greedy stop criterion.
In the Clusters Binning step, the clusters returned in the previous step are grouped into  distinct
bins scattered across the computational units of the distributed architecture. The generation of
the bins is driven by the application of the longest processing time first rule (i.e.,   rule)[
          <xref ref-type="bibr" rid="ref11 ref12">11, 12</xref>
          ],
to avoid overloading certain nodes. In the following, we will explain the proposed partitioning
strategy in more detail.
        </p>
        <sec id="sec-5-2-1">
          <title>4.2.1. Hierarchical Clustering</title>
          <p>Given an input set of reads sequenced from two individuals, we use a hierarchical bottom-up
algorithm to group those reads that are likely to cover the same genomic region.</p>
          <p>An algorithm of this type implements an iterative procedure that progressively merges
similar elements into larger clusters to eventually obtain a dendrogram, i.e., a hierarchical
tree-like structure representing the clustering relationships. In the initialization step, each read
is considered as a cluster with a single element. Then, in the  -th iteration, for each cluster, the
read closest to the others in the same cluster is selected as representative. Then, the pairwise
similarity matrix between all clusters is calculated and the two closest clusters are merged. This
process continues until obtaining a single large cluster that contains all the reads in the input
dataset.</p>
          <p>Creating the entire dendrogram can be very computationally intensive when working with
large datasets. Moreover, solutions with a small number of clusters should be avoided, as our
strategy aims to detect clusters consisting of very similar reads that refer to the same genomic
region. To achieve this, we incorporated a greedy stopping criterion into the algorithm. Namely,
our hierarchical iterative process stops when the similarity between the two clusters to be
merged at the  -th iteration is less than a certain threshold  . In this way, the choice of the
number of clusters is also automated without the need for a global evaluation of the dendrogram.
If the threshold  is suficiently large, hierarchical clustering yields a large number of clusters
containing a relatively small number of reads. However, if  is too large, reads related to the
same genomic section may be assigned to diferent clusters, causing many bubbles to be missed
during the detection step.</p>
        </sec>
        <sec id="sec-5-2-2">
          <title>4.2.2. Choice of a similarity measure</title>
          <p>We recall that a genomic read is simply a string of characters from the alphabet Σ = {, , ,  } .
Our clustering framework, therefore, requires a similarity measure that can capture the
underlying similarity patterns between strings and is not extremely sensitive to slight variations in
characters. This helps to ensure that reads sequenced from multiple individuals covering the
same genomic regions are clustered together, despite the presence of SNPs in the same cluster.</p>
          <p>
            In this work, we consider the Jaccard index, also known as Jaccard similarity coeficient . This
measure is widely used in computational genomics for assessing similarity between nucleotide
strings and for clustering [
            <xref ref-type="bibr" rid="ref13 ref14">13, 14</xref>
            ]. The Jaccard index quantifies the similarity between two
reads with respect to their shared k-mers. To calculate this coeficient, it is required to extract
the corresponding sets of k-mers from a pair of reads and calculate the percentage of common
k-mers. Mathematically, the Jaccard index can be expressed as follows:
 (, ) =
| ∩ |
| ∪ |
where:
•  and  represent the sets of k-mers extracted from the two genomic reads;
• || and || represent, respectively, the number of distinct k-mers in  and  ;
• | ∩ |
• | ∪ |
represents the number of shared k-mers between  and  ;
represents the total number of unique k-mers in the union between  and  .
The Jaccard index ranges between 0 and 1. The more it is larger, the more the reads are similar.
When it is equal to 1, the reads are identical. Since the Jaccard index evaluates the presence or
the absence of shared k-mers, it is robust to small variations in the reads being compared.
          </p>
        </sec>
        <sec id="sec-5-2-3">
          <title>4.2.3. Binning the clusters</title>
          <p>The clusters returned in the previous step need to be distributed among the computational units
of the distributed system to perform bubble detection in parallel. In this way, each computing
unit processes a bin of clusters according to the available resources. However, the number of
reads changes within the cluster, and some clusters may be overloaded due to the presence
of highly repetitive genomic regions. For this reason, the binning strategy is controlled by an
appropriate scheduling model, to ensure a balanced workload on the computational units.</p>
          <p>We consider this problem as a scheduling problem with identical parallel machines and
no preemption. The objective is to minimize the maximum completion time (makespan) by
assigning each of the  jobs, characterized by their respective processing times {  , = 1, … , } ,
to one of the  parallel identical machines. In our context, these jobs correspond to the tasks
associated with building and exploring the local DB graph belonging to a cluster of reads. The
processing time of each job is estimated based on the number of k-mers extracted from the reads
within the same cluster. The machines, on the other hand, represent the available computational
units. This problem, referred to as  || 
mathematically as follows:
, is known to be NP-hard and can be formulated
(1)
(2)
(3)
(4)
min</p>
          <p>≥ ∑=1</p>
          <p>∀ ∈ {1..}
∑=1   = 1 ∀ ∈ {1.. }
  ∈ {0, 1} ∀ ∈ {1..}  ∈ {1.. }
where  
is the</p>
          <p>,  is the number of jobs,  is the number of machines,   is the
processing time of job  ,   is the decision variable. The value is 1 if the job  is assigned to
machine  , otherwise it is 0. Given the complexity of this problem, many heuristic solutions
have been proposed in literature, as the</p>
          <p>rule. It involves sorting jobs in a non-increasing
order based on their processing times and assigning each job iteratively to the machine that
currently has the minimum completion time. The completion time of a machine is determined
by summing the processing times of all the jobs assigned to that particular machine.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>5. Experimental Analysis</title>
      <p>We conducted an experimental analysis to assess the quality of the proposed clustering-driven
partitioning strategy and evaluate its impact on the scalability.</p>
      <sec id="sec-6-1">
        <title>5.1. Dataset</title>
        <p>
          We downloaded the FASTA file corresponding to chromosome 7 of the average human genome
assembly GRCh37.p13 [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. From this FASTA file, we simulated a sample of reads for our
experiments. Additionally, we used SAMtools [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] to extract the sequencing data referring
to chromosome 7 of the European individual NA12878 from the 30x downsampled alignment
provided by the Genome-in-a-Bottle Consortium [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. Then, we built a distributed DB graph
from the two sets of reads fixing  = 31 , as described in Section 3.1.
        </p>
        <p>The individual NA12878 is accompanied by a VCF file containing the set of high-confidence
variants with respect to the average GRCh37.p13 genome. From this VCF file, we selected 10, 000
SNPs for our analysis. Thereafter, we extracted the portions of the DB graph corresponding to
these SNPs, to compare the GraphX default partitioning strategy with the one outcoming from
our cluster-driven partitioning strategy. From now on, we refer to the filtered DB graph used in
our analysis as DB1e4.</p>
      </sec>
      <sec id="sec-6-2">
        <title>5.2. Computing Environment</title>
        <p>We conducted our experiments on a high-performance computing system that consists of eight
computing nodes. Each node runs on the Linux operating system and is equipped with two
AMD Epyc 7452 processors, 64 compute cores, and 256 GB of RAM. For our experiments, we
employed the 3.1.3 Apache Spark version and the 2.7 Apache Hadoop version.</p>
      </sec>
      <sec id="sec-6-3">
        <title>5.3. Evaluating default partitioning strategy</title>
        <p>First, we evaluated the GraphX default partitioning strategy on DB1e4. Thanks to the
information provided by the VCF file, containing mutations about the individual NA12878, with respect
to the GRCh37.p13 version of the average human genome, we easily identified the bubbles
occurring in the graph. For each bubble, we determined the number of computing units that
need to communicate in order to traverse each edge of the bubble. Since we set  = 31 , each
bubble may be split into up to 31 diferent computing units.</p>
        <p>In this case, the histogram shows that there is no bubble that can be traversed by staying on
a single computing unit. Instead, it is required to involve at least two computing units while,
the most frequent case, requires the involvement of three computing units.</p>
      </sec>
      <sec id="sec-6-4">
        <title>5.4. Scalability</title>
        <p>We compared the time-performance of the distributed pipeline described in Section 3, when
using the GraphX default partitioning strategy against version based on our cluster-driven
partitioning scheme, in terms of scalability.</p>
        <p>First, we performed the SNPs calling procedure on DB1e4 using the aforementioned pipeline
and the default GraphX partitioning strategy, while increasing the number of computing units.
Then, we repeated the same experiment, but using our hierarchical clustering framework and
binning strategy. In this last case, we considered for each run a number of bins that was 4 times
the number of allocated computing units. The resulting bins were then loaded into memory on
the distributed computing architecture, to perform the bubble detection procedure.</p>
        <p>Figure 4 compares the scalability deriving from the application of the two partitioning
approaches, highlighting how our proposed strategy significantly improves the ability to leverage
on an increasing number of computing resources.</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>6. Conclusions</title>
      <p>In this work, we focused on a performance bottleneck afecting Spark-based distributed pipelines
used for SNPs detection and due to the bad performance of the default partitioning strategy
employed by the Spark framework when creating distributed graphs. Thus, we have proposed
an improved partitioning strategy, based on a hierarchical clustering algorithm. According to
our experimental results, the proposed strategy is able to significantly improve to enhance the
scalability of the considered distributed computing pipeline for SNPs calling. In future directions,
it will be pivotal to explore diferent similarity measures and algorithms for genomic reads
clustering, as the Jaccard index and hierarchical clustering algorithms can be computationally
expensive when dealing with huge-scale analyses. Furthermore, ongoing research is evaluating
strategies for detecting more complex mutations and dealing with genomic regions characterized
by a high mutation intensity, whose corresponding reads may not fall within the same cluster.</p>
    </sec>
    <sec id="sec-8">
      <title>Acknowledgments</title>
      <p>The authors would like to thank the Department of Statistical Sciences of University of Rome
- La Sapienza for computing time on the TeraStat cluster. This work was partially supported
by Università di Roma - La Sapienza Research Project 2021 “Caratterizzazione, sviluppo e
sperimentazione di algoritmi eficienti”. It was also supported in part by INdAM – GNCS Project
2023 “Approcci computazionali per il supporto alle decisioni nella Medicina di Precisione”.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>D.</given-names>
            <surname>Geiger</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Meek</surname>
          </string-name>
          ,
          <article-title>Structured variational inference procedures and their realizations (as incol)</article-title>
          ,
          <source>in: Proceedings of Tenth International Workshop on Artificial Intelligence and Statistics</source>
          , The Barbados,
          <source>The Society for Artificial Intelligence and Statistics</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>M. D.</given-names>
            <surname>Muggli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bowe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N. R.</given-names>
            <surname>Noyes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P. S.</given-names>
            <surname>Morley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. E.</given-names>
            <surname>Belk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Raymond</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Gagie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. J.</given-names>
            <surname>Puglisi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Boucher</surname>
          </string-name>
          , Succinct colored de bruijn graphs,
          <source>Bioinformatics</source>
          <volume>33</volume>
          (
          <year>2017</year>
          )
          <fpage>3181</fpage>
          -
          <lpage>3187</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>G.</given-names>
            <surname>Holley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Melsted</surname>
          </string-name>
          ,
          <article-title>Bifrost: highly parallel construction and indexing of colored and compacted de bruijn graphs</article-title>
          ,
          <source>Genome biology 21</source>
          (
          <year>2020</year>
          )
          <fpage>1</fpage>
          -
          <lpage>20</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>R.</given-names>
            <surname>Durbin</surname>
          </string-name>
          ,
          <article-title>Eficient haplotype matching and storage using the positional burrows-wheeler transform (pbwt</article-title>
          ),
          <source>Bioinformatics</source>
          <volume>30</volume>
          (
          <year>2014</year>
          )
          <fpage>1266</fpage>
          -
          <lpage>1272</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>R.</given-names>
            <surname>Uricaru</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Rizk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Lacroix</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Quillery</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Plantard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Chikhi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lemaitre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Peterlongo</surname>
          </string-name>
          ,
          <article-title>Reference-free detection of isolated snps</article-title>
          ,
          <source>Nucleic acids research</source>
          <volume>43</volume>
          (
          <year>2015</year>
          )
          <fpage>e11</fpage>
          -
          <lpage>e11</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>K.</given-names>
            <surname>Salikhov</surname>
          </string-name>
          , G. Sacomoto, G. Kucherov,
          <article-title>Using cascading bloom filters to improve the memory usage for de brujin graphs</article-title>
          , in: International Workshop on Algorithms in Bioinformatics, Springer,
          <year>2013</year>
          , pp.
          <fpage>364</fpage>
          -
          <lpage>376</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J.</given-names>
            <surname>Dean</surname>
          </string-name>
          ,
          <string-name>
            <surname>S. Ghemawat,</surname>
          </string-name>
          <article-title>MapReduce: simplified data processing on large clusters</article-title>
          ,
          <source>Communications of the ACM</source>
          <volume>51</volume>
          (
          <year>2008</year>
          )
          <fpage>107</fpage>
          -
          <lpage>113</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Apache</given-names>
            <surname>Software</surname>
          </string-name>
          <string-name>
            <given-names>Foundation</given-names>
            ,
            <surname>Apache</surname>
          </string-name>
          <string-name>
            <surname>Spark</surname>
          </string-name>
          , (Available from: http://spark.apache.
          <source>org)</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>R. S.</given-names>
            <surname>Xin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. E.</given-names>
            <surname>Gonzalez</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Franklin</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Stoica</surname>
          </string-name>
          ,
          <article-title>Graphx: A resilient distributed graph system on spark</article-title>
          ,
          <source>in: First international workshop on graph data management experiences and systems</source>
          , 2013, pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>U.</given-names>
            <surname>Ferraro Petrillo</surname>
          </string-name>
          , G. Roscigno, G. Cattaneo,
          <string-name>
            <given-names>R.</given-names>
            <surname>Giancarlo</surname>
          </string-name>
          ,
          <article-title>Fastdoop: a versatile and eficient library for the input of fasta and fastq files for mapreduce hadoop bioinformatics applications</article-title>
          ,
          <source>Bioinformatics</source>
          <volume>33</volume>
          (
          <year>2017</year>
          )
          <fpage>1575</fpage>
          -
          <lpage>1577</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Graham</surname>
          </string-name>
          , Bounds on Multiprocessing Timing Anomalies.,
          <source>SIAM Journal on Applied Mathematics</source>
          <volume>17</volume>
          (
          <year>1969</year>
          )
          <fpage>416</fpage>
          -
          <lpage>429</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>L.</given-names>
            <surname>Amorosi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. D.</given-names>
            <surname>Rocco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U. F.</given-names>
            <surname>Petrillo</surname>
          </string-name>
          ,
          <article-title>Scheduling k-mers counting in a distributed environment</article-title>
          ,
          <source>in: Optimization in Artificial Intelligence and Data Sciences: ODS</source>
          , First Hybrid Conference, Rome, Italy,
          <source>September 14-17</source>
          ,
          <year>2021</year>
          , Springer,
          <year>2022</year>
          , pp.
          <fpage>73</fpage>
          -
          <lpage>83</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>M.</given-names>
            <surname>Besta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kanakagiri</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Mustafa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Karasikov</surname>
          </string-name>
          , G. Rätsch,
          <string-name>
            <given-names>T.</given-names>
            <surname>Hoefler</surname>
          </string-name>
          , E. Solomonik,
          <article-title>Communication-eficient jaccard similarity for high-performance distributed genome comparisons</article-title>
          ,
          <source>in: 2020 IEEE International Parallel and Distributed Processing Symposium (IPDPS)</source>
          , IEEE,
          <year>2020</year>
          , pp.
          <fpage>1122</fpage>
          -
          <lpage>1132</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>Z.</given-names>
            <surname>Rasheed</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Rangwala</surname>
          </string-name>
          ,
          <article-title>A map-reduce framework for clustering metagenomes</article-title>
          ,
          <source>in: 2013 IEEE International Symposium on Parallel &amp; Distributed Processing, Workshops and Phd Forum</source>
          , IEEE,
          <year>2013</year>
          , pp.
          <fpage>549</fpage>
          -
          <lpage>558</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <surname>D. M. Church</surname>
            ,
            <given-names>V. A.</given-names>
          </string-name>
          <string-name>
            <surname>Schneider</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Graves</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Auger</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          <string-name>
            <surname>Cunningham</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Bouk</surname>
            , H.-C. Chen,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Agarwala</surname>
            ,
            <given-names>W. M.</given-names>
          </string-name>
          <string-name>
            <surname>McLaren</surname>
            ,
            <given-names>G. R.</given-names>
          </string-name>
          <string-name>
            <surname>Ritchie</surname>
          </string-name>
          , et al.,
          <article-title>Modernizing reference genome assemblies</article-title>
          ,
          <source>PLoS biology 9</source>
          (
          <year>2011</year>
          )
          <article-title>e1001091</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>P.</given-names>
            <surname>Danecek</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. K.</given-names>
            <surname>Bonfield</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Liddle</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Marshall</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Ohan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. O.</given-names>
            <surname>Pollard</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Whitwham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Keane</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. A.</given-names>
            <surname>McCarthy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. M.</given-names>
            <surname>Davies</surname>
          </string-name>
          , et al.,
          <article-title>Twelve years of samtools and bcftools</article-title>
          ,
          <source>Gigascience</source>
          <volume>10</volume>
          (
          <year>2021</year>
          )
          <article-title>giab008</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <surname>J. M. Zook</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Chapman</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Mittelman</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          <string-name>
            <surname>Hofmann</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          <string-name>
            <surname>Hide</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Salit</surname>
          </string-name>
          ,
          <article-title>Integrating human sequence data sets provides a resource of benchmark snp and indel genotype calls</article-title>
          ,
          <source>Nature biotechnology 32</source>
          (
          <year>2014</year>
          )
          <fpage>246</fpage>
          -
          <lpage>251</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>