scieee AI-readable full text Open interactive document viewer

Topological Data Analysis of High-dimensional Correlation Structures with Applications in Epigenetics

Prada Alonso, Sara

Abstract

This thesis comprises a comprehensive study of the correlation of highdimensional datasets from a topological perspective. Derived from a lack of efficient algorithms of big data analysis and motivated by the importance of finding a structure of correlations in genomics, we have developed two analytical tools inspired by the topological data analysis approach that describe and predict the behavior of the correlated design. Those models allowed us to study epigenetic interactions from a local and global perspective, taking into account the different levels of complexity. We applied graph-theoretic and algebraic topology principles to quantify structural patterns on local correlation networks and, based on them, we proposed a network model that was able to predict the locally high correlations of DNA methylation data. This model provided with an efficient tool to measure the evolution of the correlation with the aging process. Furthermore, we developed a powerful computational algorithm to analyze the correlation structure globally that was able to detect differentiated methylation patterns over sample groups. This methodology aimed to serve as a diagnostic tool, as it provides with selected epigenetic biomarkers associated with a specific phenotype of interest. Overall, this work stablishes a novel perspective of analysis and modulation of hidden correlation structures, specifically those of great dimension and complexity, contributing to the understanding of the epigenetic processes, and that is designed to be useful for non-biological fields too.

Full text

