<!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 />
    <article-meta>
      <title-group>
        <article-title>Towards a Logic Programming tool for cancer analysis</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alice Tarzariol</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Agostino Dovier</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alberto Policriti</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Dipartimento di Scienze Matematiche, Informatiche e Fisiche Universita degli Studi di Udine</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The main goal of this work is to propose a pipeline capable to analyze a data collection of temporally quali ed mutation pro les. A front-end and a post-processor are implemented. The front-end basically transforms the input data retrieved from medical databases into a set of facts. The post-processor allows the user to visualize the computation results as graphs. The reasoning core is based on Answer Set Programming that, allowing to deal with NP or 2P properties, is capable of deducing complex info from data. The system is modular: the reasoning tool can be replaced by any logic programming tool (e.g., Prolog, ILP) for di erent kinds of data analysis.</p>
      </abstract>
      <kwd-group>
        <kwd>Bioinformatics</kwd>
        <kwd>Big Data Analysis</kwd>
        <kwd>ASP</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>Cancer is a game of mutation accumulation in the genome of an organism, that
is the set of its genes. One of the most delicate aspects of this game is the fact
that, while data is produced by today's technology at an unprecedented rate it is,
however, extremely noisy data. More precisely, even though any mutation might
be triggering signi cant biological processes involved in cancer development,
only some of the mutations are classi ed as \drivers" by experts in the eld.
The remaining|large|majority of mutations must be classi ed as \passengers",
as they are probably accumulating only as a consequence of the (devastating)
side-e ects of a more basic biological mechanisms already at work.</p>
      <p>Tackling a classi cation problem for the collection of detected mutations in a
tissue requires a multi-faceted approach. In order to build reliable lters suitable
to de ne the blueprint of the disease under study it is essential to integrate
di erent kinds of knowledge with brute force analysis.</p>
      <p>The main goal of this work is to propose a pipeline capable to analyze a data
collection of temporally quali ed mutation pro les and synthesize a dependency
graph. The information inferred by cross comparisons performed \locally" on
input data, combined with information coming from external sources, allows to
deduce the output graph that should represent a set of putative dependencies.</p>
      <p>The idea is to prove the potential of the employed programming technologies
in mining data that, when analyzed over realistically long sequences of time steps,
rapidly generates (computationally) heavy collections of putative evolution paths.</p>
      <p>ASP allows to encode compactly and elegantly problems that belongs to
NP or even to 2P . Encodings allows great exibility. In particular, the already
implemented strategies are parametrically designed and use thresholds xing
conditions on the addition and removal of edges. Moreover, as it is always the case
when dealing with biological data, many auxiliary problems|mostly related with
I/O|must be faced. The data processing pipeline described here is interfaced
with specialized languages and le formats for the eld.</p>
      <p>The paper is organized as follows: some related work are discussed in Sec. 2,
the main ideas of our approach are presented in Sec. 3. A discussion on the data
set used an the applications we have developed for extracting/converting data
are presented in Sec. 4, and a brief analysis of the results found is shown in Sec. 5.
Finally, some conclusions are drawn in Sec. 6.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related work</title>
      <p>Cancer data processing is, obviously, a very active and lively eld in many
scienti c environments. We just report here on some work using techniques
stemming from the logic programming community. We assume the reader has
basic knowledge of logic and logic programming.</p>
      <sec id="sec-2-1">
        <title>2.1 Inductive Logic Programming</title>
        <p>
          Inductive Logic Programming (ILP) has been succesfully used to analyze big
data and, in particular, to analyze cancer databases. ILP allows to implement
a \structured" form of machine learning, by inferring a rst-order theory that
\explains" a set of input ground facts (de ning extensionally, possibly partially,
some predicates). Let us brie y recall the main ideas behind ILP (see, e.g., [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]
or [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] for a more general approach to logical and relational learning).
        </p>
        <p>Assume to have a set of positive observations O+ and a set of negative
observations O . We can assume O+ and O as two disjoint sets of ground
atoms. Assume also to have a (possibly empty) background theory (a set of
clauses) P , the general inductive problem is the one of nding a set of hypotheses
H (clauses) such that P ^ H j= O+ and such that for all ` 2 O it holds that
P ^ H 6j= `.</p>
        <p>Several strategies have been investigated and implemented by ILP systems to