CENTRO INTERNACIONAL DE ESTUDOS DE DOUTORAMENTO E AVANZADOS DA USC (CIEDUS) TESE DE DOUTORAMENTO Topological Data Analysis of High-dimensional Correlation Structures with Applications in Epigenetics Sara Prada Alonso ESCOLA DE DOUTORAMENTO INTERNACIONAL PROGRAMA DE DOUTORAMENTO EN MATEM´ ATICAS SANTIAGO DE COMPOSTELA 2020 DECLARACIÓN DEL AUTOR/A DE LA TESIS D./Dña. Sara Prada Alonso Título da tese: Topological Data Analysis of High - dimensional Correlation Structures with Applications in Epigenetics Presento mi tesis, siguiendo el procedimiento adecuado al Reglamento y declaro que: 1) La tesis abarca los resultados de la elaboración de mi trabajo. 2) De ser el caso, en la tesis se hace referencia a las colaboraciones que tuvo este trabajo. 3) Confirmo que la tesis no incurre en ningún tipo de plagio de otros autores ni de trabajos presentados por mí para la obtención de otros títulos. Y me comprometo a presentar el Compromiso Documental de Supervisión en el caso que el original no esté depositado en la Escuela. En Vigo, 29 de octubre de 2020. Firma electrónica ug . ' . ' ' . . . ' . . . D./Dña. Antonio Gómez Tato En condición de: Director/a AUTORIZACIÓN DEL DIRECTOR/TUTOR DE LA TESIS Título de la tesis: Topological Data Analysis of High-dimensional Correlation Structures with Applications in Epigenetics INFORMA: Que la presente tesis, se corresponde con el trabajo realizado por D/Dña Sara Prada Alonso, bajo mi dirección/tutorización, y autorizo su presentación, considerando que reúne I os requisitos exigidos en el Reglamento de Estudios de Doctorado de la USC, y que como director/tutor de esta no incurre en las causas de abstención establecidas en la Ley 40/2015. En Santiago de Compostela, 29 de octubre de 2020 Firma electrónica ug . ' . ' ' . . . ' . . . AUTORIZACIÓN DEL DIRECTOR/TUTOR DE LA TESIS D./Dña. Maria de los Ángeles Casares de Cal En condición de: Título de la tesis: INFORMA: Director/a Topological Data Analysis of High-dimensional Correlation Structures with Applications in Epigenetics Que la presente tesis, se corresponde con el trabajo realizado por D/Dña Sara Prada Alonso, bajo mi dirección/tutorización, y autorizo su presentación, considerando que reúne I os requisitos exigidos en el Reglamento de Estudios de Doctorado de la USC, y que como director/tutor de esta no incurre en las causas de abstención establecidas en la Ley 40/2015. En Santiago de Compostala, 29 de octubre de 2020 Firma electrónica Abstract This thesis comprises a comprehensive study of the correlation of high-dimensional datasets from a topological perspective. Derived from a lack of efficient algorithms of big data analysis and motivated by the importance of finding a structure of correlations in genomics, we have developed two analytical tools inspired by the topological data analysis approach that describe and predict the behavior of the correlated design. Those models allowed us to study epigenetic interactions from a local and global perspective, taking into account the different levels of complexity. We applied graph-theoretic and algebraic topology principles to quantify structural patterns on local correlation networks and, based on them, we proposed a network model that was able to predict the locally high correlations of DNA methylation data. This model provided with an efficient tool to measure the evolution of the correlation with the aging process. Furthermore, we developed a powerful computational algorithm to analyze the correlation structure globally that was able to detect differentiated methylation patterns over sample groups. This methodology aimed to serve as a diagnostic tool, as it provides with selected epigenetic biomarkers associated with a specific phenotype of interest. Overall, this work establishes a novel perspective of analysis and modulation of hidden correlation structures, specifically those of great dimension and complexity, contributing to the understanding of the epigenetic processes, and that is designed to be useful for non-biological fields too. Keywords: topological data analysis, correlation, high-dimensional data, epigenetics. Acknowledgments A partial time thesis requires a great ability to balance academic with professional development, being both strict and demanding. This section is dedicated to all the people that helped me to overcome both situations during this hard but beautiful path. Firstly, I would like to express my gratitude to my supervisors, Antonio G´omez Tato and Mar´ıa de los ´ Angeles Casares de Cal, for their continuous support during these exciting research years. Their guide and experience were fundamental for the correct thesis development, understanding also the constraints generated by the distance and the partial time dedication. I am truly glad of working with them. I would like to thank my company Clinipace, especially to my role models Ver´onica de L´azaro and Charlene Dark, for trusting on me. Leaving the company during these months was not an easy choice, but I have found in them all the possible understanding and energies. My family, especially my parents Antonio and Carmen and my sister Laura, were always supportive of any decisions I took, so I need to thank them for what I am. I remember that I started to be curious about genomics thanks to our lively philosophical talks at lunchtime. “Total thanks” to my life partner, Mariano, for his unconditional love that gave me the strength to continue. I also need to mention my baby nephew Alex, who was able to make me forget the thesis by just being with him. I am lucky to have friends like Leire and Marta who remind me what are the important things in life. I was absent during many moments, but they know that I am coming back. Thanks also to Natalia, who was an enormous psychological support, re-organizing my mind when it was becoming chaotic. Last but not least, I would like to express how thankful I feel to all the public institutions and public research that allowed me to learn more than ever on my own during this research career. There is no science without science. Introduction There is a crack in everything, that’s how the light gets in. Anthem, Leonard Cohen. The capacity of the current humankind to generate and store big quantities of data in multiple areas provokes an increasing data analysis need, leading to the excitement of an army of mathematicians. We are, more than our previous generations, dependent on the data we analyze and therefore on the predictions we generate. The new era of artificial intelligence is indeed supported by the availability of novel computational algorithms based, ideally, on founded mathematical theories. Among this increasing data offer, there is one specific data source that has a special interest for us due to its importance on human evolution: genomics (or generally, omics studies). In particular, the study of the genomic modifications that do not alter the DNA sequence and are produced by the interaction between subjects and their environment, called epigenetics, is increasingly being studied as part of the epigenomics field. Epigenetics gives a different perspective to human life, as it supports the idea that our lifestyle decisions play a major role in ourselves and the future generations [1]. It also opened the door to a different way of doing medicine, as epigenetic disorders may be reversed. Epigenetic alterations were already linked to different diseases like cancer, or to different conditions as the aging process. Generally, the study of the epigenetic modifications and their overall functioning within the genome is not an easy task. It has many different levels of complexity, and maybe some of them are still unknown. Additionally, the relationship between epigenetics and the spatial design of the DNA within the nucleus of the cell (what is normally referred as “the threedimensional structure” of the genome) is under current study, adding one level more of complexity to the whole system pointing out novel discoveries. This spatial design is capable to “join” distant genomic regions that may end in a common functioning or a genomic alteration. Introduction The success of epigenetic studies is increasingly dependent on the development of efficient mathematical models and computational algorithms that are able to accurately analyze that big complex data collection for its posterior interpretation. Indeed, the research field called “mathematical biology” focuses on the use of mathematical tools to study biological systems and investigate their structure, development, and behavior. From the first simpler applications of the Fibonacci series or the golden ratio, the use of complex mathematical realization applied or motivated by biological problems is increasingly growing above all from the genome sequencing (with “systems biology”). We are at the dawn of a new revolutionary way of understanding our biology and future medicine. Constructing intellectual bridges from abstract mathematical formulation to real problems is needed to analyze all the complexity levels and do what mathematicians know: to travel to the depths of the reasoning cave. In light of this situation and the mathematical challenges derived, this thesis focuses on providing with novel epigenetic data analysis tools through a topological perspective. But, what is really “data analysis”? and “topology”? A brain is a perfect machine of data analysis. From the first life steps, it receives information trough the sensory system and analyzes it in a less to more sophisticated way. The first phase of this analytical thinking process that occurs naturally is usually data segmentation. Human babies, for instance, differentiate the flavor of a lemon from the flavor of milk, but they do not know the reason of the difference. Next time they taste a citrus aliment, it will“go”directly to the“lemon side”(sensory memory). This kind of automatic learning, that goes prior to the use of the language and communication, could be considered an “unsupervised learning”. However, once we start to be more conscious about ourselves and our environment, we tend to label the information learned and so the groups or clusters that we have previously detected. This may be considered then a “supervised learning”. Indeed, there is a very typical childhood phase, where we continuously ask for names and reasons (what is that? why is that?). Every time we knew something novel, the information goes directly through the processing chain, that quickly labels it and stores it. For example, a three years old baby is able to distinguish a giraffe from a dolphin and even is able to distinguish terrestrial animals from aquatic animals. Sometimes this label is incorrect, but the own learning machinery will probably fix it. Having all of this into account, one can easily imagine how the process chain and the labeling gets affected by an alteration of the sensory system that is related to by many neurological disorders. Interestingly, in this second phase of cognitive development, the sensory system is also able to adopt a geometric perspective, arranging the space according to the 14 Introduction elementary relations of similarity, proximity, separation, enclosure or continuity. This first way of detecting highly abstract mathematical structures is present in low aged kids, that may be indirectly drawing geometric structures from a topological perspective through their main topological invariants. For instance, they may not be drawing very differently a circle from a triangle, but they would be drawing quite accurately the fact that two figures are non-intersecting. Indeed, topology is the field of mathematics that studies the properties of geometrical objects unaffected by continuous transformations of shape or size of figures. The capacity to deform a donut into a cup, or to define how different looks letter “D” from the letter “C” (holes/non-holes). Topological deformations seems to be aquatic and natural, and they describe the world from a very particular perspective. Being studied for centuries, topology is of interest for many distinct fields as biology, physics or even art. Figure 1: Mobius Strip II (Red Ants) (1963), by M.C. Escher. All M.C. Escher works c 20120 The M.C. Escher Company - the Netherlands. All rights reserved. Used by permission. www.mcescher.com Coming back to our brain processing machinery, technological and digital development add huge quantities of information to the processing chain, but their labeling into a cluster becomes complicated and the chain may fail. Sometimes we can train our brain to be able to do an approximate labeling (with analytical training, for example), but most of the times the amount or level of complexity of data leads us to ask for help. The data analysis comes then from this natural failure and tries to imitate our brain’s processing chain. Thus, we initially go through a first exploratory unsupervised phase to segment the data and detect clusters that will be afterwards used to classify new information in a supervised phase. That is how mathematical data analysis is born. There is currently a lack of standard and efficient analytical tools to deal with 15 Introduction the great quantities and varieties of high-dimensional data (also referred as “High Dimension, Low Sample Size” (HDLSS) data, which means, much more variables than independent observations are taken into account) as the genetic one. Particularly, the analysis of big-dimensional correlation structures is a pending topic in the epigenetics field. In our opinion, knowing the epigenetic correlation structure is crucial to understand completely the biological interactions that may be deregulated and manifested by a specific phenotype (as a disease), and could be associated with the described three-dimensional architecture of the genome. As we sill show in this thesis, the topological analysis of the large correlation structures contributes greatly to their understanding and interpretation. Generally, the application of algebraic topology (field of topology that combines abstract algebra with the study of topological spaces) in data analysis through topological data analysis (TDA) provides with an efficient perspective, as the study of the “shape” of the data is key to extract underlying data characteristics doing minimal prior assumptions about their distribution. The application of the main aspects of Morse theory and homology groups theory allows to obtain the principal data characteristics in different ways. Moreover, topology may extract the topological invariants of the data space itself, which helps with the accurate design of mathematical models to describe it and predict it. Furthermore, the dimensionality reduction is key to treat high-dimensional datasets with thousands of variables. For instance, TDA techniques reduce the data dimension through the creation of simplicial complexes that reproduce those main data characteristics and provide with a visualization tool. As a powerful methodology of computational topology, TDA has a machine learning design. TDA is indeed the theoretical inspiration of the present work. Motivated by the biological need of understanding better the complex epigenetic interactions, we developed a research work where the study of the correlation of such huge datasets is the principal target. We aimed to extract the main topological elements from the correlation structure of the epigenetic modifications (particularly of DNA methylation) to understand and model the correlation design and establish a link between epigenetic structure and functionality. We developed novel mathematical approaches and analytical tools to help on a higher understanding of the methylation correlation patterns and serve as an open door for other non-biological applications. Using the topological data analysis idea, our main proposal is to study the correlation through the topological properties of the associated correlation networks, which represents a novel method to describe and model those structures. This analysis was done locally and globally to cover distinct complexity levels, and designing different methodologies for each aim. We generated a model to describe the local correlation structure and developed a computational algorithm to study 16 Introduction the global correlation and the alterations of the DNA methylation with different sample conditions (as aging or disease status). The main idea of the designed algorithm is to do big data analysis in an easy and quick way, automatizing the process of dealing with thousands of variables. Both methods are novel ways of studying the epigenetic landscape and they pointed out new promising biological discoveries in this field. This thesis has therefore a high transversality, where different mathematical techniques were used to overcome biological problems. Main aspects of algebraic topology, graph theory, statistics, and computer science were used to develop efficiently the analyses done. Moreover, it could be considered a multidisciplinary work as we analyze deeply biological structures that are currently being investigated. A comprehensive understanding of complex genomic structures was needed to propose a rational mathematical hypothesis and model. Nevertheless, our ideas and technical proposals could be applied to any other field where high-dimensional data can be gathered. Derived from this transversality, this thesis opens the door to different research ways, from a more theoretical path centered on the description of the correlation networks and their topological properties; to a more applicable direction focused on the evolution and contributions of the algorithm created, together with the biological interpretation of results. The present work is hence divided into four main parts. The first part is an introduction to the problem statement and methodology. The second and third parts present our developed work and, finally, the last part includes an extensive description of the conclusions and open research. Specifically, this thesis contains: 1. The first part is an introduction to the biological and mathematical challenges to solve. It is divided in three chapters that contain: (a) The first chapter contains a description of the principal biological concepts that we use, and that are needed to understand the approach of the problem and relevance of the work. We describe extensively the epigenetic regulation, focusing on DNA methylation and its alterations with several features as the aging process or diseases as cancer. We explain here the characteristics of the methylation datasets we analyze. Please note that public data from humans was always used as a basis of the present work. (b) The second chapter includes the mathematical hypothesis derived from the biological problem and its argumentation. Also, we specify the first exploratory analyses done based on this hypothesis. We introduce the mathematical challenges that current techniques are unable to solve (as 17 Introduction the analysis of big correlation structures) and present the need of novel analytical tools in the direction of the topological data analysis approach. (c) The chapter 3 of this first part is a deep description of TDA methodology, that inspired us, and the mathematical theory behind. We also include an extensive description of two of the main TDA techniques, Mapper and persistent homology, presenting examples in the epigenetics field and introducing our analytical proposal. 2. The second part of this work contains two chapters and consists on the deep analysis of the correlation structure of DNA methylation from a local perspective. We study the spatial distribution of the correlation within CpG islands and its main topological properties. To do it, we represent the correlation matrices as correlation graphs that have a special modulated design based on this spatial distribution. The chapter 4 comprises an extensive study of the graph’s characteristics based on graph theory principles and persistent homology. The chapter 5 describes a model of the correlation structure of the CpG islands based on the properties studied. This model estimates successfully the interactions between CpG sites with high correlation. Besides, the model is able to distinguish distinct correlation behaviors among different age sample groups, so we are able to measure the potential evolution of the correlation design with the aging process. 3. The third part includes four chapters presenting the computational algorithm developed, called MultiNet, and the derived results. The main description of the algorithm and its implementation is specified in chapter 6. The chapter 7contains a guide for the needed parameters selection, and we present the contributions of the algorithm to the epigenetics study in chapter 8. We propose here a model to detect the correlation structure globally that improves the current algorithms used to analyze high-dimensional datasets. This could be viewed as an extension of part II, using the same topological perspective but with a wider design. The algorithm detects, moreover, methylation trends with different sample groups of interest (as case/control studies) including prediction models to detect epigenetic biomarkers that may be useful in diagnosis. We use the algorithm to study epigenetic modifications with the aging process and with cancer, obtaining results in line with public information plus novel promising findings. Computationally, it was designed to be fast and easy to use by diverse professionals. The algorithm was developed in R, as stated in chapter 9. 4. The last part is composed by the conclusions of the work. We summarize the novel contributions and the interpretation of the results as a whole. We also highlight the different research pathways that could be opened after this investigation. 18 Objectives The general goal of this thesis is to develop novel analytical tools to study highdimensional epigenetic correlation structures based on founded algebraic topology theories represented by the topological data analysis approach. In particular, we aim: •To develop mathematical models and computational algorithms to describe and predict the non-random design of the DNA methylation correlation structure, detecting epigenetic patterns and markers associated with a sample condition or a phenotype, like the age or a disease. •To understand better the local and global correlation structure of the epigenetic processes potentially linked to the genome architecture. •To measure the evolution of the correlation with the age. •To present mathematical strategies that could be useful beyond the biological context. Part I Biological Context and Mathematical Methodology Chapter 1. Main Biological Concepts 1.2 Epigenetics Up to early 90s, it was thought that the genetic inheritance present in the DNA sequence was the unique piece of information about ourselves and, therefore, our destiny. During the 90s decade, a new trend emerged based on rethinking the genetic procedures and understanding that both the environment and individual lifestyle can also directly interact with the genome. Epigenetics was born as a result of that wider view, describing the changes produced in our genome due to the interaction with the environment. It was also known that those changes occur during all life and can be transferred to the offspring through epigenetic inheritance [11,12,13,14]. The term epigenetics, which was coined by Waddington in 1942 [15], was derived from the Greek word “epigenesis” which originally described the influence of genetic processes on development (the Greek prefix epi- [“over”] means “on top of” or “in addition to” the traditional genetic notion). Waddington already anticipated in his study: [..] We might use the name “epigenetics” for such studies, thus emphasizing their relation to the concepts, so strongly favorable to the classical theory of epigenesis, which have been reached by the experimental embryologists. We certainly need to remember that between genotype and phenotype, and connecting them to each other, there lies a whole complex of developmental processes. It is convenient to have a name for this complex: “epigenotype” seems suitable [...]. The field of epigenetics describes therefore the genomic changes caused by our environment that do not involve modifications in the DNA sequence itself. In fact, the called epigenome refers to the group composed by the genome and its corresponding epigenetic profile. Although our epigenetic marks are more stable during adulthood than during early development, they are still thought to be dynamic and modifiable by lifestyle choices and environmental influence. Pollution, stress, wrong diet, smoking, etc. [16] are examples of life decisions or situations that may alter our genome through epigenetic changes and even have an influence on embryonic development. The increasing interest in epigenetics has revealed discoveries about the relationship between epigenetic changes and diseases like cancer, or several neurological disorders. Epigenetic experiments started with twins samples. Monozygotic (MZ) twins have exactly the same DNA sequence and, however, they develop in a variety of different ways and may have different diseases. Therefore, they are particularly interesting because they allow us to determine the level of divergence among inherited genetics and epigenetics (or, generally speaking, genotype and phenotype). So, how do 29 Chapter 1. Main Biological Concepts epigenetic differences arise in MZ twins that lived in the same environment during a big part of their life? Several studies concluded that genetically identical individuals became epigenetically non-identical as they age: epigenetic differentiation among both starts in the utero, but those differences become more pronounced with age and exposure to different environments [17]. Those analyses re-enforce the idea that the epigenome reflects environmental differences. Figure 1.3: Visual definition of epigenetics. Epigenetic changes may be reversible, as demonstrated by one interesting article published in 2019 with the case of a NASA astronaut and his non-astronaut twin [18]. By comparing blood samples from the twins before, during and after the 1-year NASA mission, researchers found that astronaut’s gene expression was exceedingly altered after spending a year in space, and that his DNA suffered damage probably due to radiation exposure. Of course, the astronaut genetic code did not change, but several epigenetic modifications lead to the gene expression alteration recognized. Even more surprising and interesting was the fact that within six months of returning to Earth, about 90% of astronaut’s affected genes returned to their normal expression levels. We could say that this is an example of an accelerated epigenetic change, resulting from a totally abnormal exposure (and adaptation) to different environmental conditions. X chromosome inactivation is an interesting epigenetic regulation process that was first introduced by Mary Lyon around 1960. Females have two copies of the X chromosome, determining their sex. However, only the information contained in one of these two X chromosomes is finally used, leading to the inactivation of the 30 Chapter 1. Main Biological Concepts other one. This is what we call X inactivation. X inactivation could be considered the epigenetic phenomenon par excellence, as the X chromosome is not inactivated by mutation of the DNA sequence. It is a natural process to not duplicate the genetic information contained on this chromosome that has about 1,300 genes. The interesting thing about this inactivation process is the complexity and importance. We are taking about deactivating more than one thousand of genes irreversibly. This occurs early in development and randomly, meaning that we cannot predict which one of the two chromosomes (maternal or paternal) will be inactivated. Moreover, this process is heritable and demonstrates the capacity of the cell to count the number of X chromosomes (for that reason this process does not happen in men). Its importance is coming from the consequences of the non-inactivation, that is basically the death of the coming live. This amazing process that seems to be taken from a science fiction book is really happening in every cells of a future woman. There are many publications about this process and ongoing research is still being developed in order to completely understand and describe the mechanism [19]. Generally speaking, there was a change in the way we understand genetics and therefore in the way we investigate animal and human genomes. The “epigenetics revolution” was a breaking point on the whole genetics field, moving forward to a wider view of the complex biological mechanisms behind. Of course, the overall epigenetic regulation remains diffuse, but the studies published in the last years were a big progress on the area. They provided with a detailed idea on how the environment modifies our and future generations’ genome, and how it may be connected to several complex diseases. This was, at the same time, a big step forward on the development of precision medicine [20] with new drugs that can regulate the epigenetic alteration or revert it. The complete understanding or current and future disease’s functioning is the only way to, not only cure their symptoms, but genetically eradicate them. 1.2.1 Epigenetic Modifications There are different types of epigenetic modifications that indirectly modify our genome functioning without altering the DNA sequence itself. All those mechanisms can be studied separately despite they should of course be also viewed as a complete work chain. Currently, DNA methylation is one of the most broadly studied and well-characterized epigenetic modifications but there are other alterations to be studied including gene expression, chromatin remodeling, histone modifications, and non-coding RNA mechanisms. As we mentioned at the beginning of the present document, the specific mechanisms of the overall epigenetic regulation and its consequences on evolution and diseases remain unclear. 31 Chapter 1. Main Biological Concepts Similarly to GWAS, epigenome-wide association studies (EWAS) [21] quantify epigenetic marks, such as DNA methylation, in different individuals to derive associations between epigenetic variation and a particular identifiable phenotype. While the genetic risk of a disease is currently unmovable, there is hope that epigenetic risk may be reversible and/or modifiable. During the last decades, research is more and more focused on the creation and manipulation of high-dimensional arrays of epigenetic marks that speed up epigenetic analysis. However, there are still a few challenges to overcome as tissue variability or low sample sizes. Several statistical and computational techniques raised for their analysis, however they are not optimal or standard from distinct points of views. For instance, most studies are limited to the study of local epigenetic patterns, whereas methods for analyzing large-scale organizations are still lacking. DNA Methylation In particular, the present work studies the mechanisms and patterns behind DNA methylation as an epigenetic feature. DNA methylation is an epigenetic mark by which methyl groups attach to the DNA strand. The base C gets methylated to form 5-methylcytosine. This methylation reaction is carried out in our cells by one of the three enzymes called DNA methyltransferases: DNMT1, DNMT3A or DNMT3B. The base C, that is sensitive to be methylated, may be followed by a G in the linear sequence of bases forming a CG site or CpG site (from cytosine-phosphate-guanine). In mammals, around 80% of CpG cytosines are methylated. This chemical group added does not modify the underlying DNA sequence, but methyl groups specify new signals to guide the reading of the genetic information, potentially impacting gene expression. DNA methylation is essential for normal development, and it plays a very important role in several key processes including genomic imprinting or X chromosome inactivation. DNA methylation at gene promoters is important for transcriptional regulation, with dense promoter hypermethylation around the transcription start site being associated with gene repression or silencing. Generally, its dysregulation, that may occur more frequently that a genetic mutation, contributes to risk of diseases like cancer. CpG dinucleotides frequently occur in CpG islands. CpG islands are large DNA sequences that deviate significantly from the average genomic pattern by being enriched in “GC” (CpG-rich) and predominantly non-methylated. The formal definition specify them as a stretch of DNA of at least 200 base pairs (BP or bp) long with at least 50% of CpG content. They could be associated with the start of the gene (promoter regions) and are typically unmethylated when the nearby gene is active or expressed. Indeed, the presence of a CpG island is used to predict genes’ location. 32 Chapter 1. Main Biological Concepts CpG islands have been widely investigated due to the mentioned regulatory importance. However, their overall functioning and interaction or the reason of their alterations are points not completely determined. For us, they will be an important source of study, as they represent interesting regions with a special correlation design. Figure 1.4: DNA methylation process. DNA methylation has a complex structure mainly due to the variability of its patterns with distinct tissues, sample characteristics, or genomic regions. DNA methylation works together with other epigenetic modifications as histone alterations. The heavily repressed areas of the genome present high levels of DNA methylation and are very condensed. The DNA becomes very tightly wound up, inaccessible to enzymes that transcribe genes. Repressive histone modifications attract DNA methyltransferases, which deposit DNA methylation near to those histones. This methylation in turn attracts more repressive histone modifying enzymes, creating a loop that leads to an increasingly hostile region for gene expression [13]. Repressive histone modifications can therefore attract DNA methylation to the promoter of a tumor suppressor gene. As a consequence, an alternative therapy could be based on finding the right epigenetic enzymes to re-express the tumor suppressor genes without the need of change the DNA methylation. There are several methods available to determine the methylation status of DNA samples or differential methylated regions, and their use depends on the matter of study [26]. Those comprise bisulfite sequencing, methyl-sensitive cut counting, or array technology. The last one is the most used and the one we use. It takes methylated DNA fractions of the genome, identifying differentially-methylated re- 33 Chapter 1. Main Biological Concepts gions non-uniformly distributed in the genome. DNA methylation patters should be carefully interpreted taking into account the underlying functional aspects. For example, it is known that the methylation levels may change with the tissue or cell type where they were measured [22,23], with the existence of identified tissue-dependent or cell-type specific CpG sites. On the other side, demographic characteristics as race/ethnicity, age, gender, or lifestyle decisions (smoking, diet habits, drugs abuse, stress, etc.) were associated with different methylation levels [24,25]. We can extract methylation samples from multiple tissues: brain (different cell types), blood (different cell types), cord blood, sperm, saliva, breast, cartilage, colon, head, neck, heart, kidney, liver, skin, placenta, lung, stomach, etc. The comparison of the results found with different tissue-based arrays could be correlated but has to be done carefully. Due to the dimension, complexity, and variability of the mechanisms beyond the DNA methylation, and the functional factors just described, it is very difficult to find standard analytical tools of patterns’ identification that obtain accurate results. For that reason, one of the aims of this thesis is to provide with alternative mathematical methods of methylation analysis. Analysis of DNA Methylation The mathematical methods developed in this thesis are conducted to analyze DNA methylation patterns and their correlation structure, associated to different factors as the aging process or certain diseases. The type of data that is normally used in genomic studies is High Dimension, Low Sample Size (HDLSS) data, which means, much more variables than independent observations are taken into account. Infinium HumanMethylation27 or the newer HumanMethylation450 Bead Chip array by Illumina are the main arrays used for publications and both are HDLSS (we call them simply “high-dimensional datasets”). The difference among both is the number of CpG marks analyzed per subject: about 27,000 or 485,000 individual CpG sites in 99% of known genes, and different regions. Currently, there is a novel array available with more than 850,000 CpGs but it is still on the first steps of application. To date, two parameters have been proposed to measure the methylation level of the CpG marks. The first one is called Beta-value (or βvalue) and has been widely used to measure the percentage of methylation. It is defined as the ratio of the methylated probe intensity and the overall intensity (sum of methylated and unmethylated probe intensities). This is the one recommended by Illumina. The 34 Chapter 1. Main Biological Concepts Beta-value follows a beta distribution and for an ith interrogated CpG site is defined as: βi=max(yi,meth,0) max(yi,unmeth,0) + max(yi,meth,0) + α(1.1) where yi,meth and yi,unmeth are the intensities measured by the ith methylated and unmethylated probes, respectively. The αparameter is an Illumina recommendation (by default, α= 100) to regularize Beta-value when both methylated and unmethylated probe intensities are low. The Beta-value results in a number between 0 (completely unmethylated) and 1 (completely methylated). The second one, the M-value, is calculated as the log2 ratio of the intensities of the methylated probe versus unmethylated probe as follows: Mi=log2max(yi,meth,0) + α max(yi,unmeth,0) + α The Beta-value has to be used with the awareness that it violates the Gaussian distribution assumption used by many statistical methods. However, the M-value can be appropriately analyzed with these methods [27]. The Beta-value can be converted into a M-value (ignoring α), and in the other way around, as follows: βi=2Mi 2Mi+ 1 Mi=log2βi 1−βi In our case, βlevels of the HumanMethylation450 Bead Chip array are going to be analyzed. The array used can be viewed as a matrix with more than 485,000 rows and as many columns as determined by the sample size. Let be Nthe number of individuals in our sample {X1, ..., XN}. Supposing that our array contains nCpG sites or variables {CG1, ..., CGn}, then our starting point is the following methylation matrix of dimension n×N: B=     βCG1,X1. . . βCG1,XN . . ..... . . βCGn,X1. . . βCGn,XN      (1.2) Together with the methylation arrays just described, there is also available the metadata for each one the CpG sites analyzed and the sample selected. The metadata related to the sample is quite variable dependent on the dataset, but normally 35 Chapter 1. Main Biological Concepts contains the main demographic characteristics of the sample (gender, age, ethnicity, disease group, etc.) together with the place, date, tissue and type of sample collected. The metadata related to each one of the CpGs contained in the 450K array is more standard and is given by the called Infinium Methylation450K manifest. Among all the information given, the variables presented in the table 1.1 are the most used, and the ones we use: Table 1.1: Infinium methylation 450K manifest content Column header Description IlmnID Illumina CG dataset ID CHR Chromosome containing the CpG MAPINFO Chromosomal coordinates of the CpG UCSC RefGene Name Target gene name(s) UCSC RefGene Group[1] Gene region category describing the CpG position UCSC CpG Islands Name Chromosomal coordinates of the island Relation to UCSC CpG Island[2] The location of the CpG relative to the CpG island DMR[3] Differentially methylated regions Regulatory Feature Group Regulatory feature: gene-associated, non-gene associated, promoter, unclassified The line [1] above could be divided in: TSS200 = 0–200 bases upstream of the transcriptional start site (TSS); TSS1500 = 200–1500 bases upstream of the TSS; 5’UTR = Within the 5’ untranslated region, between the TSS and the start site; Body = Between the start site and stop codon; 3’UTR = after the stop codon. The line [2] is categorized in: Island, N-Shelf, N-shore, OpenSea, S-Shelf, S-Shore. They mean: Shore = 0–2 kb (1 kb = 1000 bp) from the island, Shelf = 2–4 kb from the island; N = upstream (5’) of the CpG island, and S = downstream (3’) of the CpG island. OpenSea region corresponds then to areas not classified as islands or surroundings. The variable [3] has the different categories determined experimentally: DMR = Differentially Methylated Region. CDMR = Cancer-specific Differentially Methylated Region. RDMR = Reprogramming-specific Differentially Methylated Region. 36 Chapter 1. Main Biological Concepts Current Methylation Analysis Techniques During the last years, the use of the 450K array increased significantly being analyzed by different statistical approaches and computational algorithms. Several techniques [28,29,30] were raised to study deeply the potential methylation patterns and their association with case/control samples. They follow similar analysis lines to detect methylation patterns in form of differentially methylated positions (DMPs) related to a phenotype covariate, differentially methylated regions (DMRs) for a specific genome region, or differentially methylated CpG sites (DMCs or DMSs) without regional restriction. However, most of them analyze methylation data on a site-by-site basis, ignoring correlation effects and limiting the statistical power and biological interpretation of results. Some of those methods analyze differentiated patterns between regions, but they have difficulties to detect global non-regional patterns. They normally use the term “co-methylation”, that describes proximal CpG probes with similar DNA methylation values that are detected with different techniques [31,32,33]. Co-methylation analyses were relatively successful to detect DMRs but not to differentiate sample proves or larger inter-chromosomal interactions. Some examples of implemented regional statistical analyses are adjacent site clustering [34], Bumphunter [35], blockFinder, Probe Lasso [36,37], or DMRcate among others [38,39,40,41]. To detect DMPs or DMCs, different techniques based on a regression analysis per CpG site are commonly used to model methylation levels from different sample groups, using afterwards a t-test to reject or accept the null hypothesis of null model coefficients. The obtained p-values are adjusted for multiplicity with false discovery rates (FDRs) normally. However, those methods force to test thousands of different hypotheses with the consequent power reduction of the p-value adjustment method. Generally, the mentioned methods assume normality, which is not really true for microarray data. Besides, linear models do not work well with very variable data, increasing the false positive rate. In addition, they are unable to detect potential data confounders as the difference in cell-type proportions that may lead to a different methylation status. Several methods providing with alternative solutions are not so efficient from a computational perspective, as Hidden Markov models [42,43,44] used to identify CpG islands, chromatin states [45,46], DMRs or DMCs [47,48]. There are several R packages [29] defined to detect regions or sites differentially methylated, being one of the most used the called Minfi [49]; but also IMA, FastDMA,ICDMR,QDMR,COHCAP,BumpHunting,WFMM, and MethylKit. There is not specific prof that one method performs better than the others, it will 37 Chapter 1. Main Biological Concepts depend on the sample and data characteristics and the aim of the study. Improvements in the statistical methodology to provide with enough power, robustness, efficiency, and non-biased results are needed to be developed [28]. Ideally, the standardization of the methodologies used depending on the study aim could facilitate the analytical process. Moreover, the analysis of the correlation structure has to be studied deeply in order to increase the understanding of the methylation regulation networks and their impact. The main problem is that we would need to calculate an enormous correlation matrix of dimension 485,000 ×485,000. That is really a non-manageable computational time, in case our computer is able to do it. Moreover, results would be highly uninterpretable. Therefore, usual techniques of exploring the data correlation cannot be used and we need to find other options. Those challenges motivated us to present analytical solutions described in this work. 1.2.2 Epigenetics of Aging Aging is a biological process known in all species and was always a matter to study. The understanding of the mechanisms behind the aging process and derived diseases is crucial for several aspects. Specifically, the epigenetic functioning of this process is interesting to understand the changes produced in our genome as years go by, in order to revert them, and dig into the longevity processes too. As mentioned in previous sections, epigenetics may serve to explain why the pattern of aging is different between two genetically identical individuals, such as identical twins, or, in the animal kingdom, between animals with identical genetic makeup, such as queen bees and worker bees [54]. Several studies published during the last decade, in humans and other species, indicate that epigenetic changes have a huge influence on the aging process altering the local access to the genetic material and leading to genomic instability. There is, therefore, a potential difference among the biological or epigenetic age and the chronological age of an individual [50,51]. In fact, it is currently possible to calculate the epigenetic age of a subject based on specific DNA methylation marks thanks mainly to the work done by Horvath [52]. This work and related ones are extremely important in forensics medicine [53]. Some of the methylation changes that occur with age are directional and involve specific regions of the genome, with a generalized CpG hypomethylation trend more present in CpG islands. However, hypermethylation also occurs at specific CpG sites of the genome, presumably to repress the expression of specific genes. Global hypomethylation at the repetitive regions and site-specific hypermethylation at certain promoters have also been reported during cancer, suggesting a potential 38 Chapter 2 The Mathematical Hypothesis What is the mathematical challenge to solve? After the necessary biological concepts were introduced, we present in this chapter the main mathematical hypothesis generated from the described biological observation. In addition, we will present the initial analytical challenges of our work and the improved proposal to extract the maximum information about DNA methylation patterns and correlation. 2.1 The Correlation Hypothesis The joint analysis of the local (short-range) and global (long-range) correlation between DNA methylation marks was not extensively studied, limiting it almost exclusively to the local behavior of co-methylated trends. Generally, the analysis of correlation patterns of high-dimensional datasets requires sophisticated analytical tools that were not very developed. It is indeed what we would like to cover with the present work. Having into account the genome structure just described in section 1.3 and the biological hypothesis of a chromatin spatial design that determines genomic functionalities, we develop a mathematical hypothesis to be tested. We hypothesizes that this structure also determines epigenetic interactions and has an influence in the correlation structure of DNA methylation. The main hypothesis is then that the correlation between CpG sites is not random, but it reaches high significant levels in a structured and standard way for short-range and also for long-range genomic regions potentially derived from the loop design (please see figure 2.1 below as an example). In analytical terms, the loop may be seen as a differentiated correlation cluster above or below the diagonal of the methylation correlation matrix, where CpGs are Chapter 2. The Mathematical Hypothesis Figure 2.1: Illustration of the loop design approaching distant genomic regions. ordered by their genomic positions within the chromosome (as presented in figure 2.2). For instance, imagine that CpG sites CG1and CG2are located in the same chromosome with a genomic distance d>( > 0) among them. The loop would reduce the spatial distance of those two CpG sites to d <  increasing the likelihood of common biological functioning, methylation patterns and a higher correlation. Therefore, the Pearson correlation coefficient ρ(CG1, CG2) may be higher than expected [82] having into count their genomic distance d. Figure 2.2: Example of a methylation correlation matrix including short-range (green) and long-range (red) correlation clusters. In the correlation matrix of a CpG island showed in figure 2.2 we find two types of correlated clusters, some of them in near genomic positions (over the 46 Chapter 2. The Mathematical Hypothesis diagonal, marked with green circles) and others corresponding to distant genomic positions (over the lateral, marked with red circles). What we would like to test is that those clusters are not formed randomly but they form a structure that may be representing specific biological interactions. Of course, as we are considering a CpG island, the CpG sites are all nearer compared with other genomic regions. It has been studied that part of the DNA methylation variability may be caused by the tissue used and the cell type decomposition within that tissue [86,87]. Despite [88] points out that the majority of the high correlation is due to different technical and biological confounders, as cell-type sub-populations, we came to a different conclusion. We assume that there may be several CpG sites affected by the tissue and the cell-type leading to an increase of the methylation variability, but this does not necessarily mean a disappearance of a correlation structure and, moreover, it does not mean that the whole high correlation among epigenetic markers is exclusively due to this confounder. In fact, we have found significant high levels of correlation among randomly selected CpG sites (not necessarily nearly located or in the same chromosome) in different tissues and cell types, as we will describe in the next subsections. Our first hypothesis is therefore the existence of significant correlation over any DNA methylation dataset, in an structured way. We want to test: H0:ρ= 0 where ρrepresents the population Pearson correlation coefficient of two X, Y random variables (or CpGs): ρX,Y =cov(X, Y ) σXσY being cov the covariance, σXthe standard deviation of X, and σYthe standard deviation of Y. We could then define the sample Pearson correlation coefficient as: rxy =Pn i=1(xi−¯x)(yi−¯y) pPn i=1(xi−¯x)2pPn i=1(yi−¯y)2 where nis the sample size, xi, yiare the individual sample points indexed with i, and ¯x= 1/n Pn i=1 xiis the sample mean (similarly for ¯y). We will use the Fisher transformation of rto estimate the confidence intervals of the correlation coefficient. If we calculate the Fisher’s transformation of the sample correlation rthrough the formula: F(r)≡1 2ln 1 + r 1−r= arctanh(r), 47 Chapter 2. The Mathematical Hypothesis then, under certain conditions, F(r) follows approximately a normal distribution with mean F(ρ) = arctanh(ρ) and standard error SE =1 √n−3[89,90]. With the approximation, z-score is, under the null hypothesis: z=x−mean SE = [F(r)−F(0)]√n−3 The confidence interval of ρis then based on the confidence interval of F(ρ). The normal cumulative distribution function Φ given the significance level α= 0.05 is defined as: Φ(z) = P(Z≤z)=1−α 2= 0.975, z= Φ−1(Φ(z)) = 1.96 and we get: 0.95 = 1 −α=P(−z≤Z≤z) = =P(−1.96 ≤arctanh(r)−mean SE ≤1.96) = =P(arctanh(r)−1.96SE ≤mean ≤arctanh(r) + 1.96SE) So the 95% confidence interval (CI) of F(ρ) is then generally: 100(1 −α)%CI : arctanh(ρ)∈[arctanh(r)±zα/2SE] (2.1) The inverse Fisher transformation brings the interval back to the correlation scale: 100(1−α)%CI :ρ∈[tanh(arctanh(r)−zα/2SE),tanh(arctanh(r)+zα/2SE)] (2.2) The defined CI will allow us to accept or reject the null hypothesis based on the results we are about to explain. 2.1.1 First Correlation Analysis In order to have a first idea of the quantity of correlation that we may find in a methylation dataset, we calculated the correlation matrix of a 450K array by brute force. We use Beta levels as methylation descriptors, following the equation 1.1, using the public dataset coded as GSE40279 from human whole blood of 656 healthy samples aged between 19 and 101 years old. The computational time is of course unmanageable (it took days to run in a normal computer without parallelization) but it is valid as a first method of hypothesis validation. We have found high positive and negative correlation among CpG sites belonging to the same and different chromosomes, and the most founded reason is that those global correlations can be caused by the three-dimensional 48 Chapter 2. The Mathematical Hypothesis DNA structure. We have determined in a matrix Gthe number of CpG sites with an absolute correlation greater than 0.5, 0.6, 0.7, and 0.8 with at least other CpG in the same chromosome or in a different chromosome. We called this matrix the “correlation grade” matrix, as the CpG grading is determined by the number of interactions (correlations) with other CpGs. For instance, the correlation grade matrix at 0.8 is a matrix of dimension 22×22, where each row and column correspond to a different chromosome. We would have similar matrices for the other weights 0.5, 0.6, and 0.7: G0.8=     g1,1. . . g1,22 . . ..... . . g22,1. . . g22,22      where gv,w ={#CG ||ρ(CGi, CGj)|>0.8,∀CGi∈v, CGj∈w}, being vand w two of the 22 chromosomes (sex-related ones were not taken into account). Among the 473,034 CpGs analyzed, around 180,000 had not any correlation greater than 0.5. Among the others, most of them had correlations mostly with other CpGs in the same chromosome, but also with other CpGs belonging to a different chromosome. Almost 293,000 had at least one correlation greater than 0.5 with another site (around 40-50% of the sites per chromosome), and almost 64,000 CpGs had at least one correlation greater than 0.8 with another site from the same or different chromosomes. From those, most of them belong to CpG islands (37%), followed by “OpenSea” regions (32%). The CpG sites with at least one correlation greater than 0.8 are represented in the circle plot of figure 2.3, where each chromosome is represented by a color and where each line among two chromosomes represents a correlation greater than 0.8 between two CpG sites belonging to those chromosomes. This plot is programmed using the R package circlize. As we can observe, there are many inter-chromosome interactions, especially among chromosomes 1 and 22. Several studies pointed out that the majority of inter-chromosome interactions take place within the short chromosomes or from the short chromosomes to the larger ones, so this may be one of the reasons of this finding [65]. The correlation among the selected CpG sites and the sample age is generally low, with only a few values obtaining an absolute correlation coefficient near to 0.6. Among the CpGs with correlations higher than 0.8, a group of around 2,000 present higher grades, i.e., they have high correlation levels with many (≥200) other CpG sites in the same and different chromosomes. Most of them (around 50%) belong 49 Chapter 2. The Mathematical Hypothesis to chromosome 1 and present a high level of correlation (mostly positive). They are mainly present in body regions (45%) (that are also the majority in the array) not belonging to CpG islands, and only 200 of those sites are SNPs. Those methylation sites are not significantly correlated with age, having absolute correlation coefficients lower than 0.3. The genes related to those sites are CSF3R, FCER1G, GPR21, S100AB, S100A9, MIR626, or C5orf4 among others. They are related to metabolic functions marked by the KEGG biological pathways “Sphingolipid signaling pathway”, “Platelet activation”, or “Thyroid hormone signaling pathway”. We might be then observing a set of methylation interactions motivated by common biological functions. Figure 2.3: Circle plot of the correlations greater than 0.8 within and between chromosomes. 2.1.2 Correlation on Different Tissues and Cell Types In order to validate the prior results in other datasets, tissues and cell types, we continued with a sampling process. We studied the high correlation (greater than a threshold δ) among a random sample of 100,000 CpG sites calculating the upper 50 Chapter 2. The Mathematical Hypothesis diagonal of the correlation matrix among 2,000 CpGs randomly selected over 50 simulations. Please see the algorithm 1below with the detailed process. The results we are about to present improve (we obtain higher correlations) if those 2,000 sites are chosen as consecutive by genomic position. The number of simulations could be increased but results does not change significantly. The threshold δvaries between 0.5 and 0.8, as presented in the table 2.1 below. The resulting value represents then the percentage of correlation coefficients greater or equal than δamong the upper diagonal of the sampled correlation matrix. We used 450K datasets of DNA methylation on different tissues: 5 datasets of blood tissue (GSE40279 whole blood, GSE41169 whole blood, GSE36064 peripheral blood leukocytes, GSE30870 cord blood and whole blood CD4+ cells, GSE34639 CD4+ cells), 4 datasets of brain tissue (GSE66351 glia and neuron cells frontal cortex, GSE50853 neuronal and non-neuronal cells orbitofrontal cortex, GSE41826 frontal cortex various cells, GSE15745 different brain parts), 2 of colon tissue (GSE32146, GSE48684), 1 of prostate tissue (GSE76938), 1 of buccal (GSE42700), and 1 of placenta tissue (GSE44667). For the cases with multiple cell types, we did the analysis for each cell-type sample and took the average of the resulting percentages. We always selected only the healthy or control samples from the case/control studies. We restricted the sample sizes Nof each case to samples containing about 10-30 healthy individuals in order to be able to compare results (as a higher sample size may lead to a decrease on the overall correlation). However, even for the cases with more than 100 samples, or even more than 600 samples, we have found a higher than expected quantity of correlation. Algorithm 1: Sampling algorithm Parameters: B matrix 485,000 ×N(as described in equation (1.2)), and threshold δ; initialization; while simulation s= 1 do Select a random sample s1of n= 2,000 CpG sites from the rows of B; if ∀CGi, CGj∈s1, i, j = 1, ..., n, j > i, if δ≤ |ρ(CGi, CGj)|<1then pδ1ij = 1; else pδ1ij = 0; end pδ1=Pij pδ1ij ; end Repeat simulation s= 2, ..., 50; Result: Pδ=(Ps(pδs)/50)×100 n(n−1)/2 51 Chapter 2. The Mathematical Hypothesis Table 2.1: Average Pδresults by tissue type. Tissue δ= 0.5δ= 0.6δ= 0.7δ= 0.8 Blood 12% 6% 2% 0.5% Brain 20% 12% 6% 3% Colon 19% 11% 5% 2% Prostate 8% 3% 1% 0.4% Buccal 8% 3% 0.7% 0.1% Placenta 7% 2% 0.7% 0.1% For a population of 656 individuals, the Pearson correlation coefficient r= 0.1 would be already statistically significant rejecting the null hypothesis of a null correlation. If r= 0.1 then, as per equation (2.2), arctanh(r) = 0.1003 (rounded), so the 95% confidence interval on the correlation scale is tanh(arctanh(r)±1.96/√653), or approximately (0.024,0.175). As the confidence interval does not contain the zero, we reject the null hypothesis. For a sample size of n= 20 and r= 0.5, the null hypothesis is also rejected. We have discarded that this correlation is caused by the age of the samples as the mean correlation coefficient with age is normally lower than 0.1. The removal of sites related to the sex chromosomes and the SNPs did not alter the results. Having now into account the percentages presented in the table 2.1, we could calculate the number of CpGs that have at least one correlation coefficient greater or equal than 0.5, i.e., how P0.5is distributed in the correlation matrix. We could use, for instance, the dataset containing 656 blood samples for comparing with the results of subsection 2.1.1. We obtain that a 36% of the CpG sites (or correlation matrix rows) have at least one correlation greater or equal than 0.5 with other CpG. This percentage means that the correlation is not uniformly distributed for all CpG sites, but only some of them accumulate the high correlation coefficients. This percentage is a little bit lower but similar to the percentages of the grade matrix obtained in subsection 2.1.1 for the first threshold of 0.5, where about 40-50% (depending on the chromosome) of the sites per chromosome had a correlation greater than 0.5 with at least other CpG site. If we just use CpG islands as input to the algorithm 1, this calculated percentage increases up to a 44%, as the percentages of the table 2.1 increase too. We conclude then that the fact of finding significant correlation for datasets of 52 Chapter 2. The Mathematical Hypothesis different tissues and cell types demonstrates that this correlation is not random and is not completely determined by the tissue or the cell-type proportions. Moreover, a positional effect was observed when selecting continuous CpG sites and with the presence of sites located in CpG islands. These statements constitute a novel approach for the study of the methylation correlations globally, suggesting that there is indeed a network of correlations that were overlooked until now. Overall, this study rejects our initial null hypothesis and pushes us to deeply study the structural correlation over intra and inter-chromosomal CpGs, which is the main biological objective of the present work. To do it, we will design specific analytical tools that aim to improve current methods and are in line with novel data analysis strategies, as we explain in the next sections. 53 Chapter 2. The Mathematical Hypothesis 2.2 The Correlation Analysis Challenge Once we know that there is a potential correlation structure that deserves to be analyzed, the following question is: How do we do it? One of the main challenges when taking about high-dimensional correlation is the computational requirement to calculate the correlation matrix. How do you calculate a correlation matrix of dimension around 400,000 ×400,000? How do you visualize it and analyze it? Overall, with the increasing availability of huge complex datasets, there is an increasing need of developing novel methodologies to analyze high-dimensional data. In this sense, dimensionality reduction techniques as principal component analysis (PCA) or multidimensional scaling (MDS) are a crucial step where the data exploratory visualization is not easy. However, those techniques are not always computational efficient for big data and they anyway need a posterior data modulation. Besides, sometimes they may be unstable to data perturbations and are unable to detect structured topological elements that are key to describe successfully the underlying data characteristics. Common statistical models may also be unsuccessful, as they require a prior data distribution knowledge limiting the data analysis flexibility. During the last decade, correlation networks were also popularized in biology [91,92]. Despite they present advantages to deal with high-throughput datasets and detect hidden structures, they may also be inefficient with an incorrect parameter selection, local noise or many genes. In addition, the development of network models and analytical tools to measure network’s properties or differences among sample networks is still ongoing. So although recent improvements in high-throughput technology enable the collection of large omics datasets for many biological fields, analysis methods to handle these data are still on development [93,94]. Thereupon, the analysis of highdimensional data finding non-biased correlation patterns is a mathematical challenge that we would like to overcome with the present work. We propose different analytical tools to reduce the dimension of the datasets creating related networks, to study their topology and build network models. First with a local design (each node represents a CpG), and afterwards with a wider global design (each node represent a cluster of CpGs), we aim to analyze all the information strata with distinct mathematical techniques. The inspiration of our proposal comes from the powerful technique described nextly. 54 Chapter 3. Topological Data Analysis as Main Methodology We could also call vertices to the zero simplicies of a simplicial complex. Generally, the set of simplices up to dimension kis called the k-skeleton of the complex and is denoted as X(k). We will mainly use finite simplicial complexes, composed by a finite number of simplices. Definition 3.2.4 The geometric realization |X|of a finite simplicial complex Xis the topological space given by the union of simplices, with the relative topology as a subspace of Rn. A simplicial complex that has only 0-simplices and 1-simplices represents a graph embedded in the Euclidean space, where the 0-simplices are the vertices and the 1-simplices are the edges. We can also define continuous maps between simplicial complexes, as follows: Definition 3.2.5 Let Xand Ybe simplicial complexes. A simplicial map f:X→ Yis specified by a map X(0) →Y(0) such that whenever {z0, ..., zk} ⊂ X(0) span a simplex of X, {f(z0), ..., f(zk)}span a simplex of Y. The composition of two simplicial maps is a simplicial map. Definition 3.2.6 Let Xand Ybe simplicial complexes. An isomorphism of simplicial complexes is a simplicial map f:X→Ythat is a bijection on 0-simplices and such that for any k > 1, a collection of vertices {x1, ..., xk}specifies a simplex of Xif and only if {f(x1), ..., f(xk)}is a simplex of Y. Thus, it is possible to form a category which objects are the simplicial complexes and which morphisms are the simplicial maps. Lemma 3.2.1 Geometric realization specifies a functor from the category of finite simplicial complexes and simplicial maps to the category of compact topological spaces and continuous maps. Abstract Simplicial Complexes Simplicial complexes are also possible out of the Euclidean space Rn, and this abstraction is called abstract simplicial complex. To the ones just presented above, we will then refer as geometric simplicial complex. We could define an abstract simplicial complex as the combinatorial counterpart of a geometric simplicial complex, as: 61 Chapter 3. Topological Data Analysis as Main Methodology Figure 3.3: Example of a simplicial complex. Definition 3.2.7 An abstract simplicial complex is a set Xof finite non-empty sets such that if σis an element of Xthen so is every non-empty subset of σ. 1. Each element of Xrepresents a simplex; we refer to elements of Xas (abstract) simplices. 2. The dimension of an abstract simplex σis |σ| − 1, where | − | denotes the number of elements of a set. 3. Any non-empty subset of a simplex σis a face of σ. 4. The vertices of Xare the one-point sets in X. 5. More generally, we will denote the subset of Xconsisting of sets of cardinality ≤k+ 1 as X(k), the k-skeleton. As the ones presented for geometric simplicial complexes, similar definitions of maps and isomorphisms are available for abstract simplicial complexes. There is a relationship among the geometric and the abstract simplicial complexes, that follows from the lemma and theorem below [109]: Lemma 3.2.2 Let Xbe a geometric simplicial complex spanned by the points x0, ..., xk⊆Rn. Then there is an associated abstract simplicial complex specified by the collection of subsets of vertices of Xwhich span a simplex in X. Theorem 3.2.3 For every abstract simplicial complex S, there exists a geometric simplicial complex ¯ Ssuch that Sis associated to ¯ S. 62 Chapter 3. Topological Data Analysis as Main Methodology This theorem allow us to define a geometric realization of an abstract simplicial complex though the geometric realization of the corresponding geometric simplicial complex. This abstraction is needed to extract abstract simplicial complexes from a high-dimensional data cloud, exploring the variables interaction more than their geometric realization. The theorem above derives then in the following lemma [109]: Lemma 3.2.4 The geometric realization of the associated simplicial complex specifies a functor |−| from the category of abstract simplicial complexes and simplicial maps to the category of topological spaces and continuous maps. Homology Groups The homology groups are the central invariant used in TDA. Generally speaking, they are a collection of functors from the category of abstract simplicial complexes to the category of vector spaces over a field F,Hn:Simp →V ectFwith n≥0, that encode information about the simplicial complex structure. In other words, homology assigns a family of vector spaces (called homology groups in more general settings) to a simplicial complex. For a given dimension, the vector spaces capture the topological features in that dimension. Before defining technically the homology group of a simplicial complex, we would need to be familiar with the orientation of a simplex, the chain groups and the boundary homomorphism, that provide algebraic encodings of the combinatorial information of a simplicial complex. We describe the case of coefficients in a field F (that will normally be R), that is most relevant for topological data analysis. Definition 3.2.8 An orientation of the vertices of a simplex is an equivalence class of orderings of the vertices under the equivalence relation that two orderings are the same if they differ by an even permutation. We could denote [v0, ..., vk] the oriented k-simplex in Xspecified by the vertices {v0, ..., vk}, where the orientation is specified by the ordering of the vertices. Definition 3.2.9 Let Xbe an abstract simplicial complex and σa simplex. The k-chains Ck(X;F)is the vector space with basis the set of oriented k-simplices. That is, elements of Ck(X;F)are linear combinations of generators {gσ}, where σvaries over the oriented k-simplices of X. 63 Chapter 3. Topological Data Analysis as Main Methodology For example, given an abstract simplicial complex X={[v0],[v1],[v0, v1]}, the space of 0-chains C0(X;F) is a vector space which is isomorphic to F⊕Fhaving elements of the form a0v1+a1v1,a0, a1∈F. Similarly, the space of 1-chains C1(X;F) for Xis a vector space which is isomorphic to Fhaving elements of the form a0g01,a0∈F, where g01 is a generator corresponding to the 1-simplex of X. We therefore could define a linear transformation δk:Ck(X;F)→Ck−1(X;F) as the boundary map. This is an algebraic way to encode the boundary of a simplex. Definition 3.2.10 The linear transformation δk:Ck(X;F)→Ck−1(X;F)is specified on the generators as δk([v0, ..., vk]) 7→ Pk i=0(−1)i[v0, ..., ˆvi, ..., vk] where ˆvimeans that vertex is deleted. The homomorphism is then specified by extending linearly to all Ck(X;F). The geometric interpretation of δkapplied to a simplex is the alternating sum over the faces that make up the boundary of the simplex. For example, the boundary of the 1-simplex [v0, v1] is v1−v0. The boundary of the 2-simplex [v0, v1, v2] is then [v1, v2]−[v0, v2] + [v0, v1]. The boundary map has the special property that applying it twice is 0, i.e., the composite δk◦δk+1 = 0 (the boundary of a boundary is 0). Therefore, we have that im(δk+1)⊆ker(δk), where ker(δk) is the kernel of δk(i.e. the set of elements or “cycles” twith δk(t) = 0), and im(δk+1) is the image of δk+1. With this definition, the homology group’s idea is to take the subgroup of Ck(X) of cycles, i.e ker(δk), and impose the equivalence relation that two chains c1and c2 are homologous if their difference c1−c2is a boundary, i.e., if c1−c2is an element of im(δk+1). Definition 3.2.11 Let Xbe a simplicial complex and ka natural number. The kth homology group with F-coefficients Hk(X;F)is defined to be the quotient group ker(δk)/im(δk+1), where δkis a linear transformation (or boundary map) among k-chains. We could think on the homology groups as a set of cycles in Ck(X;F) that are not the boundaries of elements of Ck+1(X;F). We could, therefore, say that: 1. H0is a measure of the path components of X. 64 Chapter 3. Topological Data Analysis as Main Methodology 2. H1is a measure of the one dimensional holes in X (i.e. loops). 3. Generally, Hkis a measure of k-dimensional geometric features of X, specifically, a count of the number of k-dimensional holes in X. The dimensions of the vector spaces or homology groups are called Betti numbers, where βkdenotes the Betti number for dimension k. For example, the abstract simplicial complex X={[v0],[v1],[v0, v1]}that we have presented previously has a boundary map δ1:C1(X;F)→C0(X;F). Therefore, taking into account the isomorphisms presented, H0(X) = F, since ker(δ0) is all of C0(X, F) and the image of δ1is F. The H1(X;F) = 0, as the ker(δ1) = 0. Consequently, all Hi(X, F) = 0, for any i > 1. Geometrically, we could interpret that X represents a topological space that has only one path component without holes. Of particular interest for topological data analysis is the fact that simplicial homology is algorithmically tractable as δkand can be expressed as a matrix where each column specifies the image in Ck−1(S;F) of a generator of Ck(S;F), where Sis an abstract simplicial complex. Simplicial Complexes Associated to Data How can we construct a simplicial complex from a data cloud X? In order to exploit the tools of algebraic topology to study finite metric spaces, we develop an idea for assigning a topological space to (X, dX). Imagine that the sampled data Xis generated by drawing from some probability distribution on a set embedded in Rn. We need to fill in the gaps between the samples with, for example, the union of the balls around the points. The following definitions present some of those ideas: Definition 3.2.12 (Union of balls) Let X⊂Rna finite subspace and fix ≥0. The union of balls is the union ∪ x∈XB(x)⊂Rn. Definition 3.2.13 (ˇ Cech complex) Let X⊂Rnbe a finite subspace and fix  > 0. The ˇ Cech complex C(X, dX)is the abstract simplicial complex with 1. vertices the points of X, and 2. a k-simplex [v0, ..., vk]when a set of points {v0, ..., vk} ⊂ Xsatisfies ∩ iB(vi)6=∅ 65 Chapter 3. Topological Data Analysis as Main Methodology Definition 3.2.14 The nerve N(Ui)of a cover {Ui}of Xis the simplicial complex with: 1. vertices corresponding to the sets {Ui}, and 2. a k-simplex [j0, ..., jk]when the intersection Uj0∩... ∩Ujk6=∅ Proposition 1 Let X⊂Rnbe a finite subspace and fix  > 0. There exists a homeomorphism ∪x∈XB(x)∼ =|C(X, dX)| between the union of balls and the geometric realization of the ˇ Cech complex. Theorem 3.2.5 Let Xbe a topological space. Let {Ui}be an open cover of X such that all non-empty finite intersections Uj1∩....∩Ujkare contractible (homotopy equivalent to a point). Then the geometric realization |N(Ui)|is homotopy equivalent to X. Now, knowing that a graph defined over a finite metric space is a 1-dimensional simplicial complex, we use a mid elaboration of this construction to define a simplicial complex associated to an arbitrary finite metric space (X, dX). Definition 3.2.15 (Vietoris-Rips complex) Let (X, dX)be a finite metric space and fix  > 0. The Vietoris-Rips complex V R(X, dX)is the abstract simplicial complex with 1. vertices the points of X, and 2. a k-simplex [v0, ..., vk]when d(vi, vj)≤2for all 0≤i,j≤k. With other words, the Vietoris-Rips complex is the maximal simplicial complex determined by the vertices and 1-simplices specified by a graph G. For a point cloud in Rn, the Vietoris-Rips complex and the ˇ Cech complex can be different as the Vietoris-Rips complex is completely defined by its 1-skeleton, completing all the potential k-simplex present as observed in the prior figure. However, there is a strong relationship among both: Lemma 3.2.6 Let X⊂Rnbe a finite subspace and fix  > 0. There are natural simplicial inclusions C(X, dX)⊆V R(X, dX)⊆C2(X, dX) The Vietoris-Rips complex will be, among others, a way of recovering information about the underlying topological features of a simplicial complex homology study, that will be studied with a TDA method called persistent homology. 66 Chapter 3. Topological Data Analysis as Main Methodology Figure 3.4: Example of a ˇ Cech complex and a Vietoris-Rips complex for the sample data cloud. 3.2.2 Morse Theory Morse theory’s ideas are the basis of another of the TDA methods studied, called Mapper. As we don’t need the full Morse theory to understand the Mapper design, we will introduce here the basic principles of the theory that lead to constructions inspired on its approach, as the Reeb graph, very used in computational topology. The Morse theory was written by Marston Morse in 1934 when he published the first article with the main ideas of this theory [110]. Some years after that, in 1963, Milnor extends the Morse article finishing with the theory that can be called Morse theory [111]. Morse introduced techniques in the study of a variety topology through the analysis of differentiable functions defined over the variety. This was a revolution at that time, allowing that the nature of the critical points of differentiable functions over the variety was reflecting the topological complexity of the underlying space. During the 60’s decade, there were lots of advances in the study of algebraic topology, incorporating computational methods and introducing novel techniques to the study of old problems. We will describe the basis of the classic Morse theory in order to understand its application in topological data analysis and our work. Manifolds Generally speaking, manifolds are a kind of topological spaces more manageable than other structures that provide with geometric intuition for many methods in computational topology. The formal definition should be accompanied of the definition of the coordinates and charts. Definition 3.2.16 Let Mbe a topological space. Given an open set U⊆M, we say that a chart is an homeomorphism θ:U→V, where Vis an open subset of Rn. The inverse θ−1equips Uwith a coordinate system. 67 Chapter 3. Topological Data Analysis as Main Methodology A chart is normally noted as (U, θ). An atlas of Mis then a collection of charts {(Ui, θi), i ∈I}which covers M, i.e. ∪i∈IUi=M. Definition 3.2.17 An n-dimensional topological manifold Mis a second-countable (i.e. has a countable base) Hausdorff topological space with an atlas where the charts are all subsets of Rn. Intuitively, an n-manifold M is a topological Hausdorff space such that around every point there is a neighborhood that is topologically equivalent to the open unit ball Bnin Rn(defining an homeomorphism θi:Ui→Bn, for every open cover {Ui}i∈Iof M). For two charts (Uα, θα) and (Uβ, θβ) of a manifold Msuch that Uα∩Uβ6=∅, the composites θαθ−1 β:θβ(Uα∩Uβ)→θα(Uα∩Uβ) are referred as transition functions or transition maps for comparing two charts of an atlas and explain the changes of coordinates. For example, two overlapping intervals of Rwould be two overlapping charts. Each chart has a coordinate system and transition functions connect these coordinates on the overlaps. For example, the torus can be also considered a manifold with charts being overlapping squares. Morse Theory Details Morse theory comes from the aim of describing the geometric structure of the manifold. It starts by considering a compact manifold Mand a differentiable function f:M→R. The idea is to study the topological information about Mencoded in the inverse images h−1(k), ∀k∈R. The planes where the inverse images change are called the critical points of the function and is precisely what Morse theory characterizes: a space can be determined by the (finite) critical points of suitable continuous functions from M→Rwith null value for those critical points. From the critical points we will define the level complexes, and both give us information about the homotopy type of M. Definition 3.2.18 Let f:M→Ra differentiable function. A point p∈Mis called a critical point of fif the differentiable application of fin pis null. In this case, the real value f(p)is called the critical value of f. Definition 3.2.19 Let p∈Ma critical point of f. Fixed (x1, ..., xn)a local coordinates system in an environment of psmall enough, it is said that the critical point 68 Chapter 3. Topological Data Analysis as Main Methodology pis non-degenerate if the Hessian matrix Hf,p =∂2f ∂xi∂xj(p) is non-singular. The non-degenerative condition is independent of the coordinates system used, as the non-singularity property is equivalent to the non-null determinant. Definition 3.2.20 A differentiable function f:M→Ris called a Morse function if all its critical points are non-degenerate. The meaning of a non-degenerate critical point pis basically the possession of multiple directions in pover f. As an example, the height function f:T→Rover the vertical 2-torus Tis a Morse function with four critical points {p1, p2, p3, p4}. Figure 3.5: Critical points of the torus. We could define now the level sets, that are the basic objects introduced by the Morse theory, and are related to the CW-complex definition [112]: Definition 3.2.21 A CW-complex is a topological space Xinductively constructed as follows: 1. The 0-skeleton X(0) is a finite set of 0-cells (or points). 2. Given the (n−1)-skeleton X(n−1), we construct the n-skeleton X(n)joining the n-cells to X(n−1) through its boundaries. We obtain, therefore, the quotient space of X(n)with the associated quotient topology. 69 Chapter 3. Topological Data Analysis as Main Methodology 3. Repeating the process a finite number of times, we have X=X(n)for any n < ∞. A subcomplex of a CW complex Xis a subspace A⊂Xwhich is a union of cells of X, such that the closure of each cell in Ais contained in A. Definition 3.2.22 Let f:M→Rbe a differentiable function over a variety M. For each a∈R, the level set Mais defined as the closed subset of Mgiven by Ma:= f−1(−∞, a] = {p∈M|f(p)≤a}. If we analyze the 2-torus, we can clear differentiate the level sets contained on it (first example given in [111]). For each a∈R, we have: 1. if a < f(p4) the level set Mais empty. 2. For every f(p4)< a < f(p3), Mais homeomorphic to a disc (2-cell), which is homotopically equivalent to a point, i.e., a 0-cell. 3. For every f(p3)<a<f(p2), the level set Mais homeomorphic to a cylinder, which is homotopically equivalent to a disc with a 1-cell attached. 4. For every f(p2)< a < f(p1) , Mais the result of extracting a disc to a torus, which is homotopically equivalent to a cylinder with a 1-cell attached. 5. Finally, for every a > f(p1), Mais the complete torus, homotopically equivalent to stuck to the previous level complex a 2-cell. Figure 3.6: Steps 2-3 and 3-4 specified above. Therefore, we can construct the torus with the level sets derived from its critical points. We conclude, generally, that the critical points of a Morse function allow us to characterize the homotopy type of a variety, characterizing the variety with the structure of a cell complex. Please note that a Morse function defined on a 70 Chapter 3. Topological Data Analysis as Main Methodology Definition 3.3.3 Let (X1, dX1)and (X2, dX2)be compact metric spaces. The Gromov-Hausdorff distance between X1and X2is defined to be dGH((X1, dX1),(X2, dX2)) = inf θ1:X1→Z, θ2:X2→Z dH(X1, X2) where θ1and θ2are isometric embeddings of (X1, dX1)and (X2, dX2)in (Z, dZ) respectively. We say that two metric spaces are isometric if there exists an isomorphism f: X→Ythat preserves all distances. This leads to the following theorem [120]: Theorem 3.3.2 The Gromov-Hausdorff distance is a metric on the set of isometry classes of compact metric spaces. In practice, the Gromov-Hausdorff distance measures the maximum distortion in the best matching between two metric spaces. This distance is a suitable means for capturing perturbations of data sets. Output metrics We can compare different barcodes with several barcodes distances as the bottleneck distance, that measures the distance between two persistence diagrams Pand Qby the maximum distance between two points in a matching from Pto Q; or the Wasserstein distance, that considers the total distance between the matched pair of points. Of course, the optimal measures of those distances need to be assessed within each particular study comparing with, for example, permutation or random tests. Figure 3.9: Example of matching points to calculate the distance between two persistence diagrams. Before presenting the formal definitions of those distances, we define generally a distance between two intervals [a1, b1) and [a2, b2) as: 77 Chapter 3. Topological Data Analysis as Main Methodology d∞([a1, b1),[a2, b2)) = max(|a1−a2|,|b1−b2|) This leads to have d∞([a, b),∅) = |b−a| 2. Now, we have the barcodes B1and B2that are sets of intervals. We assume that |B1|<|B2|and define a bijection φ:A1→A2, where A1is a multi-subset of B1and A2is a multi-subset of B2. We also add ∅to B1and B2, and consider the elements of B1/A1and B2/A2as matched with ∅. Then, we can define: Definition 3.3.4 Let B1and B2be barcodes. The bottleneck distance is defined to be dB(B1, B2) = inf φ sup Z∈B1 d∞(Z, φ(Z)) where φvaries over all matching between B1and B2and the supremum is taken over bars in B1. This means, the bottleneck distance measures the worst discrepancy in the best matching between the two barcodes. Please note that this distance could also be defined in terms of persistence diagrams. Definition 3.3.5 Let B1and B2be barcodes. For p > 0, the p-Wasserstein distance is defined to be dWp(B1, B2) = inf φX Z∈B1 d∞(Z, φ(Z))p!1/p Normally, we will take p= 1, so dW1. Link Between Input/Output Metrics We can now establish the link between the bottleneck distance and the Gromov- Hausdorff distance with the following theorem [120]: Theorem 3.3.3 (Stability theorem) Let (X, dX)and (Y, dY)be finite metric spaces. Then for all k≥0, dB(PHk(V R(X, dX)), PHk(V R(Y, dY))) ≤dGH((X, dX),(Y, dY)) where PHkdenotes the persistent diagrams resulting from applying persistent homology up to the homology dimension kto the Vietoris-Rips complex. 78 Chapter 3. Topological Data Analysis as Main Methodology Please note that we could obtain similar results using the ˇ Cech complex or the Wasserstein metric. There are several extensions of the persistent homology theory, as the zigzag persistence (that takes into account filtrations in different directions) or the multidimensional persistence (that filters by more than one function). However, we will not present them here as they are not of interest for our work. 3.3.2 Persistent Homology with Networks Of particular interest for us is the application of PH to complex network analysis, particularly to correlation networks that will be derived from our DNA methylation data cloud. During the last years, PH was largely applied for the study of complex networks as a multiscale feature extractor. The main applications of PH to networks are with brain and protein-protein interaction (PPI) networks [121], or to study the three-dimensional genome structure identifying loops [122]. But PH is also applied to non-biological data as social structures or the financial context. Interestingly, [123] proposes the use of PH for the selection of molecular therapies analyzing the relationship between PPI networks and cancer survival. They in fact suggested a promising future application of those methodologies: “[...] We hope that the use of advanced mathematics in medicine will provide timely information about the best drug combination for patients, and avoid the expense associated with an unsuccessful clinical trial, where drug(s) did not show a survival benefit [...]”. PH is normally applied to a defined simplicial complex or network but can also be applied to study the differences among networks extracting their topological features to compare them. Many studies have used the bottleneck or Wasserstein distances to measure the differences among barcodes obtained for different networks. In addition, different statistical classifications techniques (community detection, k-means clustering, etc.) are normally applied to the PH results in order to differentiate them among sample groups [124,125]. Different filtration functions were applied to weighted and undirected networks, basically creating subgraphs obtained via a sequence of edge weights [119]. Other solutions were developed for unweighted networks, as assigning edge weights based on some network property, such as edge-betweenness centrality, or the use of discrete Morse theory to obtain the filtration [126]. In our case, we use the Vietoris-Rips filtration for the weighted networks we create. Before defining it, we need to formally introduce the definition of a clique complex: 79 Chapter 3. Topological Data Analysis as Main Methodology Definition 3.3.6 Let G= (V, E)be an undirected graph. The clique complex Cl(G) is the simplicial complex with all complete subgraphs of Gas its faces. The 1-skeleton of Cl(G) is Gitself. Definition 3.3.7 (Vietoris-Rips (VR) filtration) Let G= (V, E)be an undirected weighted graph with the weight function W:V×V→Rdefined on E. For any ∈R, the 1-skeleton G= (V, E)⊆Gis defined as the subgraph of Gwhere V=Vand its edge set E⊆Eonly includes the edges whose weight is less than or equal than . Then, for any ∈R, we define the Vietoris-Rips complex as the clique complex of the 1-skeleton G,Cl(G), and the Vietoris-Rips filtration is then defined as {Cl(G)→Cl(G0)}0≤≤0. With this filtration, we apply PH for two main objectives: 1. To study, in the first place, the topology of the correlation structure of specific groups of CpG sites (as CpG islands). We create graphs or simplicial complexes where each node is a CpG site and they are joined by their absolute Pearson correlation: the graph G= (V, E) is formed by V={CG1, ..., CGn}, where n is the number of selected CpG sites; and eCGi,CGj= 1 −|ρ(CGi, CGj)|,∀i, j ∈1, ..., n (3.1) To generate a system of filtered graphs from a starting correlation graph G= (V, E), we need to subsequently modify the correlation matrix Cassociated to Gthat defines the weights of the set of edges E. We define then the altered matrix ¯ C= 1−|C|, and a set of thresholds δ={0,0.1, ..., 1}to be used for the filtration. For each threshold δ, we generate a graph Gδ= (V, Eδ)⊆Gwith a set of nodes Vand a set of edges Eδ⊆E, that derives from the weighted adjacency matrix ¯ C, such tat: if ¯ Cij > δ then ¯ Cij = 0 (3.2) Please note that, as we are using the inverse of the correlation, the first filtered graphs correspond to the higher correlation coefficients. We will apply persistent homology with the VR-filtration to the described graphs. The same analysis will be done for separated groups of age that are afterwards compared (see figure 3.10 below as an analysis reference). This analysis will be presented in Part II of the present document. 80 Chapter 3. Topological Data Analysis as Main Methodology 2. To interpret, in a second step, the topological features of the simplicial complexes obtained with MultiNet (that will be described in the part III). In this case, each node is a cluster of CpG sites, so the graph G= (V, E) is formed by V={V1, ..., Vn}={{CG1,1, ..., CG1,n1}, ..., {CGn,1, ..., CGn,nl}}, where nis the number of MultiNet nodes and niis the number of CpG sites within each node; and eVi,Vj= 1 −mean(|C|),∀i, j ∈1, ..., n, where Cis the correlation matrix of the CpGs contained on Viand Vj. This analysis will be presented in Part III. Figure 3.10: Illustration of the study of the epigenetic changes with the aging process using persistent homology. Of course, the efficiency of the PH algorithm depends on the number of initial simplices and the homology dimension used. Usually, the study of the homology up to dimension H2is enough to track interesting topological features in a data analysis study because it allows to already detect structural information. 3.3.3 Persistent Homology with Methylation Data Persistent homology applied to the weighted correlation network extracts the main topological elements that define their structure. Due to the computational limitation of PH, we restrict this study to the analysis of known CpG islands. Despite the main results will be presented in the next part II, we will also describe 81 Chapter 3. Topological Data Analysis as Main Methodology here an illustrative example of how the VR-filtration and PH work over the correlation network. For this purpose, we use a 450K methylation dataset (GSE40279) from a healthy adult population (656 subjects, 19-101 years, whole blood) and select the CpG sites associated with the CpG island chr7:94284858-94286527, the biggest island of chromosome 7. We then generate a network of CpG sites (nodes) joined by the modification of the Pearson correlation coefficient described in equation (3.1). The correlation plot below (figure 3.11 at left) represents the correlation matrix with colors indicating higher (dark blue or dark red) or lower correlation coefficients. The higher correlated clusters circled correspond to the edge-connected subgraphs or modules of the network at right. Some of the CpG sites are also highly positively correlated with age (with coefficients over 0.6). Figure 3.11: Correlation matrix and related weighted filtered graph at a threshold δ= 0.2. The bigger green circle describes a stronger network of interactions among the CpG sites included. Respectively, the related subgraph has more nodes and edges. The topological features formed by this green module would be then describing the correlation structures formed due to a higher correlation concentration, which may unravel interesting biological conclusions. Consequently, the application of PH to the weighted network points out different topological features in homology dimensions 0, 1, and 2 observed in the persistent diagram of figure 3.12. 82 Chapter 3. Topological Data Analysis as Main Methodology Figure 3.12: Persistence diagram and related filtered correlation graphs at filtration thresholds 0.4 and 0.7. In the first steps of the filtration, that correspond to high levels of correlation, we observe basically topological elements of dimension 0 because of the strict correlation filter. Those elements are derived from the non-joined points or the joining of 2 or 3 CpGs that form a 1-simplex or a 2-simplex. The first topological features of dimension 1 (holes) appear from 0.4, having a higher incidence with higher weights (lower correlation coefficients) due to the increase of the edge-density. The same applies to dimension 2. We see how the subgraphs that started with a weight of 0.4 continue to grow in edge-density with increasing VR-weights, presenting a clearer module-separation. We pay special attention to the features appearing from dimension 1 with lower weights because they are showing a structured high correlation among the corresponding CpG sites. In the part II of the present work, we will study deeply the local behavior of the correlation in CpG islands and its differentiation among age groups. The sample characteristics the modulated design of the associated correlation networks will be key to understand the birth, death and lifespan of the related topological features. 83 Chapter 3. Topological Data Analysis as Main Methodology 3.3.4 Challenges of Persistent Homology Persistent homology is a successful technique to detect and visualize the underlying data topological features that may describe better the data structure than routine techniques. However, this methodology has also several constraints. The networks used on the main PH applications until now are mostly small networks with less than 1,000 vertices due to the increase of the computational time if we have more nodes. Besides, even if the computational time is still reasonable or feasible, the results of PH may be uninterpreted if we apply it to huge networks, where the birth or death of topological features is not comparable anymore with the network visualization. As the homology dimensions calculated with reduced computational times are basically H0and H1, we may be loosing higher-dimensional topological features that could bias the conclusions of the analysis. In addition, despite there are some basic stability parameters, PH results may not be robust when dealing with noisy sampling data, and slight alterations on the underlying distribution may derive in very different barcodes. The implementation of programming functions related to PH needs to be refined, having only a couple of packages in R (TDA,TDAstats). Despite they work fine, there are only a few functions inside to operate. One may find a slightly higher level of sophistication with Matlab or Phyton. For us, the extrapolation of the analysis just presented to the entire 450k array would not be an easy task due to the high computational time and the complexity to interpret the results. For that reason, we decided to complete our local correlation analysis with a global one inspired in another TDA technique called Mapper. 84 Chapter 3. Topological Data Analysis as Main Methodology 3.4 Mapper An alternative topological data analysis technique arises with power, with the aim of analyzing complex data structures with a clustering procedure. It is called Mapper, and it is mainly based on Morse theory concepts. First implemented in 2007 [127], Mapper is a computational algorithm that extracts descriptors of high-dimensional data sets represented as simplicial complexes, which retain topological and geometric information. Mapper does not act directly over the data, but instead, it selects a filter or combination of filters that act as a data mapping to a metric space. Then, cluster analysis is applied to the point cloud with overlapped intervals defined by the filter functions to construct the network joining the clusters (or nodes) with common points. Mapper is an alternative to the common hypothesized models of data description, as it does not assume any data properties. It combines then topological basis and machine learning tools into an integrated data analysis methodology. The dimension of Mapper is determined by the number of filter functions used to map the information contained in the data cloud. Starting from a point cloud Xon a finite metric space (X, dX), the idea of Mapper is to study the topology of the sub-level sets of a function f:X→Rn, for any n > 0, defined on the point cloud. The generic version of the one-dimensional Mapper algorithm on Xcomputed with the filter function fcan be then summarized as: 1. Cover the range of values Y=f(X) with a set of consecutive intervals {Is}(1≤s≤S)with a defined percentage of overlap. 2. Apply a clustering algorithm to each inverse image f−1(Is), s∈ {1, . . . , S}. This defines a pullback cover C={C(1,1), . . . , C(1,k1), . . . , C(S,1), . . . , C(S,kS)}, normally overlapped, of the point cloud X, where C(s,k)denotes the kth cluster of f−1(Is). 3. The Mapper is then the nerve (as defined in 3.2.14) of C. Each vertex v(s,k) of the Mapper corresponds to one element C(s,k), and two vertices v(s,k)and v(s0,k0)are connected if and only if C(s,k)∩C(s0,k0)6=∅, i.e. they have common points. Optionally, we could assign a color to each vertex in the graph based on a function of interest to see the distribution of that function over the graph. It is obvious that the process described above and its results are mostly dependent on the filter function fselected and the metric d. Depending on what we would 85 Chapter 3. Topological Data Analysis as Main Methodology like to see, we would define our filter function(s). Moreover, the filter functions can be specifically selected by the user or defined from the data (using coordinates from PCA analysis, for instance). Apart from the filter function, the number of clusters that you can specify as part of the cluster analysis might depend on the data or might be a fixed number. Similarly, the overlapping percentage or the cluster analysis method (despite Mapper uses normally hierarchical clustering) are other of the parameters that can be adjusted or automatically selected. The fact that the user has to select those parameters may seem a disadvantage at a first step but, if it is correctly managed, it is really providing with a big flexibility to apply Mapper to different types of datasets, samples, and aims. However, wrong parameter selection may lead to unexpected results. There are different ways to deal with the Mapper parameter selection and sensitivity, some more technical [128] and others more experimental. A common check when applying Mapper is to use a different choice for the set of parameters in order to observe the changes of the network obtained and how the clusters are organized. Figure 3.13: Example of 1D Mapper functioning over a point cloud X. Mapper is really useful to visualize the structure of the data, which may lead to find clinically relevant results or statistically differentiated features. From the shape of the network obtained with Mapper, we can already extract substantial information, but also from the subnetworks contained on it. A post-processing step (defined by the user) is normally done to understand the underlying data characteristics. 86 Part II A Model for the Local Correlation Chapter 4 Description of the Local Correlation Structure How is the correlation structure of the DNA methylation? What are their local characteristics within a CpG island? How does it change over the years? The DNA methylation correlation structure will be firstly analyzed from a local perspective to do it afterwards more globally. In this chapter, we will describe the study of the correlation behavior within CpG islands with graph theory and persistent homology, representing the correlation matrices as weighted graphs. We will analyze its nonrandom spatial structure and the effect of short-range and long-range correlations. All this study will lead to the development of a graph model described in the next chapter. 4.1 Correlation of a CpG Island As explained in the first chapter, a lot of the current methylation analysis methods are based on the detection of regional patterns assuming that there is a higher correlation for short-range genomic regions. Additionally, we presented in the chapter 2the presence of long-range inter-chromosomal significant correlation that could be related to the loops found in the chromatin structure, as described in the section 1.3. We have also presented that the chromatin structure is altered with the aging process. Despite the unknowns, this modification seems to reduce the long-range interactions due to a less-condensed chromatin design, and this could have an impact on the methylation correlation structure over the years. Having those points into account, our hypothesis is that the methylation marks present indeed a structural spatial design and are less coordinated for older ages. Therefore the correlation would decrease with age, especially for the global or long- Chapter 4. Description of the Local Correlation Structure range structure. We then aim to describe precisely this correlation design through the study of the related weighted correlation graph, proposing a graph model that accounts for the hypothesis generated based on the study of the CpG islands. Please note then that, in this case, the short-range and medium/long-range positions are all within an island. In addition, the extension of this analysis to other genomic regions will be also presented. For this analysis, we will not take into account sites related to SNPs and sex chromosomes, as they were linked to a higher methylation variability. We start with the observation of correlation matrices of a CpG island (ordered by genomic position) for distinct age groups of around 20 individuals, from newborns to nonagenarians: newborns (GSE30870, cord blood leukocytes), children between 1-16 years (GSE36064, peripheral blood mononuclear), middle-age subjects (GSE33233, whole blood, 39-72 years), nonagenarian people (GSE30870, peripheral blood leukocytes), and 20-40, 70-90 samples using GSE40279 of whole blood. The data used is not longitudinal, but different subjects are measured at different ages. In addition, the data sources are different despite all come from blood samples. The first studied island is the biggest on chromosome 7 and it is in the promoter region of genes PEG10 [136] and SGCE. Figure 4.1: Correlation matrices of the CpG island chr7:94284858-94286527 ordered by genomic position and ascending age groups. Only absolute coefficients greater or equal than 0.5 are presented. 96 Chapter 4. Description of the Local Correlation Structure Observing the correlation matrices, presented in figure 4.1, we could already detect a structured spatial behavior similar to the expected, with heavier correlation clusters near to the diagonal (related to short-range positions). Despite we use different datasets, we detect the existence of a structure based on correlation clusters that seems to be altered over the years. Especially interesting is the case of the nonagenarian group, where the distribution of the correlation is more similar to the children group than to the prior age group between 70 and 90 years old. Please note that, in line with literature, the oldest groups have a higher intersubjects variability, while the younger groups present higher intra-subject variability. This structural design is repeated for different CpG islands, and it is more clearly seen for those with a higher dimension. Clusters around the diagonal and in long-range positions are present. Generally, the correlation seems to be higher for the children group: selecting the biggest 110 CpG islands (with at least 50 CpGs), we obtain a greater average absolute correlation for children compared to the rest of the groups. If we limit the study to long-range correlation, the children’s group is also the winner. The detection of structural information with the simple observation of the correlation matrix is normally not feasible (for bigger dimensions) or potentially not accurate. We propose then to analyze the matrices by the properties of their associated weighted correlation graphs. We will analyze the characteristics of the graph with classical graph theory, and its topology using persistent homology, to take into account all the information layers. Hence, the observed correlation matrices can also be represented as weighted graphs (see figure 4.2) where each node is a CpG site of the island and they are connected as per their Pearson correlation coefficient in absolute value (in order to take into account negative coefficients). As we observe at a first step, networks are mainly separated into modules, that correspond to the correlation matrix diagonal clusters, which makes that some CpGs have a higher degree (number of edges of a node). Our analysis will be based on describing and modeling this community design, and other graph properties as the edge-density (ratio of the number of edges with respect to the maximum possible edges) or the degree distribution. Moreover, we will link those properties with the homology study of the networks. This approach will allow us to establish an analytical measure of matrices distinction in a “spatiotemporal” way, translating the topological features into parameters of statistical differentiation. Please note then that the correlation graphs presented here have a special property: there exists a (genomic) distance between the nodes that has an effect on 97 Chapter 4. Description of the Local Correlation Structure Figure 4.2: Correlation networks of the CpG island chr7:94284858-94286527 by age group with coefficients greater or equal than 0.5. In the title we present the age group, the coefficients filtration threshold, and number of edges of each network. the own graph characteristics (as modularity). The genomic distance determines a different correlation structure for sites located in near positions and sites located in non-near positions. Indeed, if we separate the sites in short and long distances (below and above the median of the position distance matrix), we observe differences in the topology of the graphs of figure 4.3, that are created for some of the age groups. Additionally, those differences indicate that a strong local or short-range correlation structure may not be accompanied by a similar long-range one (as it happens with the middle-age group). There are different published models that take into account the modularity design of the networks (as the Stochastic Block Models [137]), but we have not found any that accounts for the distance between the nodes as a feature that influences the topology of the network. Here, we have two different network descriptors: the weighted adjacency matrix that collects the network connections based on nodes correlation, and the distance matrix that collects the genomic distance among the nodes. This spatial design is the key of our study and allows us to generate novel models of random graphs. 98 Chapter 4. Description of the Local Correlation Structure Figure 4.3: Some of the related correlation networks separated for short and longrange correlations. Despite we have a biological motivation for this work, we also aim to present general graph models that suit with other types of spatial data and that could successfully describe their structure. Social networks with a distance component among the individuals may be an example to study population dynamics within and between community structures as families, towns, cities or countries. 4.1.1 Modularity and Clustering Coefficient Network modularity is an important measure of the structure of graphs that is vital in our work, as the modularity level and the module’s singularities of our studied networks will allow us to characterize the graphs and to establish a relationship with results from persistent homology. As described by Newman in [138], “[...]the modularity is a measure of the extent to which like is connected to like in a network[...]”. Modularity measures the level of division of a network into modules (groups, clusters, or communities) through the difference between the actual and the expected number of edges at a random process. Therefore, networks with high modularity have dense connections between the nodes within modules but sparse connections between nodes in different modules. It is technically defined as: Definition 4.1.1 Let G= (V, E)be a network of nnodes and medges with adja- 99 Chapter 4. Description of the Local Correlation Structure cency matrix Aand suppose we have divided the nodes into Cclusters. Then Q=1 2mX i,j aij −kikj 2mδ(Ci, Cj), where kiis the degree of node iand δ(Ci, Cj)is the Kronecker delta of the community Ci,Cjof vertices iand j. So the higher Q, always lower than 1, the stronger the community structure of the network. Qtakes negative values if there are less edges between vertices of the same type than we would expect by chance. Sometimes, negative values of Qare all considered as zero for implementation purposes. We will obtain networks’ modularity using the R function cluster fast greedy, which works fast for huge networks and detects modules optimizing the modularity score [139]. Biological or social networks, for example, present a high degree of modularity that has substantial importance for the dynamics of the network. Understanding and modeling the community design is crucial to determine any future network behavior. For instance, a closely connected social community will imply a faster rate of transmission of information or a higher rate of disease transmission than a loosely connected community. Another important network property is transitivity. A transitive relation in a network refers to three vertices connected transitively: if vertex u is connected to vertex v, and v is connected to w, then u is also connected to w. So networks showing this property are themselves said to be transitive. Perfect transitivity only occurs in networks where each component is a fully connected subgraph or clique, i.e., a subgraph in which all vertices are connected to all others. We can quantify the level of transitivity in a network with the clustering coefficient, that was defined in several ways by different authors. Newman [138] proposed a global way to measure the clustering coefficient, defined as the fraction of paths of length two (edges between two nodes) that are closed (i.e. the triangles formed by three nodes and three edges). That is, we count all paths of length two, and we count how many of them are closed, and we divide the second number by the first to get a clustering coefficient C that lies in the range from zero to one: C=3t |P2|=3|C3| |P2| where t=|C3|is the total number of triangles, and |P2|is the number of paths of length two in the network. The 3 in the numerator comes from the fact that a triangle consists of three closed triplets (i.e. three nodes connected by three edges). A higher C implies a better transitivity. 100 Chapter 4. Description of the Local Correlation Structure A different proposal was done by Watts and Strogatz in 1998 [140], whose work establishes a global coefficient from the average of the local ones. The local clustering coefficient of node i is defined by: Ci=number of connected triangles including node i total number of possible edges of node i If tidesignates the number of triangles attached to node iof degree ki, then Ci=ti ki(ki−1)/2=2ti ki(ki−1) Please note that 0 ≤Ci≤1. Thus, the global average clustering coefficient of the entire network is: ¯ C=1 nX i Ci Generally, the Watts-Strogatz index quantifies how clustered a network is locally, while the Newman index indicates how clustered the network is as a whole. Indeed, they are normally correlated. In the next sections we will use the presented concepts to describe the characteristics of our correlation graphs. 101 Chapter 4. Description of the Local Correlation Structure 4.2 Characteristics of the Correlation Network Taking into account the design of the correlation matrices observed in the previous section, a main objective would be to analyze the evolution of the heavily short/long-range correlated clusters. In terms of networks, those clusters form network modules with special graph properties. Therefore, if the clusters are maintained during different age periods, then the topology of the related networks should be very similar. If we study those changes from a non-topological perspective, however, we may obtain high differences that do not account for clusters topology and are not informative of the correlation evolution (measuring, for example, the distance between the matrices). For this reason, it is especially important to observe the topology of the correlation networks, more than measure their analytical difference. Before proceeding with the analysis of the correlation evolution over the years, we will focus on analyzing the structural behavior of the CpG island correlation, studying the associated graph properties and homology results. The modulated design that we mentioned in the first section of this chapter is clearly observed when generating filtered graphs, as the ones in figure 4.4 related to the same island chr7:94284858-94286527. Please note that we removed the CpG site cg10312334 located in this island as it was considered an “outlier” following its genomic coordinates. Figure 4.4: Filtered correlation graphs of the island chr7:94284858-94286527 associated to the children group. For each graph, we specify the threshold of the filtering and the number of edges. 102 Chapter 4. Description of the Local Correlation Structure as a weighted graph gives us more information than the calculation of the matrix mean, and its use increases in power for high-dimensional matrices where the visualization is difficult. Persistent homology detects not only if the correlation is random/non-random or higher/lower, but also if it follows a short or long-range design. Thus, the study of the distance between the obtained PH barcodes would be a way to analyze the differences in the network’s structure. Advanced mathematical studies could be developed in this sense as post-investigations to the present work. After a comprehensive characterization of the local correlation structure of DNA methylation, we will present in the next chapter a model to describe and predict this structure. 109 Chapter 5 A Model for the Local Correlation Structure We have demonstrated that the observed local correlation structure is not random and has a specific design based on the distance between the nodes. How could this observation be generalized and modeled? We propose in this chapter a novel random network model that is able to reproduce the behavior of the correlation graphs. In addition, we analyze the evolution of the correlation structure over increasing age ranges based on the designed model. 5.1 A Stochastic Block Model with Distance Once we have determined which are the features that have an influence on the correlation structure of a CpG island and so on the correlation graphs studied, we propose a model for its behavior. We could define it in terms of a stochastic block model (SBM) [137,143] design, with the novelty of including the distance between nodes as an additional parameter. This parameter will be key to estimate the blocks and to take into account indirectly the correlation structure (i.e., the weights of the graph). We will call it a stochastic block model with distance (SBM-D), which is constructed as follows. Let G= (V, E) be a graph, where Vis the node set of dimension nand Eis the set of edges. Let Kbe the number of groups of nodes defined taking into account the distance Dbetween the nodes, i.e., nodes are grouped initially based on their genomic distance on a partition of Kconsecutive intervals. Each node belongs to one of those groups defining a belonging matrix Zof dimension n×K, such that each row Zi= 0 except exactly once that takes the value Zi= 1 (it represents the Chapter 5. A Model for the Local Correlation Structure group whose the node belongs). Z=                                    100. . . 0 100. . . 0 . . .. . .. . .. . .. . . 100. . . 0 010. . . 0 010. . . 0 . . .. . .. . .. . .. . . 010. . . 0 . . .. . .. . .. . .. . . . . . . . . . . . . . . . . . . . .. . .. . .. . .. . . 0. . . 001 0. . . 001                                    Group sizes are then derived from Zas the sum of their columns. Please note that the rows of the matrix Zare ordered by their genomic location and the groups of the columns represent the contiguous partitions of their genomic coordinates. In addition, we could define a degree matrix Hof dimension K×Kthat can be derived from Zand the adjacency matrix A:Hij represents the number of edges between the groups iand j. H=     1 2Pi,j∈k1Aij Pi∈k1,j∈k2Aij . . . Pi∈k1,j∈kKAij . . .. . ..... . . Pi∈kK,j∈k1Aij Pi∈kK,j∈k2Aij . . . 1 2Pi,j∈kKAij      where k1, ..., kKrepresent the Knode groups. Please note that the adjacency matrix Ais in principle non-weighted (has only values 1 and 0) and symmetric, and the diagonal of A is zero (which corresponds to a non-weighted undirected non-loop graph design). In order to describe the generation of edges of Gaccording to the groups, a K×K block matrix, denoted by C, is introduced. Each element of the block matrix Cij represents the probability of occurrence of an edge between a node in group kiand 112 Chapter 5. A Model for the Local Correlation Structure a node in group kj. C will be symmetric in our case as we treat with undirected graphs, and the sum of its rows or columns is not necessarily 1. C=     pk1,k1. . . pk1,kK . . ..... . . pkK,k1. . . pkK,kK      We could then describe the adjacency matrix Aij as a Bernoulli distribution with success probability ZiCZT j:Aij ∼Be(ZiCZT j), where Ziis a row of matrix Z. Therefore, the total number of edges between any two blocks kiand kjis a Binomial distributed random variable with mean equal to the product of Cij and the number potential edges ninj/2, where ni, njare the sizes of the groups kiand kj:Hij ∼B(ninj/2, Cij). Then, knowing the composition of the groups determined by the matrix Zand their link probabilities determined by C, we are able to generate an adjacency matrix for our type of graphs. A first example of an easy SBM-D design could be selecting K= 3 blocks or clusters with a similar size, where the probability of connecting two nodes in the same cluster is 0.8, and the probability of connecting two nodes in different clusters is 0.2 (presented in figure 5.1): C=     0.8 0.2 0.2 0.2 0.8 0.2 0.2 0.2 0.8      Figure 5.1: Example of the described adjacency matrix generated with a SBM-D. 113 Chapter 5. A Model for the Local Correlation Structure A different adjacency matrix could be generated specifying in Chigh probabilities out of the diagonal too, as showed in figure 5.2: C=     0.8 0.2 0.8 0.2 0.8 0.2 0.8 0.2 0.8      Figure 5.2: Second example of the described adjacency matrix generated with a SBM-D. The stochastic process is then determined by the assumption that the edge probabilities between a pair of nodes would depend on the nodes membership determined by Z. However, in reality, the matrices Z(so the number of groups K) and Care unknown and we need to infer them. There are many published ways of estimating those parameters. Here, focusing on the correlation structure of CpG islands described in the previous chapter 4, we will use the DNA methylation data itself to do it. 5.1.1 Parameters Inference We will adjust the matrices Zand Cof the SBM-D model taking into account the studied properties of the correlation graphs generated from the correlation matrix of a CpG island described in the chapter 4. Particularly, the clusters that form the matrix Zwill be estimated with a k-means clustering procedure, and the joining probabilities within/between clusters of matrix Cwill be determined with a sampling process. 114 Chapter 5. A Model for the Local Correlation Structure Hub Correlated Nodes In chapter 4, we presented that the modules of the correlation graphs were related to the correlation matrix clusters. Additionally, we saw that those modules/clusters are determined by the distance between the nodes. From these facts, we derive the following rationale to obtain the parameters Zand C. First, the degree distribution of the studied correlation graphs is highly related to the overall correlation of each node. Applying graph filtration up to a threshold of 0.5 (please refer to the filtration process described in 4.1), the Pearson correlation coefficient between the degree of the networks and the node strength (defined as the sum of each adjacency matrix row) is extremely high around 0.9. If we increase the filtration threshold, i.e., introduce lower levels of correlation in the network, then this relationship gets worse due to the noise included (being the Pearson coefficient still greater than 0.8 for a threshold of 0.7, as presented in figure 5.3). Figure 5.3: Correlation between the node degree and node strength up to a threshold of 0.7. The fact that the degree distribution of our networks is greatly related to the node strength, means that it is hugely related to the level of correlation of a node with the rest of the nodes. Consequently, the degree of the nodes is a valid measure to detect highly correlated sites or clusters of sites. We will call hub nodes to the ones with higher strength and so a higher degree. Secondly, the degree distribution is, at the same time, ruled by other variables. Let dbe the degree distribution of our correlation graph. We consider X1,X2, and 115 Chapter 5. A Model for the Local Correlation Structure X3three variables determining the position of the node iin the island, the mean of the methylation levels for node iand the related variance. If we apply a linear regression model to dwith X1,X2, and X3as independent parameters: d=β0+β1X1+β2X2+β3X3+ε we obtain that the position and the mean methylation are significantly (pvalue<0.05) associated with the degree distribution of the correlation networks filtered at low thresholds (i.e., containing highly correlated nodes). Therefore, X1and X2will be selected as degree estimators in the next process. Computation of Z and C We use then the two significant variables X1and X2(position and mean methylation) to infer the SBM-D parameters with the following process: 1. A k-means cluster analysis with the variables X1and X2. The optimal number of clusters is selected following the Elbow method, which aims to stabilize the intra-cluster variation, i.e., the within-cluster sum of squares over a variety of potential clusters: K X k=1 X i∈nk zik(xi−¯xk)2 where nkis the set of observations in the kth cluster, ¯xkis the center for the kth cluster, and zik is an indicator function that takes the value 1 if xiis in the cluster kand takes the value 0 if xiis not in the cluster k. The optimal cluster Kis selected such that the sum of squares is stabilized in a low value. If needed, please refer to the subsection 6.2.1 for a detailed description of the clustering technique. Please note that the k clusters will contain contiguous CpG sites because the genomic position variable X1has a big weight on their distribution. If it would not be the case, then we could consider as different groups those that contain non-contiguous CpG sites. 2. Over each differentiated cluster k, we define adjacency matrices Akwhose values are generated following a Bernoulli distribution with probability pintk (i.e. a Binomial distribution over one experiment): Ak ij ∼B(1, pintk),∀k= 1, . . . , K, i, j = 1, ..., nk We will explain afterwards how we could calculate pintk. 3. The diagonal of the overall adjacency matrix Ais therefore formed from all Ak: A=A1⊕... ⊕AK 116 Chapter 5. A Model for the Local Correlation Structure 4. Two sites belonging to different clusters kl, kmare joined following a Bernoulli distribution with probability pextklkm(i.e. a Binomial distribution over one experiment): Aklkm ij ∼B(1, pextklkm),∀l, m = 1, ..., K, i = 1, ..., nkl, j = 1, ..., nkm We will explain below how we could calculate pextkikj. The probabilities pint and pext are expected to met pint ≥pext, following our distance-based modulated design. Those two values could be fixed, as pint = 0.8 and pext = 0.2 for example, or could be estimated with a sampling process: •For each k cluster, we select randomly a couple of CpGs v1, v2and calculate their correlation coefficient ρ(v1, v2). We repeat the process N times and obtain the cluster probability pintkas: pintk=#(|ρ(v1, v2)|> δint) N The threshold δint could be adjusted as desired, as δint = 0.5, depending on the level of exigency that we set for the correlation. The number of simulations N could also be adapted depending on the adjacency matrix size. The necessary sample size to estimate successfully the population mean would be: N=z2σ2 α2 where zcorresponds to the z-score for a confidence level of 95% (z= 1.96), α= 0.05 is the error margin, and σis the standard deviation of the population (calculated as the mean of the standard deviation of each row of the correlation matrix). For example, for the case of the island on the chromosome 7, we obtain N= 142.9, that we round to N= 200. The used Nallows to be 95% sure that our estimated pint is accurate with a margin error of 5%. •For each couple of clusters ki, kj, we select randomly one CpG per cluster, v∈kiand w∈kj, and calculate their correlation coefficient. We repeat the process N times and obtain the probability pextkikjas: pextkikj=#(|ρ(v, w)|> δext) N,∀i, j = 1, ..., K The threshold δext could be adjusted as desired, as δext = 0.5 or lower. 117 Chapter 5. A Model for the Local Correlation Structure Please note that this sampling process was generally established for the case of dealing with huge correlation matrices, where a sampling process is quicker than a exact calculation. However, for the cases of our CpG islands, we could directly calculate pintkand pextkikjprobabilities over the calculated correlation matrix. With this process, that is fairly quick to compute, we obtain a different internal probability for each cluster, and a different external one for each pair of clusters. So the block matrix would be (for Kclusters): C=     pintk1. . . pextk1kK . . ..... . . pextkKk1. . . pintkK      The resulting adjacency matrix represents a non-weighted network with a degree distribution similar to the original one. If the matrix Zis generated randomly, then the obtained adjacency matrix is not representative of the original one, as it loses the design in groups. The original and simulated adjacency matrices for the island chr7:94284858- 94286527 are really similar reproducing the diagonal highly correlated blocks that we are interested in, as observed in figure 5.4. Indeed, the hub nodes, or nodes with higher degrees (greater than the mean of the degrees), match in both in about an 80%. Generally, selecting the 10 biggest CpG islands, the average percentage of matching is about 70%, as reflected in figure 5.5. Results are reproduced in other datasets, as using GSE40279 with more than 600 individuals. Figure 5.4: Original adjacency matrix of island chr7:94284858-94286527(with coefficients with an absolute value greater or equal than 0.5) at the left and the related modeled adjacency matrix at right, both ordered by genomic position. 118 Chapter 5. A Model for the Local Correlation Structure 5.4 Comparison with Persistent Homology More than studying the similarities among the original and estimated graph properties, as the degrees of each node in the original and the estimated adjacency matrix, we are interested in comparing the topological properties related to the structural correlation. Those could be studied from the persistent homology results of the original network and the estimated one and also comparing our random SBM-D model with other known models. 5.4.1 Comparison with the Original Network With the proposed SBM-D, we obtain non-weighted adjacency matrices. To compare the original network with the generated one, we need to assign edge weights to the adjacency matrix A. As done with the original network, we assign them following the modified Pearson correlation coefficients (1 − |ρ|) between each pair of connected CpGs. A VR-filtration over the weighted adjacency matrix is then applied to obtain the persistence diagrams of figure 5.10. Figure 5.10: Persistence diagrams of original and estimated networks of the chr7:94284858-94286527 island restricted to coefficients with an absolute value greater or equal than 0.5, using δint =δext = 0.5. The obtained persistence diagrams are indeed really similar. Both networks present similar topological elements in dimension 1 than 2, being slightly higher in the modeled network. Despite the edge-density of both is almost the same, the modularity is a little bit greater for the original one, what is increasing the edge-density in the modules and makes difficult the creation of topological elements in H1and H2. Please note that we compare the SBM-D with the original network at weight 0.5 because the SBM-D was designed to represent the higher correlation clusters of the matrix, avoiding the lower correlation values in order to reduce the non-substantial 125 Chapter 5. A Model for the Local Correlation Structure information. To demonstrate that the Wasserstein distance among the two above diagrams P1(of the original network) and P2(of the modeled network) is not statistically significant, we develop a permutation test over a null hypothesis of a null Wasserstein distance between the diagrams (H0:dW(P1, P2) = 0). This test permutes the values of the original adjacency matrix several times (100) and calculates the distance among the obtained barcodes, as specified in the algorithm 3below. Algorithm 3: Permutation algorithm Parameters:Aooriginal weighted adjacency matrix, Asestimated weighted adjacency matrix from SBM-D, dthe Wasserstein distance among the two related persistence diagrams; initialization; while simulation s= 1 do Ao1is the permuted correlation matrix from Aoafter permuting each row values once; Apply persistent homology to Ao1and Asand calculate the related barcodes PAo1and PAs; Calculate d1=dW(PAo1, PAs); end Repeat simulation s= 2, ..., 100; Result: Calculate the p-value of the test as p=#(ds>d) 100 ,∀s= 1, ..., 100 if p < 0.05 then We reject the null hypothesis of null distance; else We cannot reject the null hypothesis of null distance; end All distances obtained permuting the values of the original matrix were higher than the initial one so the null hypothesis of low distances is not rejected, which indicates that the two persistence diagrams are not significantly different. If we simulate various SBM-D networks using the same parameters and over the same island, we would obtain very similar Wasserstein distances over the generated networks and the original one. Indeed, those distances would be much more similar using the adjusted model presented in the previous section. This indicates that our SBM-D is stable and robust enough. 126 Chapter 5. A Model for the Local Correlation Structure 5.4.2 Comparison with Other Random Models The proposed SBM-D generates a random graph that depends on the distance between the nodes and the parameters K,pint, and pext. There are other models to generate random graphs, despite we have not found any that could be used successfully to reproduce the properties of our correlation graphs. A famous random model is, for instance, the Erd¨ os–R´enyi one (1959) [147]. The Erd¨ os–R´enyi (ER) random network is written as GER(n, p), where pis the probability of adding a link between a pair of nodes (a fixed parameter). The degree distribution of an ER network follows a Poisson distribution and the clustering coefficient is small. Please note that the SBM-D design with a fixed probability pint =pext =pof joining nodes becomes an ER network. Alternatively, we find the Barab´asi-Albert (BA) model (1999) [148], where the probability of finding a node degree kdecays as a power law of the degree. This means, the probability of attaching node uto node vis proportional to the degree of v. Then, the principal characteristic of this type of random networks is the power-law degree distribution. Ultimately, we may talk about the Watts-Strogatz (WS) model (1998) [140], that aim to augment the clustering coefficient of the ER model. First, one form the circulant networks with nnodes connected to kneighbors. Then, we rewire some of its links: each of the original links has a probability pof having one of its end points moved to a new randomly chosen node. If pis high, it approaches the ER model. Our correlation networks could not be efficiently computed with any of those three models. The reason is mainly the difference in the degree distributions and the modularity. BA and WS models present a higher modularity index, being higher for WS, but the degree follows a power-law distribution (where only some vertices have a high degree) or a Dirac delta function (where all nodes tend to have the same degree), respectively. What we generate, however, is a graph with a high modularity and a normal degree distribution where most of the nodes present a high degree (sometimes bi-modal, depending on the modules size and the long-range design). The main difference between the WS model and our SBM-D is that the probability of joining nodes from the same neighborhood is always the same, as well as the probability pof connecting new nodes. That makes WS a worse predictor of hub CpG sites or clusters of sites as per their correlation. Additionally, the fact that our nodes are ruled by a distance that determines the 127 Chapter 5. A Model for the Local Correlation Structure creation of the modules is something new that was not taken into account by any of those three designs and we have not explicitly found in literature. We generate the four graphs with similar edge densities in order to compare their homology results, see figure 5.11. We apply persistent homology to each network to measure and represent their topological differences. Assuming that the nodes represent CpG sites, we assign edge weights based on the Pearson correlation coefficient among two nodes and apply VR-filtration over the modified adjacency matrix (1 −|A|). Figure 5.11: Generated networks over the island chr7:94284858-94286527 with similar edge density (except for BA). (a) ER, p= 0.2(b) BA, power=1 (c) WT, k= 10; p= 0.05 (d) SBM-D, K= 4, δint =δext = 0.5 The graphs generated present some topological differences, as indicated by the differences on the PH results for the four graphs in figure 5.12. Despite the graphs and therefore the persistent diagrams may change with several runs of the random models, we could detect some comparative parameters. 128 Chapter 5. A Model for the Local Correlation Structure Figure 5.12: Persistence diagrams of the four respective networks. The first four diagrams are restricted to network weights greater or equal than 0.5. 129 Chapter 5. A Model for the Local Correlation Structure As expected, the BA graph does not generate any feature in dimension greater than zero, resulting from its low edge-density that is unable to create hole structures. The ER persistent diagram has basically elements of dimension 1 (holes) that increase in incidence once we connect more nodes. The lifespan of the features is generally high, thanks mainly to its low modularity. The most similar ones are WS and our modeled network SBM-D, as both follow a more modulated design. Indeed, the Wasserstein distance between both persistence diagrams is lower than comparing SBM-D with ER. However, they also present differences: the WS network has fewer elements in both dimensions, specially in dimension H2. Despite both present similar edge-density, transitivity, and modularity values, the degree distribution of the WS network is much less variable, which may difficult the formation of complex elements and destroy the ones that may be formed between modules. The lifespan of the features is generally shorter than ER, despite there are some of them that present a larger lifetime related to less connected subgraphs. The appearance of the topological features for those two networks occurs earlier than in the ER graph, indicating that ER needs a higher edge-density to complete topological structures with at least four points (as holes). WS is less sensitive to noise or perturbations than the SBM-D design. The Betti numbers obtained from the application of PH to networks with an increasing edgedensity are indeed more altered for the SBM-D model. This derives from a less random design of SBM-D, that increases the edge-density in already densely connected zones. 130 Chapter 5. A Model for the Local Correlation Structure 5.5 Evolution of SBM-D by Age Groups The evolution of the networks for the different age groups could be measured or modeled in distinct ways [149], and we do it through the SBM-D model. The age groups presented in section 4.1 belong to different datasets and are not longitudinal. This decreases the power to detect truly modifications of the correlation structure over the years, as the changes may be caused by the different data characteristics. Still, we detect common structural correlation clusters. If we would apply PH to differentiate their network’s topology, we would find similar results with lower Betti numbers for the groups with a higher module edge-density (the older ones), as expected. It is challenging to find a public methylation dataset with such a large age range. Therefore, we restrict the analysis to the dataset GSE40279 dividing the sample in individuals of 20-50 and above 80 years old (with around 100 subjects per group). The absolute mean correlation is higher in the older group. Taking the island of the chromosome 7, the proposed adjusted model described in section section 5.3 (with δint =δext = 0.3) predicts successfully the correlation structure (between the 70-80% of hub nodes are detected). Indeed, the parameters generated by the model are different for both age groups, as indicated in the table 5.1 below, indicating a distinct correlation behavior. The number of optimal clusters is the same for both, but the average intra-cluster and inter-cluster probabilities of joining nodes indicate a heavier correlation in the oldest group for short-range and long-range positions. Table 5.1: SBM-D parameters by age group. Sample group KAverage pint Average pext Young: <50 years (average 41) 4 0.32 0.07 Old: >80 years (average 86) 4 0.41 0.15 The study above using two age groups can be extended using a wider age range. We take the entire sample of 656 individuals ordered by increasing age and study the model parameters over overlapping increasing windows of 50 individuals (with an overlap of 10 individuals and δint =δext = 0.5). The optimal number of clusters is always 4 and the results are in line with the ones presented in the previous table, indicating that the probability of joining two nodes is greater for nodes belonging to the same cluster and presents an increasing trend over the years. However, the evolution picture may be biased by the short age-range (where most 131 Chapter 5. A Model for the Local Correlation Structure of the individuals have between 40 and 80 years old), as two main groups are missing: children and elderly people. Figure 5.13: Evolution of edge connection probabilities over the average window age with the related fitted regression lines. The first figure presents the pint probabilities for each cluster, and the second the pext ones for each pair of clusters. 5.5.1 Multiple Age Datasets The application of the same analysis to a wider age range including data from different arrays (the ones presented in section 4.1), completes the analysis indicating an interesting trend. We include 20 individuals of the following groups: newborns (GSE30870), children 1-16 years (GSE36064), [20,40) years old people (GSE40279), [40,80) years old people (GSE40279), and ≥80 years old people (GSE40279). We use δint =δext = 0.5 to take the highest locally correlated sites, and we study the behavior of some of the 10 biggest CpG islands. Results presented in the figure 5.14 re-enforce the idea of the structural local correlation within those regions, as short-range positions present generally higher correlation values. A similar behavior was observed in other islands. Besides, we find a decreasing pattern over increasing years, especially on the long-range regions. Curiously, the correlation seems to be high over short and long-range positions up to 20-25 years old approximately. Then, it starts to decrease up to 70-75 years old when it slightly increases again in 132 Chapter 5. A Model for the Local Correlation Structure some cases. This observation, that would need a posterior biological confirmation, is then in line with the increasing trend observed above with a shorter age range. In any case, thanks to the designed SBM-D over the correlation graphs, we are able to measure an evolving time situation using only the ten parameters of inter-cluster and intra-cluster joining probabilities, reducing the dimension of a correlation matrix (∼100 ×100) to these ten parameters and their progression. Figure 5.14: Evolution of pint and pext probabilities over the average window age for some of the biggest CpG islands. 133 Chapter 5. A Model for the Local Correlation Structure 5.6 Summary Thanks to the study of the local correlation matrices based on DNA methylation data with graphs and persistent homology, we could take conclusions from their topology. We have demonstrated that their structural behavior is not random and follows a spatial design. Short-range and long-range correlations are distributed forming highly correlation clusters (or modules) associated with near genomic positions and (potentially) with loops, respectively. This understanding allowed us to design a model (SBM-D) of the correlation structure that is able to predict the graph topology and detect heavily local correlated CpG sites within CpG islands. This model generates a graph trough the estimation of its degree distribution that takes into account the genomic distance between the nodes, and reproduces adequately the structural interactions between methylation marks, even out of CpG islands. It requires mainly three parameters (K,pint,pext), that can are inferred from the DNA methylation data, and presents different graph properties when compared with other common random network models. Our model is then able to describe and predict a modulated design of a correlation matrix based on those three parameters, providing with a quick analytical tool for analyzing the matrix. Out of the biological context, the proposed SBM-D may be very useful to measure, for instance, the likelihood of the spread of an infectious disease taking into account the “distance” between the individuals, that can be considered as their localization, the number of common contacts, or any other measure of relatedness. As an application of the SBM-D, we were able to measure the evolution of the correlation structure with the age, observing a quite stable correlation design over the years in CpG islands. The level and distribution of the correlation in local and global regions are the main differentiating point, presenting generally higher levels of local or short-range correlation. While children and elderly people present high levels of local and global correlation, middle-aged individuals manifest a decrease of the correlation levels above all in the long-range regions. This would validate our initial hypothesis of a decrease in the correlation with age, especially on the longrange interactions for older ages. It is not clear yet how a more or less structured correlation within the islands impacts the genome functioning, but it may augment the gene expression variability producing unexpected results or disease-conditions. We have not found any explanation for the fact that, in some cases, the oldest individuals present similar levels of correlation as children. Following aging theories associated to DNA methylation, the changes in our methylome are constant and increase over the years, leading to greater variability in older ages. Maybe this variability is causing the high local correlation, or maybe it is a hint about the epigenetic features that could be associated with longevity. Those findings would 134 Chapter 6. MultiNet After that, in chapter chapter 7, we ill introduce a guideline of parameter selection to understand how MultiNet parameters could be efficiently chosen. The chapter 8 contains the presentation of the main contributions of MultiNet to the analysis of DNA methylation. Additionally, we present a different application of MultiNet to a financial dataset that shows its use with non-biological data. Finally, the chapter 9 contains a guide of MultiNet use in R and the links to the developed programming. 141 Chapter 6. MultiNet 6.2 Introduction to MultiNet The aim of MultiNet is to extend the local study of the DNA methylation correlation that we did with persistent homology in the part II of this work. As we wanted to work with the entire 450K array without a regional restriction, we needed to develop an alternative model to study the global network of correlation interactions. We have designed a computational algorithm from a TDA-based model that allows us to detect the intra and inter-chromosome correlation structures and differentiate sample groups based on their related methylation levels. This algorithm could be seen as a data analysis tool, that extracts the topology of the data using Morse theory principles. Similarly to Mapper, it is, therefore, not a specific algorithm to study biological or epigenetic data, but a general methodology to detect correlation patterns and sample classification among the hundreds or thousands of variables analyzed. MultiNet is implemented in R. As mentioned in section 3.4, Mapper is already a very useful tool to detect the shape of the data and visualize it. However, it has some limitations when dealing with huge datasets, either in terms of computational times, parameter selection, or the inability to detect the underlying variables that are causing more impact on the “shape” of the data. Our proposal to treat huge dimensional datasets resides on the following novel approaches: •Feature modeling: use the variables as observations to construct the topological model (i.e. the simplicial complex). That means, the cluster analysis will be done over a distance matrix among the variables of the dataset. We could then differentiate in the networks or simplicial complexes two levels of information: the characteristics of the variables and how they interact depending on the sample group selected. In case we analyze case/control studies, this method allows us to detect differentiated genomic sites or regions associated with the groups and with different methylation patterns. This provides then with potential epigenetic markers that may help in diagnosis. •“Divide and conquer” strategy. We divide the dataset into several overlapping windows and apply the algorithm to each one of them. Afterwards, the resulting networks from each window are merged in a unique graph. For this property, we call the algorithm “MultiNet” (from “multiple networks”). This would be similar to do multiple Mappers. The way of selecting and ordering the windows is defined by the user and can be given by the filter functions of the algorithm, so it does not necessarily introduce a new parameter in the model. This method is faster than processing all the windows together and is therefore much faster than Mapper for big data sizes. MultiNet results are less sensitive to the parameter selection than Mapper ones thanks to this window’s 142 Chapter 6. MultiNet design. •Reduce the computational time using the most relevant information. The algorithm processes the quantity of windows that the user desires, without the need of processing all the dataset information, that still can be done in a reasonable computational time. •Extend the Mapper design of merging nodes. As our interest is to observe the global correlation structure among the dataset desired, we do not want to reduce the algorithm to join nodes with common points only, as this may limit the network interpretation. Our approach is to join nodes with common and desired characteristics too in order to obtain a more detailed representation of the underlying data structure. In particular, we decided to join nodes with common points or a high mean correlation among the CpG sites contained on them. •Study the metric from a local and global perspective. That means, we study the differential methylation patterns locally and globally for CpG sites within the same chromosome or in different chromosomes. Both analyses are needed to not overlook the significant behavior of the local structure. •Define a guide of parameter selection and a more sophisticated machine learning design for MultiNet. We introduce several new parameters not seen in Mapper to have a greater flexibility, as the data windows size or different types of cluster analysis. As a complement, we design a parameter selection guideline with the aim of establishing a parameter stability in terms of results and computational time. 6.2.1 Cluster Analysis Clustering analysis is the base of MultiNet and its representation. Cluster analysis refers to the grouping of a set of objects in the same group (or cluster), such that the objects in the same group are more “similar” than the objects in other groups. There are many ways of defining this similarity function over the data, and many ways of grouping the objects into clusters. One of the most common methods to do it is the called k-means clustering [151]. It aims to form kclusters in which each observation belongs to the cluster with the nearest mean or center such that minimizes the within-cluster variances. Formally, the objective is to find: arg min S k X i=1 X x∈Si||x−µi||2 where (x1, ..., xn) is a d-dimensional set of observations, S={S1, ..., Sk}are the sets of observations for each cluster k(k≤n), and µiis the mean of points in Si. 143 Chapter 6. MultiNet There are several iterative algorithms implemented to solve the prior equation. The most used one is called Lloyd’s algorithm [152] or naive k-means, that assigns each observation to the cluster with the nearest mean (based on the least squared Euclidean distance) and recalculates the means for the observations assigned to each cluster. Other methods, called initialization methods (as the Forgy one [153]), randomly choose kobservations from the dataset and uses these and the initial means. Hartigan-Wong [154] method provides a variation of k-means which does a local search that iteratively attempts to relocate a sample into a different cluster as long as this process improves the objective function. The kmeans R function uses the Hartigan and Wong method as default, but one could also choose any of the others. For MultiNet, we use the Forgy method as it allows to create empty clusters if the specified kgroups are higher than the needed ones. Other clustering methods as hierarchical clustering one is not directly used in this thesis but indirectly presented the different heatmap plots (programmed with the R function Heatmap) that we will specify. The heatmap is a representation of a matrix with colors representing different value ranges. The matrix is ordered by the hierarchical clusters formed over the matrix (either over the rows, the columns, or both). The hierarchical cluster algorithm constructs trees of clusters of objects. The method follows an agglomerative design: each observation starts in its own cluster, and pairs of clusters are merged as one moves up the hierarchy. Please refer to [155] for further details about the method. 6.2.2 MultiNet Algorithm Our starting point is a data cloud Xon a finite metric space (X, dX). In our case of methylation data, we define a matrix Bof βvalues (as defined in the equation (1.1)) of NCpG sites measured over pindividuals: B=     β11 . . . β1n . . ..... . . βp1. . . βpn      Therefore, Xis a data cloud with Npoints in Rp, where each point represents a column of B, i.e., a CpG site. We define a selection of points of Xas a “window” of X, and we will denote it as Wi,∀i= 1, ..., D, where {W1, ..., WD}could cover all Xor could be a subset of 144 Chapter 6. MultiNet interest. Please note that we will denote Wiindistinctly as a submatrix of Bwith the selected columns or simply as the subset of the columns selected. The way of selecting the windows Wiwill be determined by a function h:X→R. For instance, hcould be the genomic position of the CpG sites or the median methylation per CpG. We would then obtain a set of overlapping windows {W1, ..., WD}that contain CpG sites ordered by the values of h(as genomic coordinates or median values). Depending on the study aim, hcould be selected differently. Once we have the windows Wi⊂X, we define the filter function F:Wi→Rn, for any n > 0. In our case of methylation data analysis, the filter function will be projected in R2:F= (f, g) : Wi→R2. The functions fand gcould be selected as desired depending on the study aim. Could be, for instance, the median and variance of each CpG site. The metric dcould be also defined as needed for the study. In our case of methylation analysis, the metric will be based on the modified Pearson correlation [135]: d=q1−ρ2 X,Y (6.1) The generic version of the one-dimensional MultiNet algorithm on Xcomputed with the filter function f:Wi→Rcan be then summarized as: 1. Select the function hand the set of ordered and overlapped windows by h: {Wi}(1≤i≤D). Each window has a length rand an overlap O. Usually, we will define the same rand Ofor all the windows analyzed. For instance, we could define has the variance of each CpG site, select the first 5,000 CpGs more variables and divide them in windows of length r= 1,000 with an overlap O= 500 (then D= 10). 2. For each Wi, cover the range of values YWi=f(Wi) with a set of consecutive intervals {IWis}(1≤s≤S), where Sis the number of intervals to cover the window, with length lIWisand overlap oIWis. Usually, the number of intervals Swill be the same for all windows analyzed, as well as the length of the intervals land their overlap o. For instance, we could divide each window of length r= 1,000 into S= 2 different overlapped intervals of length l= 500 and with an overlap o= 250 CpG sites. 3. To each window Wi, apply a clustering algorithm to each inverse image f−1(IWis)⊂Wi⊂X,s∈1, . . . , S. This defines a pullback cover C={C(1,1), . . . , C(1,k1), . . . , C(S,1), . . . , C(S,kS)} 145 Chapter 6. MultiNet of the window Wi, where C(s,ks)denotes the kth cluster of f−1(IWis). The number of clusters Kper interval is determined by the user and is normally the same for all intervals and windows. The clustering method is normally k-means and the underlying algorithm is selected by the user. We take the Forgy method so in case the number of clusters determined per interval exceeds the optimal number of cluster in that interval, the algorithm does not create the excessive ones. The selection of hierarchical clustering is also possible but slower. 4. For each window Wiwe have then a construction similar to the nerve of the cover CWi, and the corresponding graph MWi. Each vertex v(s,k)corresponds to one element C(s,k), and two vertices v(s,k)and v(s0,k0)are connected if at least one of the following conditions is fulfilled: (a) The mean absolute correlation of the points of both vertices is equal or greater than a specific level δ: mean(|H|)≥δ where His the correlation matrix formed by the elements of v(s,k)and v(s0,k0), i.e., the correlation matrix of the CpGs contained in both nodes. (b) If v(s,k)∩v(s0,k0)6=∅and the quantity of common points is equal or greater than a specific level λ: #v(s,k)∩v(s0,k0) max #v(s,k),#v(s0,k0)≥λ Please note that the option (a) is checked for vertices belonging to overlapping intervals only (in order to respect the TDA idea of reproducing the “shape” of the data cloud). Normally, we select δ= 0.8 and λ= 0.2, but the user is free to play with both parameters testing distinct exigency levels for the graph formation. 5. Once all selected windows are measured and all MWiare created, each subnetwork is merged forming the overall simplicial complex Mas a union of all the window’s simplicial complexes M=MW1∪... ∪MWD. In addition, step 4 is repeated over consecutive windows and two vertices are connected too if any of the two conditions is met. Therefore, MultiNet allows to connect nodes in the network in a bi-directional intra-window and inter-window way. The edges weights of the graph Mare assigned based on the absolute mean of the correlation matrix formed by the CpGs in each pair of nodes. 146 Chapter 6. MultiNet 6. A post-processing of the information contained in Mis also part of the algorithm and depends on the dataset characteristics. In our case, we do several analysis to obtain substantial biological information and generate colored networks by functions of interest, methylation and correlation heatmaps, statistical results, graphs of biological enrichment analysis and spreadsheets containing all the information. All those steps of post-processing will be also described in the next sections. 147 Chapter 6. MultiNet 6.3 Two Different Perspectives: Local and Global There are several examples of analyses where different information could be extracted depending on the perspective you use. For example, in our case, is not the same to look at the local correlation structure of the CpG sites located in the same chromosome, that the global correlation structure of the CpG sites located in different chromosomes, as we have already studied in part II of the present work. For that reason, we decided to analyze at once two different approaches in order to have a description of the topological structure of both: local and global. To do it, we adapt the selection of the filter functions as follows: •Local or intra-chromosomal design: our function hwill determine the order of the genomic coordinates. The first filter function fwill be also determined by the genomic site, providing with local results in terms of correlation and genes. The second filter function gcould be selected as desired but still the results obtained are considered local. We could also select initially only CpG sites located in the same chromosome to guide the local search. This approach is normally faster as chromosomes contain a manageable number of CpG sites. •Global or inter-chromosomal design: we use different functions hand fthat do not depend on the local CpG position in the genome, or any other variable related to the CpG spatial distribution, as the chromosome. We could select, for example, the function has the difference in the medians between sample groups (case/control) and determine fand gas the median methylation levels and the variance of each CpG. Thus, depending on the perspective we choose, we will specify a distinct dataset as input for MultiNet and obtain at least 2 MultiNet networks related to local and global analyses. We could use the results obtained globally to dig into the local approach. In the case of case/control studies, we obtain differentially methylated CpGs with the global algorithm that belongs to different chromosomes with different levels of methylation. Using the local algorithm, we study better those selected CpGs to contextualize the methylation modification within a specific chromosome or genomic region. Of course, this double-design could be also used in many other ways: only local, only global, etc. It provides, in any case, with a solution to detect the different levels of complexity contained in a methylation array. This is a novel contribution to the DNA methylation analysis, where most of the current methodologies only study the local behavior of the sites, or simply do not normally specify any strategy to deal with these different informative levels. 148 Chapter 6. MultiNet 6.4 MultiNet Implementation over 450k Illumina Methylation Dataset As previously mentioned, one of the objectives of this present work is to understand the correlation structure of the epigenetic marks based on the study of DNA methylation. Therefore, despite the algorithm could be applied to other types of data, as we will also see afterwards, we will focus from now on the explanation of how we analyze DNA methylation. Our dataset is a 450k Illumina array, measured on a sample divided into several groups of interest, as control/case for instance. The metric used is the modification of the Pearson correlation specified in the equation (6.1). As a standard pre-process, we normally eliminate from the analysis the CpG sites related to the sex chromosomes X and Y, and CpG sites associated to SNPs, as they may introduce unexpected variability and bias the results [156]. Missing values are not imputed. The normalization or check for data confounders is indirectly done by the algorithm, as we will describe in section 6.7. The process described in the algorithm 4below allows to follow the biocomputational algorithm precisely. The MultiNet resulting graph is a useful element to explore the correlation of the data, as the nodes are created with a correlation metric. Besides, we could extend the analysis perspective (local/global) as described in section 6.3, or apply it to different sample groups to study their differences in terms of correlation and methylation patterns. Once we obtain the MultiNet graphs (or networks, we use both words instinctively), the analysis of the data should continue extracting more information from the networks which brings interesting biological outcomes. For us, these following steps will be: 1. Networks differentiation. The networks obtained based on sample groups can be differentiated with the processes we will describe in the section 6.5. Once we know they are different, we can take conclusions about the reason of the difference and the interpretation. In addition, extra-information about underlying methylation patterns could be extracted from the networks in form of heatmaps and hierarchical clustering. 2. Detection of significantly differentially methylated sites among sample groups or regions from the MultiNet networks. The statistical significance is tested with the appropriate statistical models, as will be described in the section 6.6. 149 Chapter 6. MultiNet Algorithm 4: MultiNet algorithm Data: Methylation matrix: local or global Result: MultiNet Network initialization; while Parameter Selection do Select the sample groups and apply the following steps for them; Select the algorithm dimension n, that is 2 by default; Select the metric d, that is the modified Pearson correlation by default; Select hand the Ddataset windows Wi, their length rand overlap O. They are r= 1,000 and O=r/2 by default; Select the filter functions fand g; Select the intervals or bins within each window IWis, their length land their overlap o. They are l=r/2 and o=l/2 by default; Select the cluster method m, that is k-means (Forgy) by default for all windows; Select the number of clusters kIWis, that are 3 by default ; Select the node joining parameters δand λ, that are 0.8 and 0.2 by default ; if Wi6=∅then 1. Define a region R= [minf, maxf]×[ming, maxg]so that we cover overlapping ∪i,jIi,j; 2. For each i, j select all data points so the values of fand glies within Ii,j; 3. Following m,d, and k, apply cluster analysis over those data points and create a 0-dimensional simplices or vertices; 4. For all vertices in the sets {Ii,j, Ii+1,j, Ii,j+1, Ii+1,j+1}, if the intersection of the cluster associated with the vertices is ≥λor have a mean correlation ≥δ, then add a 1-simplex or an edge; 5. The final graph MWiis then the 1-skeleton of the complex generated; 6. Label each vertex as the variables selected within Wi; else Do not produce any cluster or vertex; end 7. Repeat the process for {Wi+1, ..., WD}of length rand overlap Oso Wi∩Wi+1 6=∅; 8. For all vertices in the complex MWi, if the intersection with any vertex in MWi−1or MWi+1 is ≥λor have a mean absolute correlation ≥δ, then add a 1-simplex or an edge; 9. Create the overall MultiNet graph Mjoining the MWifollowing step 8; 10. Assign edge weights to Mas the mean absolute correlation among nodes. end 150