identify sets H made by clauses as much general as possible. Generality in this
context can be de ned in terms of logical entailment: if clauses r1 and r2 are
such that P ^ r1 j= r2, then r1 is more general of r2 w.r.t. P .1 Of course, this
implies that if P ^ r2 j= B (for some B O+), then P ^ r1 j= B. Therefore, r1
is preferable to r2 in the set of hypotheses H (unless it introduces errors, namely,
there is ` 2 O s.t. P ^ r1 j= ` and P ^ r2 6j= `).</p>
        <p>In presence of large amounts of data that might be a ected from errors since
the beginning (e.g., medical data), one might accept a set H that might be not
complete, namely it \explains" only a subset G (good) of O+: P ^ H j= G, and
that might be not correct, namely such that P ^ H j= ` for ` in a subset W
(wrong) of O . In this case, of course, the ILP algorithm aims at maximizing the
size of G and at minimizing the size of W .</p>
        <p>
          An extension of ILP is PILP (probablistic inductive logic programming) [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]
where facts (observables) and rules (background theory) can be annotated by
a probability. In this case a semantics based on probabilistic inference rules is
adopted; the handling of uncertainty is therefore handled in a natural way.
        </p>
        <p>
          Inductive Logic Programming has been used to analyze cancer data. For
instance in [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] the authors participated to a world-wide carcinogenicity prediction
competition (organized by the National Toxicology Program in the USA) using
the ILP system Progol [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. In the rst round of the competition Progol produced
the highest predictive accuracy of any automatic system participating the test.
        </p>
        <p>
          Progol have been also used in [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] to infer general properties on pancreatic
cancer and to allow early detection of this kind of cancer. For instance, one of
the inductively computed predicates indicates that the measurements of CEA
and Elastase I are very useful for the detection of pancreatic cancer.
        </p>
        <p>They use data from 438 cases. The classi cation is based on the observation of
the lymph node metastatic status and tumour di erentiation status. They use a
set of available lab data (e.g., CEA, CA19-9, Glucose, Elastase I, Serum Amylase,
. . . ). After having identi ed the most promizing features using standard feature
selection criteria data is divided in three groups (low, normal, and high), as
usually made by domain experts. Each patient record in the database represents
an abnormality of a patient, split into positive and negative. Data is translated
into a set of facts, and Progol is executed in order to rank the rules by their
capability of explaining the database.</p>
        <p>
          In [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ] the authors propose an inductive logic programming approach to the
problem of modeling evolution patterns for breast cancer. Data is obtained from
a cohort of 124 patients at di erent stages. Data and background knowledge are
expressed in logic programming. A set of hypotheses built on this knowledge
using re nement, least general generalization, inverse resolution, and most speci c
corrections is computed.
1 For de nite clause programs j= is the standard logical consequence operator. For
programs with negation its meaning becomes instead \if in every stable model of
P ^ r1, the clause r2 holds."
2.2
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Answer Set Programming</title>
        <p>
          Answer Set Programming has been used in many Bioinformatics applications.
For an overview, see [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. Among the many of them we would like to point out
the approaches to the phylogenetic reconstruction (see, e.g., [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]). The origin of
this work comes in fact from the desiderata, presented in the 2016 edition of the
conference CILC [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], of extending the ASP tools for phylogenetic reconstruction
to build a phylogenetic reconstruction of cancer evolution. If the cancer is related
to a mutation of a gene present both in a human and in another specie (e.g., a
rat), this may justify a deeper study of the evolution of that cancer in the other
specie's body. Or, it can explain why a drug working for the other specie does not
work in a human. Of course for doing that we need much more temporal data.
        </p>
        <p>
          There are other approaches to biological data analysis based on ASP. For
instance, in [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] the authors use ASP to compute an over-approximation of the
set of Boolean networks which t best with experimental data and provide the
corresponding encodings. Of course, the approach can be used to explain the
experimental data in a similar way as made by ILP systems, but using a purely
logical approach, as we do in this paper.
3
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>The general approach</title>
      <p>The general idea of our approach is simple and can be summarized as an attempt
to infer a graph whose nodes are mutations (in genes) and whose arcs represent
the causality relation between mutations, that is their most plausible (temporal)
sequence. Data consists of variant allele frequencies and thresholds are used to
accept/discard a temporal dependency.</p>
      <p>
        The initial steps consist in a deterministic analysis followed by a blind search
entirely left to the inferential engine. A pre-processing phase is necessary in
order to correctly use data. A le MAF (Mutation Annotation Format) [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] is
taken in input and the HUGO (HUman Genome Organization nomenclature) [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]
gene symbols are extracted. In addition, experiment code, depth of readings|of
the tumor sample in support of the variable allele|, and total depth of tumor
sample readings, are uploaded. The ratio of the last two values is then calculated,
thus obtaining variant allele frequencies for each sample gene. These numbers
are then rounded to integers in order to make them more easily manageable
by the ASP engine. The temporal information relative to the order of ndings
is extracted from the experiment identi cation, along with data that allow to
classify cases|in the case of study, di erent organoid tissues. At this point the
ASP system (grounder+solver) Clingo [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] is executed on the data to compute
the predicates explained in the code (according to the stable model semantics).
A post-processing of Clingo's output is also implemented in order to depict the
computation results as a graph.
3.1
      </p>
      <sec id="sec-3-1">
        <title>ASP code over simple data</title>
        <p>In this section we will see our ASP code and how it works over some example
instances. Once ltered, input data is stored by two predicates, de ned
extensionally by facts. Each patient can be involved in more than one experiment;
the ternary predicate sample relates the patient ID with its experiment IDs and
their times (given the experiments ordering), while the ternary predicate val
reports each instance of mutated gene in any experiment and its value:</p>
        <p>In the rst ve rows we de ne the values of the samples of three patients
pat-A, pat-B and pat-C, with the (temporal) order of samples. Subsequently,
starting at row six, we indicate mutated genes values. For the sake of simplicity
we named values a,b,c . . . .</p>
        <p>A number of \domain" predicates are computed from the input data (needed
to limit the grounding), as follows:
1 gene(G) :- val(_,G,_).
2 patient(P) :- sample(P,_,_).
3 value(V) :- val(_,_,V).
4 time(0..T) :- sample(_,_,T), not sample(_,_,T+1).</p>
        <p>The predicate gene(G) forces value G to appear as second parameter of val
and, therefore, will hold for each gene uploaded in our samples. Analogous
considerations for patient(P) and value(V). time(T), instead, is instanced
with a list of values that goes from 0 to a maximum temporal value contained in
the predicates sample(P,E,T).</p>
        <p>The following predicates allow to retrieve information from the data. Here we
report some examples. Being ASP capable to deal with the whole NP class, and
even the 2P class if disjunctive heads are used, one can capture/infer a wide
family of properties. We will be back on this issue in Sec. 6.
1 variationConsec(P,G,T2)
:2 sample(P,E1,T1),sample(P,E2,T2),T2=T1+1,
3 val(E1,G,V1),val(E2,G,V2),variation(V1,V2).
4 variation(A,B)
:5 value(A),value(B),|A-B|&gt;10.
6 precedes(P,G1,G2)
:7 firstVariation(P,G1,T1),firstVariation(P,G2,T2),T1&lt;T2.
8 firstVariation(P,G,T)
:9 variationConsec(P,G,T), not varPrec(P,G,T).
10 varPrec(P,G,T)
:11 variationConsec(P,G,T1), variationConsec(P,G,T),T1&lt;T.
12 precedeKTimes(G1,G2,K)
:13 gene(G1),gene(G2),K=#count{patient(P):precedes(P,G1,G2)}.
14 reachable(G1,G2)
:15 maybePrecede(G1,G2).
16 reachable(G1,G2)
:17 maybePrecede(G1,G3), reachable(G3,G2).
18 maybePrecede(G1,G2)
:19 precedeKTimes(G1,G2,K1),precedeKTimes(G2,G1,K2),K1&gt;K2,
20 not reachable(G2,G1).
21 #show maybePrecede/2.</p>
        <p>variationConsec(P,G,T2) holds whenever for patient P there are two
consecutive samples (the second one with time T2) with the same gene G with two
values V1 e V2 that satisfy variation, namely their di erence in absolute value
is greater than 10. This value is the variation sensibility, in this simple example
we choose a low parameter in order to take always the consecutive variation of
the mutated gene. In our example we can infer that:
variationConsec(pat-A,a,2).
variationConsec(pat-A,b,4).
variationConsec(pat-B,d,2).
variationConsec(pat-B,a,4).
variationConsec(pat-C,b,2).
variationConsec(pat-C,z,4).</p>
        <p>variationConsec(pat-A,c,3).
variationConsec(pat-A,c,4).
variationConsec(pat-B,a,3).
variationConsec(pat-B,b,4).
variationConsec(pat-C,a,3).</p>
        <p>variationConsec(pat-C,d,5).</p>
        <p>Before de ning the main predicate of this example, namely, the predicate
precedes(P,G1,G2), let us see the rule varPrec(P,G,T) at row 10: it holds if a
gene G of a certain patient P has some variations in the sample at time T and
also in some previous samples|and therefore it is not the rst variation detected.
This predicate is used in the body of firstVariation(P,G,T): the predicate
inferring the minimum time T for which we have a variation of gene G in P.</p>
        <p>At this point we can illustrate precedes(P,G1,G2) in row 6: it is true if, for
a given patient, the rst variation of G1 happens before the rst variation of G2.
Notice that it is not necessary to force that the two genes are di erent as it is
implicit in the fact that the time of their rst variation is di erent. So from the
previous example we can infer:
precedes(pat-A,a,c).
precedes(pat-B,d,a).
precedes(pat-C,b,a).
precedes(pat-C,b,d).</p>
        <p>precedes(pat-A,a,b).
precedes(pat-B,d,b).
precedes(pat-C,b,z).
precedes(pat-C,a,d).</p>
        <p>precedes(pat-A,c,b).
precedes(pat-B,a,b).
precedes(pat-C,a,z).
precedes(pat-C,z,d).</p>
        <p>Predicate precedeKTimes(G1,G2,K) stores in K the number of patients for
which the gene G1 precedes the gene G2, while maybePrecede(G1,G2) is inferred
if G1 precedes G2 more frequently than G2 precedes G1. We report below the
inferred instances of precedeKTimes in which the guard K is greater than zero
(namely there is at least one case in which G1 precedes G2.</p>
        <p>precedeKTimes(b,a,1). precedeKTimes(d,a,1).
precedeKTimes(c,b,1). precedeKTimes(d,b,1).
precedeKTimes(a,d,1). precedeKTimes(b,d,1).
precedeKTimes(a,z,1). precedeKTimes(b,z,1).
precedeKTimes(a,b,2).
precedeKTimes(a,c,1).
precedeKTimes(z,d,1).</p>
        <p>For a and b, there are 2 patients that exhibit variation of a before b, while
just one exhibits the opposite variation. Hence we deduce maybePrecede(a,b),
while in case of a and d we don't infer any most likely order.</p>
        <p>The nal result in our example is:
maybePrecede(a,b).
maybePrecede(b,z).</p>
        <p>maybePrecede(a,c).
maybePrecede(c,b).</p>
        <p>maybePrecede(a,z).
maybePrecede(z,d).</p>
        <p>In order to guarantee that the direct graph resulting from maybePrecede
is acyclic, we check that the number of times the variation of the rst gene
precedes the second is strictly greater than the opposite order and we also impose
the absence of the predicate reachable that states that already exists a path
between two genes in the graph inferred.</p>
        <p>
          The visualisation of the graph obtained is shown in Figure 2. The table
containing the data (the variant allele frequency value has been omitted for
simplicity) where the pairs highlighted are the variations revealed. In Figure 3
(right) it is shown the result automatically produced by Graphviz, after the
Clingo output has been converted in the dot edges format Figure 3 (left).
We tested our ASP program over the|real and publicly available|data set
Breast cancer patient xenografts [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] available from http://www.cbioportal.org/.
digraph G f
g
a -&gt; b;
a -&gt; c;
a -&gt; z;
b -&gt; z;
c -&gt; b;
z -&gt; d;
This particular study was chosen as it provides di erent temporal analysis of the
same patient's cancer. The cBioPortal repository|as well as many other similar
sites|is currently adding new case studies every year. In order to facilitate
usage we, therefore, also implemented a (simple) graphical user-interface in Java
providing functionalities to automate the data extraction, instances creation, as
well as Clingo execution. Subsequently the ASP solver output is processed to
display results by using the open source program GraphViz (Graph Visualization
Software) [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ].
        </p>
        <p>The open source platform cBioPortal provides data from many cancer
genomics data-sets (by now there are 150 of them) allowing their download, analysis,
and visualisation. It was originally developed at Memorial Sloan Kettering Cancer
Center (MSK) and now its software is available under an open source license
via GitHub at https://github.com/cBioPortal. The portal is designed to bring
cancer researchers near to the complexities of human genome data, allowing a
rapid, intuitive, and precise visualization of expression pro les as well as clinical
attributes from large-scale cancer genomics projects. A brief tutorial of the tools
provided by cBioPortal is available on the web site; further documentation is
available at https://cbioportal.readthedocs.io/en/latest/README.html.
From the website it is possible to query and/or download data from one or more
studies satisfying given criteria (for instance, studies related to speci c gene's
values) or it is possible to download the entire archive. From the home page it is also
possible to query databases speci ed within studies, select the genetic pro le, the
single patient or a group of them and then specify collections of genes of interest.
Users can submit even more speci c queries by using the Onco Query Language
(OQL), for which a brief guide is available on the website. The same information
can be obtained through web API and library in R and Matlab. However, the faster
way to visualize all genes from a study, consists in directly downloading the whole
study database from https://github.com/cBioPortal/datahub/tree/master/public,
containing all complete archives available from the portal. Once unzipped the
archive, a series of le is at hand, among which data mutations extended written
in MAF that will be our input.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Mutation Annotation Format (MAF) We brie y report here the MAF</title>
        <p>elds used by our program, redirecting the interested reader to the o cial page
https://wiki.nci.nih.gov/display/TCGA/Mutation+Annotation+Format+(MAF)
+Speci cation for a full- edged description of the format.</p>
        <p>
          Mutations are detected by alignment and comparison between DNA sequences
relative to biopsies and the human genome reference (without mutations) available
at NCBI (National Center for Biotechnology Information) [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]. A MAF le
identi es mutations, reports type (SNPs|Single Nucleotide Polymorphisms,
deletions, or insertions) and identi es if they are somatic (originated in the
speci c tissue|and therefore more interesting) or belonging to the germinal line.
This is recorded with further annotations provided by the format.
        </p>
        <p>The format of a MAF le is tab-delimited columns. The rst row contains
the version used, the second one the elds headers, the rst 34 of which are
mandatory.</p>
        <p>Variant Allele Frequency (VAF) is given by reads depth on cancer's sample,
referring to an altered allele t_alt_count, with respect to total reads t_depht.
We will use precisely this ratio to describe mutation level, leaving the possibility
of more elaborated/precise measurements, open in our code.
4.2</p>
      </sec>
      <sec id="sec-3-3">
        <title>Breast cancer xenograft</title>
        <p>
          Data from the above mentioned study Breast cancer patient xenografts [
          <xref ref-type="bibr" rid="ref2 ref8">2, 8</xref>
          ]
contains, for each patient, an average of seven temporally-quali ed samples. Not
all provided data is from human biopsy as, thanks to xenotransplantation, it
has been possible to observe and collect information from cancer cells grown in
di erent tissues, called xenograft.
        </p>
        <p>The study shows the clonal dynamics of initial engraftment and subsequent
serial propagation of primary and metastatic human breast cancers in
immunode cient mice. One of the results showed by the study is that similar clonal
expansion patterns can emerge in independent grafts of the same starting tumour
population, indicating that genomic aberrations can be reproducible
determinants of evolutionary trajectories. So we can see that measurement of genomically
de ned clonal population dynamics will be highly informative for functional
studies using patient-derived breast cancer xenoengraftment.</p>
        <p>
          The study, employing single-cell sequencing, was able to analyze and provide
data on three di erent tissues: subcutaneous, subrenal capsule, and mammary
fat pad. In [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ] we can nd pictures showing that di erent analyses were carried
out, referred to the same patient. However, this was done over di erent xenograft
tissues, that present mutations with independent developments. Therefore, for
the same patient, di erent situations based on the genotype analysed on the
xenograft, have been studied. This required an adaptation of our ASP code to
discriminate across this particular data.
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Mutations evolution analyzer</title>
      <p>In order to get the complete archives stored in cBioPortal, automatically analyse
data, and visualize the graph of variations found, we built a Java GUI called
Mutations Evolution Analyzer (Figure 4) that contains a menu with four
items: Download, Create, Run, and Help.</p>
      <p>The item Download sends a query to the web interface of the Cancer Genomic
Data Server (CGDS) and, if available, returns an updated list of the studies,
allowing the download over the site
https://github.com/cBioPortal/datahub/tree/master/public
of one or more of them in a user speci ed directory|see Figure 5.</p>
      <p>Once the archive has been unzipped, we nd data mutations extended le. By
clicking on Create and then Selected fields the program allows to get, from
a MAF le, the values of the selected elds (see Figure 6). To speed up selection,
there is a checkbox called Select standard eld, that automatically selects the
elds used for our analysis: Hugo Symbol, T umor Sample Barcode, t alt count,
and t depth. In particular, for Breast cancer patient xenografts, the identi cation
eld is obtained by the union of the patient ID, the type of the sample (tumor or
xenograft), the position in temporal order of the sample, the genotype studied,
and whether it is relative to the whole genome or if it is targeted. For instance,
sample SA429X1A-targeted is relative to patient SA429, it has been obtained
over a xenograft (X means xenograft), is the rst sample of this type (1)|as
samples have a sequential number that identi es their temporal order|, applies
to the genotype A2, for which it has been analyzed a particular subsequence of
the genome (targeted). In order to get this single information directly available
(instead of searching them every time from the T umor Sample Barcode) it is
su cient to select the checkbox named Extract data from identi er that adds
those new elds to the selected ones, with headers named patientID, T ype, T ime,
Genotype, and W ide.</p>
      <p>Subsequently our program creates a new le containing the selected elds,
as well as a new one called V alGene, obtained by normalizing the variant allele
frequency|namely the ratio between t alt count e t depth|, and then multiplies
it by a reasonable value (we choose 107 in order to consider the rst six digits
after decimal point) rounding the result. We perform these additional operations
to cast variant allele frequencies to integers, as it is easier to work with them in
ASP with respect to the numbers in oating point.</p>
      <p>Once the le containing the necessary elds has been obtained, by clicking on
Create -&gt; ASP file, a graphical interface asking the number of genes that we
want analyze is shown. In Figure 7 the reader can see the default value. On click
data are ordered, identifying the most frequent genes, taking the rst k elements,
with k as speci ed. An Unknown gene is a gene whose sequence is not known, so
our program ignores it, as there is not necessarily a correlation between di erent
unknown genes.</p>
      <p>
        For the ASP syntax we use lowercase letters for all literal values, and replace
characters \-" and \." by \ ".
2 For our usage it is su cient to know that di erent letters correspond to di erent
types. Refer to [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] for a full (and cleaner) explanation.
      </p>
      <p>Then some Java code creates instances and adds them to the main ASP
program under construction. Inessential modi cations to adapt the analysis to
the data under the study are performed at this stage in order, for example, to
discriminate sample from same patient but with di erent genotypes: for each
sample we add a fact for the type, wide, and genotype, in particular we consider the
last one. Here there are the predicates deduced from sample SA429X1A-targeted:</p>
      <sec id="sec-4-1">
        <title>1 sample(sa429,sa429x1a_targeted,1). 2 type(sa429x1a_targeted,x). 3 wide(sa429x1a_targeted,targeted). 4 genotype(sa429x1a_targeted,a).</title>
        <p>As for the other rules we get:</p>
      </sec>
      <sec id="sec-4-2">
        <title>1 variationConsec(P,GT,G,T2) :</title>
        <p>2 sample(P,E1,T1),sample(P,E2,T2),T2=T1+1,
3 val(E1,G,V1),val(E2,G,V2),variation(V1,V2),
4 genotype(E1,GT),genotype(E2,GT).
5 precedes(P,GT,G1,G2)
:</p>
        <p>Fig. 7. Create ! ASP le
6 firstVariation(P,GT,G1,T1),firstVariation(P,GT,G2,T2),T1&lt;T2.
7 firstVariation(P,GT,G,T)
:8 variationConsec(P,GT,G,T), not varPrec(P,GT,G,T).
9 varPrec(P,GT,G,T)
:10 variationConsec(P,GT,G,T1), variationConsec(P,GT,G,T),T1&lt;T.
11 precedeKTimes(G1,G2,K)
:12 gene(G1),gene(G2),
13 K=#count{patient(P),genotype(GT):precedes(P,GT,G1,G2)}.</p>
        <p>The arity of those rst four predicates is increased by one in order to
discriminate di erent genotype variations. Moreover, we infer variationConsec if
genotypes in the same sample turn out to be equal. Predicate precedeKTimes
has the same arity but the function count works with di erent pairs of
patientgenotype rather than just with patients.</p>
        <p>Finally Run -&gt; Clingo and Graphviz allows the user to select the ASP
le created and solve it with Clingo (see Fig. 8). The result is then redirected
to a temporary text le, from which the row containing inferred predicates
maybePrecede is selected. Those are processed into edges of a direct graph in dot
format, on which we run Graphviz to display the result|see Fig. 9. This picture
shows the variations detected over 100 genes, with the predicate variation that
identi es variations with a value above 1000.</p>
        <p>Notice that the height of the graph is barely 1. This is because, despite there
are on average seven samples for the fteen patients, they are referred to di erent
genotypes, so this increases the number of \sample to analyse" but at most (only)
three temporal values are available for each of them, signi cantly reducing the
number of relations found.</p>
        <p>Finally with the last item of the menu, Help, we can open links to the
documentation of the resources used: the home page of cBioPortal, the o cial
description of MAF, the web site of Potassco and the description of dot format.
6</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>
        In this paper we report on a new system capable of dealing with data retrieved
from carcinome analysis. The system comes equipped with a front-end that
preprocesses/ lters standard-format data and transform them into a logic program,
as well as with a post processor that allows to visualize the results in a graph.
The reasoning core is based on ASP solving | the Clingo system is used. The
predicates implemented for the data analysis reported in the paper are just
simple examples and the expressivity of ASP can be exploited by more complex
queries/analyses. In particular, one of our future work will be trying to reconstruct
phylogenetics of cancer (using the ideas presented in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]). For doing that we need
access to much more data|and, in particular, of several stages per patient. We
are looking for data sources.
      </p>
      <p>A further direction of study consists in an integration with ILP, as a means
to replace or collaborate with ASP, as far as the reasoning part is concerned.
Acknowledgments. We thank Alessandro Dal Palu, Andrea Formisano, and Enrico
Pontelli for the several discussions on this material. Agostino Dovier and Alberto
Policriti are partially supported by INdAM-GNCS 2015{2017 and by PRID
ENCASE projects.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>V.</given-names>
            <surname>Bevilacqua</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Chiarappa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Mastronardi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Menolascina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Paradiso</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Tommasi</surname>
          </string-name>
          .
          <article-title>Identi cation of tumor evolution patterns by means of inductive logic programming</article-title>
          .
          <source>Genomics, Proteomics &amp; Bioinformatics</source>
          ,
          <volume>6</volume>
          (
          <issue>2</issue>
          ):
          <volume>91</volume>
          {
          <fpage>97</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>E.</given-names>
            <surname>Cerami</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>U.</given-names>
            <surname>Dogrusoz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. E.</given-names>
            <surname>Gross</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. O.</given-names>
            <surname>Sumer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. A.</given-names>
            <surname>Aksoy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Jacobsen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. J.</given-names>
            <surname>Byrne</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. L.</given-names>
            <surname>Heuer</surname>
          </string-name>
          , E. Larsson,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Antipin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Reva</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. P.</given-names>
            <surname>Goldberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sander</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Schultz</surname>
          </string-name>
          .
          <article-title>The cbio cancer genomics portal: An open platform for exploring multidimensional cancer genomics data</article-title>
          .
          <source>Cancer Discovery</source>
          ,
          <volume>2</volume>
          :
          <issue>1</issue>
          {
          <issue>6</issue>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>A.</given-names>
            <surname>Dal Palu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dovier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Policriti</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Pontelli</surname>
          </string-name>
          .
          <article-title>Logic programming applied to genome evolution in cancer</article-title>
          . In C.
          <article-title>Fiorentini and A</article-title>
          . Momigliano, editors,
          <source>Proceedings of the 31st Italian Conference on Computational Logic</source>
          , Milano, Italy, June 20-22,
          <year>2016</year>
          ., volume
          <volume>1645</volume>
          <source>of CEUR Workshop Proceedings</source>
          , pages
          <volume>148</volume>
          {
          <fpage>157</fpage>
          . CEUR-WS.org,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>A.</given-names>
            <surname>Dal Palu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Dovier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Formisano</surname>
          </string-name>
          , and
          <string-name>
            <given-names>E.</given-names>
            <surname>Pontelli</surname>
          </string-name>
          .
          <article-title>Exploring life through logic programming: Answer set programming in bioinformatics</article-title>
          .
          <source>TR-CS-NMSU-2014-10- 24</source>
          , New Mexico State University,
          <year>2014</year>
          . To appear as ACM Book Chapter.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5. L. De Raedt.
          <article-title>Logical and relational learning</article-title>
          .
          <source>Cognitive Technologies</source>
          . Springer,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>P.</given-names>
            <surname>Eirew</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Steif</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Khattra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Ha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Yap</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Farahani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Gelmon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Mar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Wan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Laks</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Biele</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Shumansky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Rosner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>McPherson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Nielsen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Roth</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Lefebvre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bashashati</surname>
          </string-name>
          , C. de Souza,
          <string-name>
            <given-names>C.</given-names>
            <surname>Siu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Aniba</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Brimhall</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Oloumi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Osako</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Bruna</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Sandoval</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Algara</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W.</given-names>
            <surname>Greenwood</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Leung</surname>
          </string-name>
          , H. Cheng, H. Xue,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Wang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Mungall</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Moore</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Zhao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Lorette</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Huntsman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Eaves</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Hansen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Marra</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Caldas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Shah</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Aparicio</surname>
          </string-name>
          .
          <article-title>Dynamics of genomic clones in breast cancer patient xenografts at single-cell resolution</article-title>
          .
          <source>Nature</source>
          , pages
          <volume>422</volume>
          {
          <fpage>426</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>E.</given-names>
            <surname>Erdem</surname>
          </string-name>
          .
          <article-title>Applications of answer set programming in phylogenetic systematics</article-title>
          . In M. Balduccini and T. C. Son, editors,
          <source>Logic Programming</source>
          ,
          <source>Knowledge Representation, and Nonmonotonic Reasoning</source>
          , volume
          <volume>6565</volume>
          of Lecture Notes in Computer Science, pages
          <volume>415</volume>
          {
          <fpage>431</fpage>
          . Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>J.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B. A.</given-names>
            <surname>Aksoy</surname>
          </string-name>
          , U. Dogrusoz,
          <string-name>
            <given-names>G.</given-names>
            <surname>Dresdner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Gross</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. O.</given-names>
            <surname>Sumer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Sun</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Jacobsen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Sinha</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Larsson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Cerami</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Sander</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Schultz</surname>
          </string-name>
          .
          <article-title>Integrative analysis of complex cancer genomics and clinical pro les using the cbioportal</article-title>
          .
          <source>Science Signaling</source>
          ,
          <volume>2</volume>
          (
          <issue>6</issue>
          ):
          <fpage>269</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>M.</given-names>
            <surname>Gebser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Kaminski</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Kaufmann</surname>
          </string-name>
          , and
          <string-name>
            <given-names>T.</given-names>
            <surname>Schaub</surname>
          </string-name>
          .
          <article-title>Clingo = ASP + control: Preliminary report</article-title>
          . CoRR, abs/1405.3694,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>10. GraphViz. http://www.graphviz.org/.</mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>11. HUGO. http://www.genenames.org/.</mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>T. Le</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          <string-name>
            <surname>Nguyen</surname>
            , E. Pontelli, and
            <given-names>T. C.</given-names>
          </string-name>
          <string-name>
            <surname>Son</surname>
          </string-name>
          .
          <article-title>ASP at work: An ASP implementation of phylows</article-title>
          . In A. Dovier and V. S. Costa, editors,
          <source>Technical Communications of the 28th International Conference on Logic Programming</source>
          ,
          <source>ICLP 2012, September 4-8</source>
          ,
          <year>2012</year>
          , Budapest, Hungary, volume
          <volume>17</volume>
          <source>of LIPIcs</source>
          , pages
          <volume>359</volume>
          {
          <fpage>369</fpage>
          .
          <string-name>
            <surname>Schloss</surname>
          </string-name>
          Dagstuhl - Leibniz-Zentrum fuer Informatik,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>13. MAF. https://wiki.nci.nih.gov/display/tcga/mutation+annotation+format.</mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>S.</given-names>
            <surname>Muggleton</surname>
          </string-name>
          .
          <article-title>Inductive logic programming</article-title>
          .
          <source>New Generation Comput.</source>
          ,
          <volume>8</volume>
          (
          <issue>4</issue>
          ):
          <volume>295</volume>
          {
          <fpage>318</fpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>S.</given-names>
            <surname>Muggleton</surname>
          </string-name>
          .
          <article-title>Inverse entailment and progol</article-title>
          . New Generation Comput.,
          <volume>13</volume>
          (
          <issue>3</issue>
          &amp;4):
          <volume>245</volume>
          {
          <fpage>286</fpage>
          ,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>16. NCBI. https://www.ncbi.nlm.nih.gov/.</mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Qiu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Shimada</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Hiraoka</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Maeshiro</surname>
          </string-name>
          , W.-K. Ching,
          <string-name>
            <given-names>K. F.</given-names>
            <surname>Aoki-Kinoshita</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Furuta</surname>
          </string-name>
          .
          <article-title>Knowledge discovery for pancreatic cancer using inductive logic programming</article-title>
          .
          <source>IET Systems Biology</source>
          ,
          <volume>8</volume>
          :
          <fpage>162</fpage>
          {
          <fpage>168</fpage>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>F.</given-names>
            <surname>Riguzzi</surname>
          </string-name>
          , E. Bellodi, and
          <string-name>
            <given-names>R.</given-names>
            <surname>Zese</surname>
          </string-name>
          .
          <article-title>A history of probabilistic inductive logic programming</article-title>
          .
          <source>Front. Robotics and AI</source>
          ,
          <year>2014</year>
          ,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <given-names>A.</given-names>
            <surname>Srinivasan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. D.</given-names>
            <surname>King</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Muggleton</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M. J. E.</given-names>
            <surname>Sternberg</surname>
          </string-name>
          .
          <article-title>Carcinogenesis predictions using ILP</article-title>
          . In N. Lavrac and S. Dzeroski, editors,
          <source>Inductive Logic Programming</source>
          , 7th International Workshop, ILP-
          <volume>97</volume>
          , Prague, Czech Republic,
          <source>September 17-20</source>
          ,
          <year>1997</year>
          , Proceedings, volume
          <volume>1297</volume>
          of Lecture Notes in Computer Science, pages
          <volume>273</volume>
          {
          <fpage>287</fpage>
          . Springer,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>