Romain Boulet
email: romain.boulet@univ-lyon3.fr

Ana Flavia Barros-Platiau

Pierre Mazzega
email: pierre.mazzegaciamp@get.omp.eu

A F Barros-Platiau

CHAPTER 11. ENVIRONMENTAL AND TRADE REGIMES: COMPARISON OF HYPERGRAPHS MODELING THE RATIFICATIONS OF UN MULTILATERAL TREATIES

Keywords: Environment, trade, agreements, ratification, hypergraph, modeling, United Nations

In analyzing the ratifications of Multilateral Environmental Agreements (MEAs) and United Nations-based trade agreements, this study pursues two goals: first, to provide evidence of the limitations of the role played by the United Nations in promoting sustainable development as a bridge between both regimes, although member states are roughly the same; second, on a methodological side, to contribute to the exploration of the use of hypergraphs to model a dynamic in International Relations, as illustrated by analyzing empirical data easily accessible and available on the web. We use 3550 ratification dates of MEAs (1979MEAs ( -2015) ) and 834 ratifications of trade agreements available on the website of the United Nations Treaty Collection. The hypergraph-based analysis of the temporal successions of ratifications highlights informal communities of countries whose contours emerge through this uncoordinated process of ratification. The European countries and more specifically members of the European Union, and their Atlantic allies stand out as having the leadership of the construction of a global environmental order. However, no formally established community of countries emerges from the chronology of ratification of the United Nations trade agreements. In this particular UN context, none of the contemporary trade powers is even central to this dynamic. Indeed, most trade negotiations take place outside the United Nations arena, particularly in the framework of the World Trade Organization, or in regional, bilateral, or even minilateral partnerships.

INTRODUCTION

Under the aegis of the United Nations (UN), most multilateral117 treaties are negotiated by about 200 sovereign States for years, and then are eventually signed and ratified by some or most of these States.

Although negotiation processes are at the center of the research agenda in International Relations, these processes leading to ratifications, on the contrary, are still very little studied. However, the ratification processes vary according to the country considered, in particular according to the interactions among public and private, domestic and multinational actors, this alongside many other determinants [START_REF] Lantis | The life and death of international treaties[END_REF]. In addition to this, ratification does not mean the full implementation of the international obligations contracted through the agreements, which ultimately depends on the true willingness of the State to meet these commitments, and to devote the means necessary to their achievement. Although trade negotiations take place mostly outside the UN, they are directly connected to the UN legal and diplomatic framework. Multilateral, bilateral or minilateral arenas such as the European Union (EU), the World Trade Organization (WTO) [START_REF] Colin | International negotiations: towards mini-lateralism[END_REF], the Triad NAFTA, the G7, the BRICs, the Trans-Pacific Partnership (TTP) or the Trans-Pacific Trade and Investment Partnership (TTIP) have proliferated 118 . Similarly, minilateral or regional arrangements also exist in the various environmental regimes (on climate change, protection and conservation of biological diversity, ocean resource management and governance, etc.) as illustrated by the examples of the regional agreements, specific conventions, such as the Arctic Council and the Antarctic System, to name only a few of them. Trade and the environment were usually treated in the UN negotiations as separate international regimes119 during the reconstruction of the Western liberal order or even after the collapse of the bipolar order in the 1990s. But the links between them are increasingly recognized in both regimes as a requisite to get closer to the conditions for sustainable development, according to the strengthening of the international obligations established by the multilateral agreements. The WTO agreement of 1995 is the most emblematic example120 of this trend. Thus, processes of juxtaposition, privatization and fragmentation of these two regimes (and complex of regimes)121 represent a challenge for the UN over the coming years [START_REF] Karns | International organizations. The politics and processes of global governance[END_REF]. Both regimes are linked because the trade and environment agendas have never been so intertwined (UNEP, 2017a,b). To better understand this dual evolution, this article analyzes the agendas of multilateral negotiations and the place / role of States on the basis of the ratifications of treaties that follow these negotiations. The interest of an analysis using mathematical modeling and the theory of international relations related to trade and environment is twofold. First, it is to test whether the UN manages to function as a reasonably homogeneous system, that is to say, to play the role of "constructor of the social world" to use the words of [START_REF] Barnett | Rules for the Word. International organizations in global politics[END_REF]. If the ratification of multilateral treaties shows a convergence of States parties to the two regimes, the contribution of the United Nations can be considered as significant. Then, the analysis of the results obtained will establish valid correlations concerning this trade-environment relation. If both of these assumptions are true, sustainable development -relying on the three pillars of economic viability, environmental preservation and social 118 The European Union is the most successful political arrangement and the only one that covers the commercial and environmental agendas. The Triad composed by Washington, Brussels and Tokyo was only an informal arrangement to reinforce the emergence of Japan in the 1980s. NAFTA is the result of Washington's leadership on Toronto and Mexico. The TTP and the TTIP are both mega accords that suffered heavily with Donald Trump's trade policy since 2016. The G7 is the group of the most industrialized countries united to drive the global economy outside the UN framework. BRICS is the informal group of emerging countries -Brazil, Federation of Russia, India, China, South Africa-under Chinese leadership. The two latter are more economic than trade-oriented, but they do foster intra-group trade.

justice -can be seen as a structuring concept of international relations, just like the affirmation by [START_REF] Shelton | Guide to international environmental law[END_REF] concerning International Environmental Law. If the results are too contrasted, it would be wise to consider the UN as an epiphenomenon [START_REF] Mearsheimer | The tragedy of great power politics. W.W. Norton & Company, New York Moravcsik A[END_REF][START_REF] Barnett | Political approaches[END_REF][START_REF] Viola | Brazil and climate change. Beyond the Amazon. Routledge, Abingdon von Luxburg U[END_REF] playing only a marginal role. As a consequence, it may be argued that the sustainable development principle fails to structure both the international public law and the international relations. In Section 11.2 we rapidly expose the logic that governs the elaboration and possible ratification of international treaties in trade and environment respectively. Then (Section 11.3) we present the data we use and the proposed analysis based on hypergraphs, defining this mathematical object and detailing the tools used in this study. In Section 11.4 we expose and compare the results of our analyzes carried out on the domains of environment and trade respectively. Section 11.5 discusses the contribution and limitations of the approach we have developed in the context of IR analysis, these limitations being mainly related to the specificity of the ratification dynamics according to the international regime approach.

RATIFICATION OF TRADE AND ENVIRONMENTAL TREATIES

The UN convergence on trade and environment

One objective of the UN is to ensure more cohesion to a global trade and environmental governance by setting the basic rights and duties for all the States members. Within the United Nations, seen as a normative and material structure122 , a myriad of public and private actors meet (IISD / UNEP, 2005; [START_REF] Karns | International organizations. The politics and processes of global governance[END_REF]. From an institutional viewpoint, both areas -trade and environment -also shared a difficult start in the multilateral governance architecture. The International Trade Organization (ITO) could not be created following the refusal of the US Congress to ratify the charter in the late 1940s. More than three decades later, the United Nations Environment Program (UNEP) was established as the first step in building a real organization. Immediately after the 1992 Rio Summit, the World Trade Organization was created under the leadership of Washington, thus, confirming the predominance of the logic concerned with the regulation of trade over the one ensuring a sustainable management of the environment and natural resources. In response, in the year 2000, the UN orchestrated the global agenda through the Millennium Development Goals (MDGs) followed in 2015 by the Sustainable Development Goals (the SDGs or Global Goals) 123 , so as to build a more harmonious and favorable context to sustainable development up to 2030. Recently the UNEP was renamed UN Environment but without structural changes124 .

Three factors of the interlocking of the two regimes

Despite the limitations posed by the separation of the trade and environmental regimes over the past seven decades, there are several simultaneous interlinking factors, especially embedded in political, economic and legal approaches. A first factor is the economic approach that has been adopted to improve the collective management of natural resources. The concern regarding neo-Malthusian approaches of raw materials shortages in function of the population explosion in some Third World countries, leading to significant market imbalances (Meadows et al., 1972), is at the origin of the 1972 United Nations Conference on the Human Environment (UNCHE). Over time, market instruments such as quotas, labels and certifications have been used more extensively in environmental regimes.

The Convention on International Trade in Endangered Species of Wild Fauna and Flora (CITES125 ) is an example of the use of market instruments to protect endangered species. Another example is the global climate regime, having created the flexibility mechanisms with the 1997 Kyoto Protocol and encouraged carbon markets, allowing entrepreneurs to participate directly in solutions for the mitigation of greenhouse gas impacts. In the forest quasi-regime (de Carvalho, 2012), REDD and REDD+ mechanisms have been designed to counter deforestation. Thus, under the 2015 Paris Agreement similar mechanisms have been proposed. At the Rio summit in 2012, the green economy was promoted as the new bridge between the commercial and environmental regimes126 . A second factor is based on the development of scientific knowledge. Among the key concepts linking both regimes, "sustainable development" was established in the Brundtland Report (1987) as a major concept triggering conciliatory efforts to promote international cooperation and effective multilateralism, linking trade, social justice and the environment. In the same vein, the concept of "global commons" established by the scientific community (Ostrom et al., 2002), provides a framework for a more sustainable management of shared resources. It also agreed on the concept of an "Anthropocene" (Crutzen and Stoermer, 2003;[START_REF] Biermann | Science and government. Navigating the anthropocene: improving Earth system governance[END_REF], reinforcing human responsibility to treat the environment as a set of goods and to consider the importance of ecosystem services [START_REF] Nakicenovic | Global commons in the Anthropocene: world development on a stable and resilient planet[END_REF]. A third factor in the overlap of the two regimes has been the recognition of legal principles, starting with the sustainable development. Trade and environment share the logic of State differentiation used in the framework of the GATT and the WTO with regard to the least developed countries: the States are sovereign but they possess asymmetrical capacities and different historical development trajectories, hence the principle of common but differentiated responsibilities consolidated in environmental law, especially in the climate regime. The Cartagena Protocol127 on Biosafety to the Convention on Biological Diversity corroborated the precautionary principle, against the principle of non-discrimination of the WTO. As a result, countries had the right to refuse the purchase of living genetic modified organisms, in order to avoid risks that are still poorly known to consumers' health and the risks of biological contamination. The WTO Dispute Settlement Body further developed the precautionary principle and contributed to its inclusion in commercial litigation. The polluter-pays principles and the right to development, advocated by the countries of the South, are also present in the UN talks on trade and environment.

However two orthogonal directions

The environmental logic was previously concerned with issues that were treated as exclusive problems of sovereign States, such as pollution or the appropriation and consumption of raw resources. It then turned to more cross-border collective action issues (such as the fight against acid rain and oil spills), and then to global issues (such as the loss of biodiversity, climate change and its impacts, marine resource management, or nuclear contamination). Thus, the construction of international regimes since the last century attests to the internationalization of environmental issues, whose central concept was the ecological interdependence (OECD, 1982). States are asked to accept negative international obligations such as not to cause harm beyond their national jurisdiction, and positive obligations such as to prevent, cooperate, inform, repair the damages caused. Environmental agreements are therefore negotiated for the sake of preservation (fragile or threatened ecosystems), conservation (the most rational use of resources possible) or collective management, on behalf of present and future generations. Since 1972 (UNCHE, Stockholm), the UN has been organizing summits to promote the sustainable development agenda, the main ones being held in 1992 (Rio de Janeiro Earth Summit), 2002 (World Summit on Sustainable Development, Johannesburg) and 2012 (United Nations Conference on Sustainable Development -or Rio+20). The commercial logic is quite distinct (see Table 11.1). First, it is based on the lex mercatoria, European medieval customary law, with its own codes of conduct. Then, its main purpose is not to protect the Planet or its natural resources, but to build a material and normative structure for free trade and, to a lesser extent, the integration of markets at the global level. Its stage of internationalization began five centuries earlier, with the great European navigators. Private and public actors interact intensely in complex and asymmetrical interdependencies. Agreements in the UN framework are less numerous and effective than those established outside it. A strong assumption is that the trading powers prefer to negotiate with each other, like the United States and China, because the South forms a majority in the UN organizations [START_REF] Devin | Les organisations internationales[END_REF] and the WTO. As a consequence, the Doha Round128 has been stalled for too long following several deep disagreements, aggravated by the 2008 crisis on the Euro-Atlantic axis. This partly explains why these States will not appear very much in the graphs below.

Tab Free-trade, non-discrimination, regional integration, green economy, blue economy

Taking into account countries individually since 1972, the two largest economies in the world, industrial and technological powers, polluters and emitters of greenhouse gases are the United States of America and China. Today they are also the biggest investors in technologies related to the "green economy", in particular to ensure their energy security. The USA is also the largest promoter of free trade since the establishment of the United Nations, but in environmental regimes it does not ratify most important agreements, despite its decisive participation. In addition, President Donald Trump denounced the Paris Agreement on Climate Change129 in June 2017. On the contrary, China participates in the environmental debates and ratifies the major agreements, which does not constitute a guarantee that the Asian giant will implement them. It also participates in trade talks, bringing the G77 / China, the BRICs and the G20 as central players, with increasing weight since its official WTO entry and the implementation of Ji Xiping's active diplomacy with the 2017 Rejuvenation Plan. The European Union, for its part, is the only stable community in the environment regime, playing a central role in its region and within the United Nations (see below). It is irrefutably a central player in environmental and commercial law and can therefore be considered as a normative power in these two areas [START_REF] Laïdi | La norme sans la force. L'énigme de la puissance européenne[END_REF], even after the conclusion of the BREXIT130 . However, the EU is entangled in and weakened by current crises and contemporary Euro-skeptic rhetoric.

DATA ANALYSIS WITH HYPERGRAPHS

Does the analysis of the history of the ratification of multilateral environmental and trade agreements corroborate the landscape of international relations just described? Can some information on ratifications be used to produce empirical evidence based on accessible and open data, about this divide between the logic of preserving the environment and the logic of growth through international trade?

In order to answer these questions which concern as much a theme of globalization as a methodological reflection, we will, first of all, recall and present some results obtained on the ratification of the MAEs (Sec 11.3.1) and then introduce (Sec.11.3 .2) hypergraphs and the associated analysis procedure (Sec.11.3.3).

Previous results

In a previous work [START_REF] Boulet | 35 years of Multilateral Environmental Agreements ratification: a network analysis[END_REF], we analyzed 3550 ratifications related to 48 multilateral environmental agreements (MEAs) listed in chapter XXVII « Environment » of the United Nations Treaty Collection131 . The analysis covering a period of 35 years involves more than 195 countries (or entities like the EU with a mandate to sign and ratify these agreements). A first simple graph built on the basis of a rule132 of succession of ratifications has made it possible to identify communities of MEAs emerging from this ratification dynamics and to interpret these communities of treaties according to the fundamental interests of the signatory countries [START_REF] Boulet | 35 years of Multilateral Environmental Agreements ratification: a network analysis[END_REF]. A second rule 133 , somehow dual to the first, leads to build another graph where the vertices are the countries. Using various algorithms, we identify informal communities of countries134 emerging from this ratification history (see The most salient result is the presence of the community gathering mainly Euro-Atlantic countries.

Through the inclusion of all its States members the European Union is the only formal institution included in such an informal community135 emerging from 35 years of ratification of MEAs. The calculation of the centralities of the vertices of the graph underlines even more the predominant place of European countries, in particular countries from Northern Europe and Norway (see From now our goal is twofold: a) to enrich and improve this graph-based approach by introducing hypergraphs as a way to overcome problems related to the representation and modeling of simultaneous ratifications that are occurring recurrently in the database (see Sec. 11.4.1); b) to explore what the hypergraph-based approach could bring to two highly differentiated areas of international policy and how it would be useful to conduct critical comparative analyzes (this is done on a small scale since we consider only the UN trade treaties).

Directed graphs and hypergraphs: definitions

Let us start by recalling definitions of graphs and hypergraphs. A graph is a set V={v 1 ,v 2 ,…,v n } of vertices and a set E of edges, an edge being a subset of V with two elements. This simple (one often speaks of a simple graph) and binary (there exists or not a relation between two vertices) structure can be enriched by the addition of weight on the edges (weighted graph) or by the addition of an orientation on the edges (directed graph). So, a directed graph is defined by a set V={v 1 ,v 2 ,…,v n } of vertices and a set E of directed edges, a directed edge being defined by a source vertex and a target vertex. Figure 11.2 illustrates these definitions.

Analysis of a directed hypergraph

Our analysis of a directed hypergraph is based on its incidence matrix. The incidence matrix B of a directed hypergraph on n vertices and m directed hyperedges is the matrix whose rows are labeled by vertices from 1 to n and whose columns are labeled by the directed hyperedges from 1 to m. The entry of B is 1 if vertex is a target of hyperedge , -1 if vertex is a source of hyperedge and 0 otherwise [START_REF] Gallo | Directed hypergraphs and applications[END_REF]. Note that the sign is conventional and our analysis is not influenced by these conventions. The matrix B can be seen as an individual / variables matrix where individuals are the vertices and variables are the directed hyperedges taking values 0, 1 or -1. The mean of a variable is 0 if and only if the directed hyperedge has as many sources as targets. In multidimensional descriptive statistics, it is often customary to center-reduce variables in order to erase the effects of scales between variables expressed in different units or with different orders of magnitude. Here it is not useful because it is interesting to highlight hyperedges with multiple sources and goals. A principal component analysis based on the diagonalization of the matrix allows defining new orthogonal factors which are linear combinations of original variables given by the eigenvectors associated to the largest eigenvalues of . So, we can embed the rows of B in a Euclidean space of dimension k. The vertices of the directed hypergraph are then points of whose coordinates are given by , being an eigenvector of . Once the vertices of the directed hypergraph are embedded in we apply usual methods of unsupervised clustering such as k-means ascending hierarchical clustering in order to detect some communities of vertices of our directed hypergraph 136 . Another point of view is spectral embedding: the vertices of the directed hypergraph are embedded in and the coordinates are given by the eigenvectors of . When the hypergraph is a graph, is the Laplacian matrix and we recognize the usual spectral clustering (von Luxburg, 2007). Thanks to this embedding in , the central vertices can be defined as the vertices closest to the center of gravity (barycenter) of the scatter-plot of . The definition of this notion of centrality differs from the usual notions of centrality of betweenness of closeness. In order to avoid any confusion, we will call it embedding centrality.

HYPERGRAPH-BASED COMPARISON OF ENVIRONMENT AND TRADE RATIFICATIONS

Modeling by hypergraphs

A weak point of modeling by simple graphs is that it artificially increases the degree of the vertices representing the countries that have proceeded to simultaneous ratifications, thus being able to bias some indicators, in particular the indicators of centrality. To overcome this problem, we proceed to a modeling based on directed hypergraphs where there is a directed hyperedge from a source set A of vertices (countries) and a target set B of vertices if and only if all the countries in A have ratified simultaneously a treaty just before countries in B ratify simultaneously that treaty. Sets A and B may contain a single country. Thus, simultaneous ratifications do not increase the degree of the vertices in A or B as can be seen on Figure 11.4 which is an example of hypergraph construction for a single treaty. The hypergraph resulting from a set of treaties is then the union of hypergraphs built for each treaty: the vertices (resp. hyperedges) are the union of the set of vertices (resp. hyperedges) of hypergraphs for each treaty. Let us note that this union is not the disjoint union of hypergraphs because the set of vertices are not disjoint.

Results in the field of the environment

We produced the hypergraph induced by the same data used in the work presented previously, say the 3550 ratifications of 48 MEAs. The method exposed in Section 11.3.3 provides a clustering of the vertices (thanks to an embedding followed by an ascendant hierarchical clustering). A large community clearly that emerges (cf. This community stands out clearly in the sense that the best partitioning is a bipartition with on the one hand these 36 countries of continental Europe and, on the other hand, the rest of the world. Other partitions resulting from division at different levels of resolution (thus varying the number of communities) do not reveal other communities corresponding to politico-economic groups or formal communities.

According to the embedding centrality, most central countries are European countries (Figure 11.5). These results correspond to the strengthening of multilateral institutions through the development of public international law in general and environmental law in particular promoted by these countries.

From the beginning of the twentieth century, not only these Western countries are the main sources and architects of an articulation of doctrines, institutions and principles relating to the environment, but they also served as models to other countries keen to improve the legal and political framework of their public action. The precautionary principle, for example, is inspired by German regulations, while the polluter-pays principle has been consolidated by the OECD. Both have been adopted in multilateral and national texts on other continents. In addition, the first ministries of the environment were created in developed countries, while other states followed after the UNCHE. Europeans, having undertaken to develop their environmental law earlier than the rest of the world in general, and collectively in the context of the development of EU law, tend to ratify environmental agreements at the same pace. Our results

Environment versus Trade results

The main information concerning the ratification data of environmental agreements and UN trade agreements discussed here are summarized in Table 11.6. Not surprisingly the number of entities that have ratified the environmental and trade agreements considered here is almost the same and covers all sovereign nations that have existed in recent decades 138 . The average number of ratifications per treaty (or agreement) is twice as high for the environment than for trade. The most plausible explanation joins some crucial points of the analysis made previously: the inventory of multilateral environmental agreements made by the UN is representative of the efforts of the international community to take in consideration issues related to environmental protection, of course, with the limitations that we know.

On the contrary most of the major commercial agreements are made outside the UN framework. Moreover, many trade agreements are established on a regional or interregional scale (such as the EU, NAFTA or TPP mentioned in Sec. 11.2), and not on a global scale as it is the case, for example, for major environmental conventions (in particular on climate change, biological diversity, ozone layer, etc.). The specificity of the ratification process in the parliaments of each country should also be taken into account to explain observed differences in environmental versus trade ratification. If they are well structured, the work of analysis and the parliamentary debate run their course, and average ratification times for each agreement should be similar regardless of the area concerned. In this regard the functioning of parliamentary bureaucracy is a central variable, without forgetting that political processes are anything but linear and neutral. An opinion leader or a clever politician, depending on his political affiliation, may tip the balance to accelerate the ratification or to hinder it139 . As it is the executive power that prepares the mandate to negotiate and signs the agreement abroad, and then it is the legislative power that ensures the process of ratification so that the head of state can ratify it, it is necessary to look more closely at the interaction of these powers and their interplay.

Considering the States as unitary and rational actors, in a utilitarian approach, a plausible hypothesis based on the work of Abbott and Snidal (2000) to explain a differentiated dynamic in environmental versus trade ratification, is that international obligations related to the environment are vague and often do not require delegation of authority from signatory States. The calculation of their economic impact might guide the decision to apply them at the national level but at a later stage. On the contrary obligations arising from the ratification of trade agreements are stipulated with precision and can be used by the partners regardless of the will of the application of a signatory country. This means that signatories have less control over the use of trade agreements. Now if we consider, as did Moravcsik (1997), that the national interest is the result of a recurrent balance of power between intra-national actors, environmental issues can be considered as less controversial, risky and expensive than commercial ones, or just less important among the various conflicts of interest that States have to manage. Finally, in the event of non-compliance with commercial standards, a country may be sanctioned by its trading partner or an international / regional tribunal, a situation that is unparalleled in the environmental field. States can also push for others to ratify agreements more quickly. In the trade regime, this practice is frequent, the threat of the use of economic or financial coercion coexisting with the promise of loans and other types of assistance. The United States and China are two different models of the same practice. The EU is known for its practice of trying to impose rules on its trading partners 140 . We observe that the percentage of simultaneous ratifications is more than twice as high in the field of trade (14%) than in the field of the environment (6%). Some factors contribute to this phenomenon, such as the fact that trade-related treaties are previously negotiated following concrete interests and reciprocity, whereas in the case of the environment, interests are larger, costs can be immediate and important, but the benefits are diffuse. Another explanation is that the national construction of interest (the calculation of gains / concessions) is more objective in trade agreements, and so are the lobbies from private actors. The obvious differences in the structure of the hypergraphs associated with the environment and the trade consist of the difference of the central countries exhibited (the 10 most central countries for the environmental ratifications are the most central ones for trade ratifications) and of the heterogeneity of the communities extracted in the field of the trade, while in the field of the environment there is clearly a community of European countries that we interpret as an expression of a diplomatic leadership. The more peripheral countries in global trade ratify for three main reasons, either the hope of creating a legal framework more protective of their national economy, or because they believe that they must participate in all the multilateral mechanisms with a view to their integration into value chains or because they have been under pressure from influent trading partners. Ratifying a commercial treaty means accepting to play the game, exposing oneself to others and to international obligations. Ratifying an environmental treaty implies keeping the image of a State which makes the fair effort to contribute to the global sustainable development.

DISCUSSION

In the research agenda of international relations there was a time when the fields of trade and the environment were treated as being hermetically separated. The former belonged to high politics, while the latter was not a priority (low politics) in multilateral agendas [START_REF] Battistella | Théories des Relations Internationales[END_REF]. Since the 1970s, the rise of transnational corporations has led to the paradigm of a complex interdependence [START_REF] Keohane | Power and interdependence: world politics in transition[END_REF], as asymmetric as it is inevitable. It was necessary to analyze the phenomenon of globalization and the intensification of trade flows, especially between the members of the "Triad" (Ohmae, 1985) formed by Western Europe, the United States and Japan, in the context of the emergence of the latter as an industrial power during the Cold war.

In reaction to the Triad, the countries of the South, named "Third World" in the bipolar order, created the G77 / China to promote their right to development in organizations such as the General Assembly of the UN (UNGA), UNCTAD or UNIDO 141 . In addition, several UNGA resolutions have been voted 140 The carbon tax for commercial aviation is an interesting case of failure of this type of strategy (EU-ETS). by a majority of Third World countries to ensure their right to development. Among the most emblematic resolutions -by their content and not by their force -were those of 1974 establishing the "new international economic order" (resolutions 3201 [S-VI] and 3202 [S-VI]).

It is precisely in this context of strong economic cleavage between the North and South and ideological cleavage between the East and West that the UN has set up the Conference on the Human Environment (UNCHE), in Stockholm in 1972. In this framework, the issue was to analyze the growing role of those James [START_REF] Rosenau | Turbulence in world politics: a theory of change and continuity[END_REF] has called 'sovereignty-free actors' and their interaction with States, in a real "turbulence in international politics" articulated between macro, micro and macro-micro levels. Barely a decade later, global politics has changed completely according to a power shift from the West to Asia (Hoge, 2004;[START_REF] Hearn | The changing currents of transpacific integration china, the TPP, and beyond[END_REF]. The complex interdependence has deepened when the Triad and the Third World gave way to emerging countries, especially China and India. In the field of trade and finance, these countries will form the BRICs. In the climate agenda, they will form the BASIC142 . These two groups are more or less formal alliances that were supposed ephemeral at the time of their creation. Regarding environmental talks, despite the persistence of the North / South cleavage due to obligations to finance development and technology transfers, there are no formal groups of countries comparable to those of trade. There is no regional governance, with the exception of the EU which plays a key role as a norm shaper in trade and in environmental negotiations 143 .

In this global context, our hypergraph-based analysis of the ratification of trade and environmental agreements supports the idea that their logic is different (IISD and UNEP, 2014), although the key players are roughly the same. Compared to more traditional analysis of the dynamics of ratification, this approach combining modeling and International Relations theory presents three main contributions. First, it contributes to the interdisciplinary dialogue, particularly between international law and political sociology, allowing results to be compared over a long period of time. It also allow testing the supposed practices and strategies regarding the ratification of international treaties (see e. g. [START_REF] Chang | Strategies of Ratification and the Paris Agreement[END_REF]. Finally, it allows to compare the environmental logic and the trade logic (here in the UN framework) to spot the key States involved. Thanks to the analysis of the political context, we have show that the multilateral summits promoted by the UN have a considerable impact on the signing of treaties, but not necessarily on their ratification or implementation.

CONCLUSION

The comparison of the dynamics of ratifications of two regimes -environment and trade -within the United Nations framework shows that they follow parallel evolution, in spite of the strengthening of their intertwining since the 1990s, notably from an institutional point of view. The UN has a central role in the environmental agenda, which explains the recurrence of multilateral summits since 1972 and the number of agreements signed and ratified by almost all members of the organization. For the trade agenda, on the contrary, the role of the United Nations is becoming less and less important, and the multilateral summits had a very limited impact, so that the economic and trading powers have strategically adopted other negotiating arenas. This explains the main outline of the results obtained from the ratification analysis using hypergraphs, with the absence of some of the major economic and commercial powers at the global level, while the countries that participate little in global trade are generally present. Hypergraph analysis of the ratification dynamics of environmental versus trade agreements highlights the contrast between the two regimes, in particular the identification of the emerging EU community only in the first case. Is it still a "normative power" in the trade framework under the leadership of the United Nations? The mainstream of the economic policy analysis says that the EU has lost its strength since the 2008 crisis and the Chinese rise, but the assessment of the EU's role is still subject to profound divergences. In this sense, our results show that despite the fact that the UN serves as a bridge between the two regimes, it is much more effective in promoting environmental agreements than regulating global trade. Therefore the UN is at the same time central to the environment and marginal to trade agendas144 . However in the future it would be appropriate to extend the analysis undertaken in this work by considering the treaties and agreements ratified in the WTO in relation to the G7 meetings, then G8 and G20 in order to have a second, broader analysis in the sense that it would comply more with the current global (and nevertheless fragmented) governance of commercial and environmental issues (but then without respecting the homogeneity of the sources of the data taken into account) (see also [START_REF] Morin | Mapping the Trade and Environment Nexus: Insights from a New Data Set[END_REF] Finally, the concept of sustainable development cannot be considered as a structuring principle of international relations, given that the trade regime prevails over that of the environment in practice, as demonstrated in particular by the ongoing negotiations of mega-agreements, the TTP and TTIP, and within ASEAN.

  Fig. 11.1 The oriented graph associated with the ratifications of the MEAs by the 197 countries of the world. The vertices

Fig. 11. 2

 2 Fig. 11.2 Top: a graph whose set of vertices is {1, 2, 3, 4, 5, 6} and whose set of edges is {{1,2}, {2,3},{2,4},{3,5},{4,5},{5,6}}. Bottom: A directed graph on the same set of vertices

Fig. 11 . 3

 113 Fig. 11.3 Top: a hypergraph whose set of vertices is {1, 2, 3, 4, 5, 6} and whose set of hyperedges is {{1,2},{2,3,4},{3,4,5}, {5,6}}. Bottom: a directed hypergraph on the same set of vertices and having 4 hyperedges represented par arrow hyperedges going from sources toward targets.

Fig. 11 . 4

 114 Fig. 11.4 Top: example of modeling by a directed graph of a few successive ratifications of the agreement establishing the Caribbean Development Bank. Bottom: modeling by an oriented hypergraph of the same data

Fig. 11. 5

 5 Fig. 11.5 List of the most central countries (ranked from left to right by decreasing embedding centrality) in the hypergraph of ratifications ofUN environmental agreements (1979UN environmental agreements ( -2014) )

  Table 11.3).

	Tab. 11.3 Most central countries in the graph of environmental ratifications
	Closeness centrality	Betweenness centrality
	(rank)	(rank)
	1. Norway	1. Hungary
	2. France	2. Norway
	3. Hungary	3. Lithuania
	4. Luxembourg	4. Belgium
	5. Spain	5. Austria
	6. Netherlands	6. Spain
	7. Finland	7. Estonia
	8. Lithuania	8. Romania
	9. Bulgaria	9. Netherlands
	10. Denmark	10. Finland

  Table 11.4) containing countries from continental Europe, among which 27 are countries of the EU (only Malta is not classified in this group and UK is a member of the EU and belongs to this group over the considered time period).

	Tab. 11.4 Countries constituting a community in the hypergraph of environmental ratifications
	Albania	Austria	Belarus	Belgium	Bulgaria	Croatia
	Cyprus	Czech Rep.	Denmark	Estonia	EU	Finland
	France	Germany	Greece	Hungary	Ireland	Italy
	Latvia	Liechtenstein Lithuania	Luxembourg Moldava	Netherlands
	Norway	Poland	Portugal	Romania	Serbia	Slovakia
	Slovenia	Spain	Sweeden	Switzerland UK	Ukraine

Regional treaties concern restricted communities of States.

According to[START_REF] Krasner | International Regimes[END_REF], p.141, it is "sets of implicit or explicit principles, norms, rules, and decisionmaking procedures around which actor expectations converge, in a variety of areas of international relations."

 120 The WTO is not part of the United Nations, but relations between the two organizations have been governed since 1995 by the "Arrangements for Effective Cooperation with Other Intergovernmental

Organizations".121 The debate on international regimes took shape around the 1970s. Using functional, strategic, and organizational arguments, Keohane and Victor (2010) described a regime complex as "a loosely coupled set of specific regimes".

According to the neoliberal and institutional research in International Relations, neo-realists, like Susan[START_REF] Strange | Towards a pollution-free planet[END_REF], prefer to describe the power structure as material.

Including Goal 9 which deals with sustainable and inclusive industrialization.

https://www.unenvironment.org/ Accessed 9 Feb 2018

CITES: https://cites.org/eng/disc/text.php Accessed 9 Feb 2018

https://sustainabledevelopment.un.org/index.php?menu=1225 Accessed 9 Feb 2018

Cartagena Protocol, adopted on 29 January 2000 and entered into force on 11 September 2003: http://bch.cbd.int/protocol/ Accessed 9 Feb 2018

Last WTO round of negotiations began in 2001, the Doha Development Program aimed to reduce trade barriers and facilitate the expansion of world trade.

https://ec.europa.eu/clima/policies/international/negotiations/paris_fr Accessed 9 Feb 2018

The exit of the United Kingdom from the European Union voted in 2016.

https://treaties.un.org/pages/Treaties.aspx?id=27&subid=A&lang=en Accessed 9 Feb 2018

There is a directed link from agreement A1 to agreement A2 if A2 is the first agreement ratified after agreement A1 by a same country.

There is a directed link from country C2 to country C1 if C2 is the first country after C1 to have ratified the same MEA.

We describe as "stable" the informal communities presented here in the sense that the list of countries that each one of them contains is found whatever the algorithm used.

Indeed, none of the other formal communities (economic, political, strategic, security, ...) -ASEAN, BRICs, African Union, MERCOSUR, ... -appear in any of the countries communities induced by the history of ratifications.

The choice in the convention of the sign in the definition of B has no effect in this approach, indeed if the matrix built with the converse convention we have and .

See the website of the Amazon Cooperation Treaty Organization http://otca.info/portal/Accessed 9 Feb 2018

A more detailed analysis will have to take into account the appearance and the disappearance of States and to establish the comparisons of graphs over the same time period.

A research track to explore in political science would be to compare whether left-dominated parliaments vote on environmental treaties more quickly and those dominated by the liberal right, on the contrary, make trade treaties a priority. This is beyond our analytical objective and would only be useful in some countries, but probably not for the political regimes of China and Russia. Moreover, the left / right divide is no longer as clear as in the last century in the West.

Brazil, South Africa, India, China.

See, for example, the One Planet Summit held in Paris on December 12, 2017.

Certainly, the creation of the World Trade Organization (WTO) outside the UN framework is a central factor in understanding the governance of global trade. But the ratifications analyzed are those of the UN for the sake of comparing two initiatives within the same system, the UN.

Acknowledgments. Ana Flávia Barros-Platiau wishes to thank the agency CAPES (Programas Estratégicos -DRI, call 43/2013) of the Ministry of Education in Brazil and the CIRCULEX project, founded by ANR (French National Agency for Research). Pierre Mazzega conducts this research as part of the project GEMA «Gouvernance Environnementale: Modélisation et Analyse» founded by CNRS (French National Center for Scientific Research) through the program Défi interdisciplinaire: «InFIniti» Interfaces Interdisciplinaires Numérique et Théorique.

obtained from the hypergraph-based analysis corroborate the thesis that the EU is both a material and normative structure [START_REF] Laïdi | La norme sans la force. L'énigme de la puissance européenne[END_REF] in environmental matters. As far as the rest of the world is concerned, most of the time regional organizations have failed to generate deep and effective cooperation to address environmental challenges, thus regional governance is less obvious. The case of the governance of the Amazon is a typical example: the Amazon Cooperation Treaty 137 signed in 1978 may suggest that regional cooperation on environmental issues is effective, while its impact on the foreign policies of the Member States has always been and remains very limited. It is therefore not surprising that they do not form regional communities appearing in the graphs constructed from ratifications.

Results in the field of trade

We apply the same method of modeling and clustering for UN trade-related treaties. We have 834 ratifications from 1963 to 2014, covering 23 commercial treaties listed in Chapter X of the United Nations Treaty Collection. There is a large, heterogeneous community (Table 11.5) that contains none of the world's top 10 economic powers. We have another, smaller, emerging community that contains three of the world's major economic powers (China, Japan and USA in community C2 in Table 11.5).

Tab. 11.5 Three communities -C1 to C3detected in the hypergraph of ratifications of UN trade agreements C1 Antigua and Barbuda, Azerbaïdjan, Bahreïn, Bolivia, Bosnia and Herzegovina, Brunei, Bulgaria, Costa-Rica, Croatia, United Arab Emirates, Eritrea, Estonia, Greece, Guatemala, Hong-Kong, Cayman Islands, Marshall Islands, Solomon Islands, Turks and Caicos Islands, British Virgin Islands, Iceland, Kiribati, Latvia, Lithuania, Malta, Micronesia, Monaco, Montserrat, Nauru, Nicaragua, Niue, Oman, Palau, Portugal, Czech Republic, San Marino, Serbia, Slovakia, South Sudan, East Timor, Turkmenistan, Tuvalu, Vanuatu C2 Belgium, China, Denmark, Egypt, Gabon, Guinea, Japan, Liberia, Libya, Malaysia, Republic of Korea, Thailand, USA, Zambia C3 Comoros, Gambia, Honduras, Iraq, Lesotho, Malawi, Niger, Qatar, Samoa, Senegal, Vietnam, Yemen

Concerning the embedding centralities (shown in Figure 11.6), we have a central position of some African countries (there are 5 treaties related to Africa), the USA and China being at the 6th and 9th ranks respectively.


Vincent Ranwez

Nathalie Chantret

Frédéric Delsuc

Aligning protein-coding nucleotide sequences with MACSE

Keywords: multiple sequence alignment, molecular evolution, phylogenomics, pseudogenes, metabarcoding, bioinformatics pipelines. Running head: Aligning protein-coding nucleotide sequences with MACSE

Most genomic and evolutionary comparative analyses rely on accurate multiple sequence alignments. With their underlying codon structure, protein-coding nucleotide sequences pose a specific challenge for multiple sequence alignment. Multiple Alignment of Coding Sequences (MACSE) is a multiple sequence alignment program that provided the first automatic solution for aligning protein-coding gene datasets containing both functional and nonfunctional sequences (pseudogenes). Through its unique features, reliable codon alignments can be built in the presence of frameshifts and stop codons suitable for subsequent analysis of selection based on the ratio of nonsynonymous to synonymous substitutions. Here we offer a practical overview and guidelines on the use of MACSE v2. This major update of the initial algorithm now comes with a graphical interface providing user-friendly access to different subprograms to handle multiple alignments of protein-coding sequences. We also present new pipelines based on MACSE v2 subprograms to handle large datasets and distributed as Singularity containers. MACSE and associated pipelines are available at: https://bioweb.supagro.inra.fr/macse/.

Introduction

Multiple sequence alignment (MSA) is a crucial step in many evolutionary analyses.

Nonetheless, the most commonly used alignment tools overlook the underlying codon structure of protein-coding nucleotide sequences. Accounting for this structure is useful for improving the proposed alignment, but it is also a prerequisite for some downstream analyses such as selection pressure analysis based on the nonsynonymous to synonymous substitution ratio (dN/dS). MACSE [START_REF] Ranwez | MACSE: Multiple Alignment of Coding SEquences accounting for frameshifts and stop codons[END_REF] was specifically designed to align protein-coding nucleotide (NT) sequences with respect to their amino acid (AA) translation while allowing NT sequences to contain multiple frameshifts and/or stop codons (Figure 1). MACSE thus provided the first automatic solution for aligning protein-coding gene datasets containing nonfunctional sequences (pseudogenes) without disrupting the underlying codon structure. It has also proved useful in detecting undocumented frameshifts in public database sequences and in aligning next-generation sequencing reads/contigs against reference coding sequences [START_REF] Dunn | Agalma: an automated phylogenomics workflow[END_REF], especially for metabarcoding analysis [START_REF] Yu | Biodiversity soup: metabarcoding of arthropods for rapid biodiversity assessment and biomonitoring[END_REF].

The first MACSE release contained a single program that took coding nucleotide sequences as input and aligned them with respect to their codon structures [START_REF] Ranwez | MACSE: Multiple Alignment of Coding SEquences accounting for frameshifts and stop codons[END_REF]. This early command line version included multiple options that allowed end-users to fine-tune the alignment options, but its use could be tedious. In order to streamline the program application, we built several companion tools that exploit the core MACSE algorithm to tackle related problems [START_REF] Ranwez | MACSE v2: toolkit for the alignment of coding sequences accounting for frameshifts and stop codons[END_REF]. The resulting MACSE v2 toolkit was hence much more powerful as it provided the building blocks to construct powerful alignment pipelines. However, the number of available subprograms and options featured in this version was problematic for occasional users. We finally proposed a Graphical User Interface (GUI) to improve the end-user experience. This GUI is useful for new users who can test MACSE on a few datasets without first having to deal with the command line option complexity. Moreover, the GUI displays the command line corresponding to selected options, thus streamlining the transition from the GUI to the command line version.

When aligning protein-coding nucleotide sequences, it is often necessary to chain several steps such as sequence prefiltering (e.g. to remove unwanted UTR fragments) and then producing and filtering the nucleotide alignment based on its amino acid translation. We have successfully used MACSE to design effective pipelines for various tasks, such as aligning thousands of orthologous sequence datasets from the OrthoMaM database [START_REF] Scornavacca | OrthoMaM v10: Scaling-up orthologous coding sequence and exon alignments with more than one hundred mammalian genomes[END_REF] or correcting tens of thousands of barcoding reads [START_REF] Leray | A new versatile primer set targeting a short fragment of the mitochondrial COI region for metabarcoding metazoan diversity: application for characterizing coral reef fish gut contents[END_REF]. In this chapter, we introduce the specificity and key functionalities of MACSE v2. We outline some standard use cases to illustrate how MACSE subprograms can be chained to produce high quality protein-coding sequence alignments in various contexts. All examples mentioned in this chapter can be downloaded from the MACSE website https://bioweb.supagro.inra.fr/macse/. The two main pipelines discussed here are also available as Singularity containers [START_REF] Kurtzer | Singularity: Scientific containers for mobility of compute[END_REF] for easy installation and use on high performance computing clusters.

MACSE basic usage and possible troubleshooting

Getting started

MACSE is written in JAVA and hence runs in a straightforward way on any computer that has a Java Runtime Environment (JRE) release installed. If needed, JRE is available for free download on the Java website (www.java.com). The most recent MACSE release is then available for download on the MACSE website (https://bioweb.supagro.inra.fr/macse). This website also contains detailed documentation with several examples for each subprogram, as well as detailed explanations of possible applications. Each MACSE release is a single jar file. The latest 2019 release is macse_v2.03.jar. It can be launched by typing the following command: java -jar macse_v2.03.jar ð Launches the GUI version of MACSE (Figure 2). MACSE may also be launched by double clicking on the macse_v2.03.jar file. In both cases this will launch the graphic user interface of MACSE. Anything typed after macse_v2.03.jar will be considered as options passed to MACSE whereas anything typed before will be considered as Java virtual machine options. The command line version and GUI versions of MACSE may be run via the same MACSE jar file. In the absence of any option, the GUI version is launched whereas the command line version is launched as soon as at least one option is submitted to MACSE. As MACSE is a set of subprograms, the "-prog" option allows users to specify the subprogram to be executed. This is a mandatory option, but if the user does not know the subprogram names, any name may be submitted and a help message with a list of possible subprograms will be displayed: The "-help" option provides more detailed information and the complete list of options: java -jar macse_v2.03.jar -prog alignSequences -help ð Prints a detailed help message of the alignSequences subprogram presenting all available options. Documentation may also be accessed when using GUI (Figure 2). Once the subprogram of interest is selected via the "Programs" menu, a brief description of this subprogram appears at the top of the GUI. Options are grouped into categories: mandatory options, output file names, alignment parameters, etc. Once an option field is selected by clicking on it, the related documentation is displayed at the top of the GUI. The command line corresponding to the graphically selected options appears at the bottom of the GUI. Copying this command line before running MACSE via the GUI, ensures the traceability of the analysis, while also enabling the user to easily run the same analysis via the command line without having to manually type the command line.

Hereafter we shorten the command line by omitting the MACSE release version. Note that this can also be done by renaming the downloaded jar file by using a symbolic link, by defining an environment variable on the system, or through any other technical solution that suits the user. For enhanced readability, we also extend the command to several lines, with one option per line, and indicate the option name in bold font. It follows that a command such as: java -jar macse_v2.03.jar -prog alignSequences -help will hence be written in the rest of this chapter as: java -jar macse.jar -prog alignSequences -help

Obtaining suitable input sequences

The most frequent pitfall encountered by new MACSE users arises when the user provides an input sequence file containing fragments of nonprotein-coding nucleotide sequences. In case of unexpected MACSE behavior, the first thing to check is that the input sequence file contains nucleotide sequences in a valid fasta format. To do so, users may try to open it with a sequence/alignment viewer such as SeaView [START_REF] Gouy | SeaView version 4: a multiplatform graphical user interface for sequence alignment and phylogenetic tree building[END_REF] or AliView [START_REF] Larsson | AliView: a fast and lightweight alignment viewer and editor for large datasets[END_REF], which are very convenient to visualize sequences and alignments produced by MACSE. These viewers accept the '!' character in both nucleotide and amino acid sequences and it is also possible to visually highlight the codon structure of the aligned nucleotide sequences.

A second aspect to verify is that the sequences are all in forward direction. This could be harder to check depending on how the sequences have been obtained, but MACSE will not be able to correctly align sequences in reverse orientation. A solution could be to blast them against public protein databases using blastx. All sequences for which the best hit occurs with a negative reading frame should probably be reverse translated. Alternatively, MAFFT [START_REF] Katoh | MAFFT multiple sequence alignment software version 7: improvements in performance and usability[END_REF] has convenient functionalities (--adjustdirection or --adjustdirectionaccurately) that can reorient nucleotide sequences in a multiple sequence alignment.

The last point is to ensure that the input sequences do not contain nonprotein-coding fragments. Typically, nonprotein-coding fragments in CDS are found when UTRs (or introns) are not trimmed out. This often occurs when dealing with de novo assembled contigs. Contigs should have their nonprotein-coding parts removed before alignment with MACSE. This could be done using dedicated annotation tools such as prot4EST [START_REF] Wasmuth | prot4EST: translating expressed sequence tags from neglected genomes[END_REF], UTRme [START_REF] Radío | UTRme: a scoring-based tool to annotate untranslated regions in trypanosomatid genomes[END_REF] or other similar tools. Alternatively, the MACSE trimNonHomologousFragments subprogram may be used. This subprogram will not focus specifically on noncoding regions but it will mask any long fragment that is nonhomologous (at the amino acid level) to other sequences.

The trimNonHomologousFragments subprogram was initially developed to filter long insertions that may be caused, for instance, by annotation errors such as undetected introns or UTRs. Having to handle long insertions in one or a few sequences could drastically slow down the alignment process. Alignment of these nonhomologous regions is mostly useless, as they would probably be removed by any alignment filtering tools in subsequent analyses.

The trimNonHomologousFragments subprogram mainly aims at removing long nonhomologous fragments but keeps smaller ones to limit the risk of removing fragments that are actually homologous. Several options are provided to adjust the stringency of this prefiltering step but we advise against being too strict at this early stage of the analysis. At this stage, a sequence that has been trimmed along almost its entire length is likely not at all homologous to other sequences, so it might be better to remove it completely. For a sequence to be kept in the output fasta file, the percentage of this sequence that should remain after homology prefiltering, can be adjusted (-min_homology_to_keep_seq). Full details of this prefiltering process can be output in a fasta file (-out_mask_detail) in which the original sequences are written using a mix of upper case (for preserved nucleotides) and lower case (for removed nucleotides) letters. In any case, the trimNonHomologousFragment subprogram outputs a CSV file summarizing the impact of this prefiltering process on each sequence. This file contains the number of nucleotides (including, or not, noninformative 'N' nucleotides) that have been removed from the whole sequence and from its extremities. Note that the name of this output file can be specified (-out_trim_info option): java -jar macse.jar -prog trimNonHomologousFragments -seq ENSG00000125812_GZF1_raw.fasta -out_trim_info output_stats.csv -min_homology_to_keep_seq 0.6 ð Prefilters long nonhomologous sequence fragments; if more than 60% of a sequence is filtered then this sequence is entirely removed.

Most common usages

The alignSequences subprogram is the core feature of the MACSE v2 toolkit. Its single mandatory option is a fasta file containing the coding nucleotide sequences to align. These nucleotide sequences need to be in forward direction, as alignSequences ignores their reverse complements, and they should be protein-coding sequences all along. Indeed, as alignSequences relies on sequence protein translations to align sequences, if there are any UTR or intron fragments, alignSequences would waste a lot of time producing meaningless alignments.

To align CDSs of the Pg3 gene in the Medicago genus [START_REF] Ho-Huu | Contrasted patterns of selective pressure in three recent paralogous gene pairs in the Medicago genus (L.)[END_REF] stored in the fasta file named Pg3_Medicago.fasta, the simplest command line is: java -jar macse.jar -prog alignSequences -seq Pg3_Medicago.fasta ð Aligns sequences contained in the Pg3_Medicago.fasta file with default parameters (Figure 1).

The alignSequences subprogram, like most other MACSE subprograms, generates two fasta files, one containing the aligned protein-coding nucleotide sequences as codons and another containing the corresponding amino acid alignment. By default, the names of these files are based on the input file name but the desired output file names can be specified using the "-out_NT" and "-out_AA" options.

Since MACSE relies on amino acid translation, it lets you specify the genetic code adapted to your protein-coding sequences. The NCBI has assigned a unique number to each genetic code, which is convenient to easily specify which code should be used. By default, MACSE uses "the standard code" but a different default genetic code may be specified for a dataset using the "-gc_def" option. For instance, the invertebrate mitochondrial code is the fifth on the NCBI list. The command line below is hence adapted to align mitochondrial COX1 sequences of grasshoppers: java -jar macse.jar -prog alignSequences -seq grasshoppers_COX1.fasta -gc_def 5 ð Aligns invertebrate mitochondrial sequences with the specified genetic code "5".

If the dataset contains sequences that use different genetic codes, they will have to be specified in a separated text file ("-gc_file" option) containing, on each line, the name of a sequence and the number of the corresponding genetic code. Any sequence absent from this file will be translated using either the genetic code specified by the -gc_def option or, in the absence of this option, the standard genetic code. For example, to align metazoan mitochondrial COX1 sequences from different phyla [START_REF] Singh | Tunicate mitogenomics and phylogenetics: peculiarities of the Herdmania momus mitochondrial genome and support for the new chordate phylogeny[END_REF], the following command may be used to specify the 5 different genetic codes with the -gc_file option: The key options described so far are present in most MACSE subprograms.

Another set of options concerns the costs used to compare alternative alignments and select the best one. Like most alignment software, MACSE lets users tune the ratio between gap extension cost and gap opening cost. Increasing the gap opening cost (or decreasing the gap extension cost) will tend to favor alignments where gaps are grouped in long stretches.

MACSE also allows adjustment of the relative cost of gaps appearing at the sequence extremities (terminal gaps) as opposed to those appearing inside the sequences (internal gaps).

By default, external gaps are less penalized as they often reflect the fact that a sequence was partially sequenced rather than that a nucleotide insertion/deletion has occurred. Similarly, one or two missing nucleotides at the sequence extremities lead to incomplete codons (hence technically frameshifts) but such external frameshifts should not be as penalized as those occurring in the middle of a sequence (internal frameshifts). When a dataset contains a mix of genes and pseudogenes or of high quality sequences (e.g. a CDS from the Swiss-Prot database) and low quality sequences (e.g. de novo assembled contigs), it is also relevant to assign different penalties for the frameshifts and stop codons appearing in such different types of sequence. To deal with such cases, MACSE allows users to define two sets of sequences by providing two fasta files as input instead of a single one. The most reliable sequences are in the file provided by the "-seq" options, whereas the least reliable ones are in the file provided by the "-seq_lr" option. As it allows stop codons and frameshifts, and allows users to assign them different penalty costs based on the sequence in which they appear and on their position within this sequence, MACSE features many more cost-related options than usual alignment software. These different cost options are summarized in Tables 1 and2. As frameshifts and stop codons are much less unexpected in pseudogenes than in nucleotide sequences coding for a functional protein, users may opt to decrease the cost of such events.

For instance, the following parameters and options may be used to align both functional and pseudogenized sequences from the mammalian CHIA4 gene [START_REF] Emerling | Evaluating the usefulness of alignment filtering methods to reduce the impact of errors on evolutionary inferences[END_REF]: ð Aligns a mix of functional CDS and pseudogenes (Figure 4).

The default parameters work fine for most cases, but in the MACSE online documentation we provide some guidelines to help adjust parameter costs for some specific types of sequence datasets. Note that the default values for each parameter appear in the GUI.

MACSE-based pipelines suitable for datasets of various sizes

Pipelines based on MACSE as Singularity containers

We designed MACSE V2 as a toolkit dedicated to multiple alignment of protein-coding sequences that can be leveraged via both the command line and a Graphical User Interface (GUI). We used this toolkit to develop some convenient pipelines as described in this chapter.

We share these pipelines as Singularity containers [START_REF] Kurtzer | Singularity: Scientific containers for mobility of compute[END_REF] since they also depend on a few other tools and some environment setups. A Singularity container contains everything needed to execute a specific task. The developer building the container has to handle dependencies and the environment configuration so that end-users will not need to worry about this. To run a Singularity container named "container.sif" that is in your current directory, just type the following command in your Linux terminal: singularity run ./container.sif

Basic pipelines and batch facilities

Using the command line version of MACSE, it is quite easy for bioinformaticians to build an analysis pipeline chaining multiple MACSE subprograms to conduct tailored-made analyses on several input datasets. Scripting language or, even better, workflow managers are tools of choice for such tasks, but not everyone masters such tools. The "multiPrograms" subprogram of MACSE allows basic scripting for nonbioinformaticians. Its main option (-MACSE_command_file) allows specifying the file containing a list of MACSE commands that will be run sequentially. Each line of this command file must contain a single MACSE command starting by "-prog" (i.e. omitting "java -jar macse.jar"). The '@' character can be used before each file path to point towards the directory containing the command file itself (useful if the command file is not in the current directory). To prepare this command file, the end-user can apply the GUI on a single example to generate the required command line, copy this command line (using copy/paste or the "copy to clipboard" button) multiple times into a This is not the case with MACSE because frameshifts can potentially be introduced anywhere in a sequence, at any step of the alignment process. Amino acids of a given nucleotide sequence could therefore vary during the alignment process depending on the reading frames used at a given stage to translate the sequence. Optimizations generally used in alignment software are thus harder to incorporate into MACSE because the amino acid sequences may vary along the alignment process and different reading frames can be used to translate a single sequence. This specificity is a powerful feature of MACSE but it increases the memory requirements and computation times. Thus, for datasets containing numerous long sequences, using the core alignSequences subprogram of MACSE with default options may not be feasible. In such cases, the alignSequences subprogram could be run to obtain a draft alignment that will hopefully unravel most frameshifts. Different strategies are presented in the following section to get the most of MACSE when dealing with datasets of various sizes.

MACSE is run through the Java virtual machine, so for relatively large datasets the memory that Java is allowed to use will have to be increased via the "-Xmx" option. This is not a MACSE option per se, but it is definitely essential:

java -jar -Xmx 600m macse.jar -prog alignSequences ðAligns larger datasets by allocating more memory to Java using the Xmx option.

Aligning dozens of sequences

If the dataset is not too large, MACSE can be used to perform the whole alignment itself. We advise using this strategy, when possible, to get the most accurate frameshift placements. The command line for such an analysis could be as simple as launching MACSE with default options and allocating some extra memory for the Java virtual machine:

java -jar -Xmx 600m macse.jar -prog alignSequences -seq Pg3_Medicago.fasta ð The most simple MACSE use case.

However, in most cases, it could be worth prefiltering possible UTRs or other long nonhomologous fragments contained in the sequences using the trimNonHomologousFragment MACSE subprogram. Some analyses, e.g. dN/dS estimation, are highly sensitive to alignment errors, which are favored by the presence of even short nonhomologous fragments.

For such analyses, we strongly advise [16] also using HMMCleaner [17] to post-filter less reliable parts of your amino acid alignment and report this masking/filtering at the nucleotide level. The filtered alignment obtained with HMMCleaner may contain some isolated codons, surrounded only by gaps or masked codons, as well as sequences with very few remaining codons. It would make sense to remove such sequences and filter isolated codons. The reportMaskAA2NT subprogram of MACSE may be used to report the filtering performed by

HMMCleaner at the nucleotide level and to perform some post-processing filtering of such isolated codons and patchy sequences. By using MACSE subprograms for these various filtering steps, the traceability of the filtering process is achieved by keeping track of every single nucleotide that has been masked. Finally, it could be convenient to be able to observe frameshifts and stop codons in the final alignment, but their presence might be problematic for downstream analyses. The alignments obtained with MACSE may be post-processed to replace stop codon and frameshift symbols by more standard ones using the exportAlignment subprogram of MACSE. Producing a reliable alignment of a dataset may hence require chaining several steps using HMMCleaner together with multiple MACSE subprograms. We provide a pipeline to automatize this process, while letting end-users turn on or off the various filtering steps. The script, written in Bash, is encapsulated in a Singularity container.

We called this pipeline MACSE_ALFIX (Figure 5), since it is mostly based on MACSE and chains the ALigning, Filtering and eXporting steps. The script produces several output files that are stored in a single directory and named using a common prefix. The three mandatory options of this script are therefore the input file name, the output directory name, and the prefix of the output file names singularity run ./MACSE_ALFIX_v01.sif --in_seq_file LOC_48720.fasta

--out_dir RES_LOC_48720

--out_file_prefix LOC_48720

ð The most simple use case of the MACSE_ALFIX pipeline.

Aligning hundreds of sequences

The computing and memory resources required by MACSE depend on the number and length of the sequences to align. The longest sequence plays a key role in the memory and computation time required by MACSE. When dealing with some long sequences, it may be necessary to significantly increase the memory allocated to the Java virtual machine (using the "-Xmx option") but the computation time with the default options of the alignSequences subprogram may still be prohibitive. The v2 release of MACSE introduced several options that help balance the computation time and alignment accuracy by limiting the number of alignment refinement steps ("-max_refine_iter") or by gradually narrowing the alignment refinement steps to more local improvements ("-local_realign_init" and "-local_realign_dec" options). As an illustrative example, to build the tenth release of the OrthoMaM database, we had to build more than 20,000 alignments containing up to 116 sequences that could be several Kb long. We designed a pipeline based on MACSE v2 that is well suited for this task.

The filtering steps are similar to those of the MACSE_ALFIX pipeline but the main alignment step here is done by chaining the alignSequences subprogram with MAFFT. The key is to use alignSequences with options that enable MACSE to quite rapidly generate a draft alignment of the coding nucleotide sequences in which potential frameshifts are identified.

The resulting amino acids sequences are then aligned using MAFFT, which is much faster than MACSE for aligning fixed amino acid sequences. The drawback of this approach is that some frameshifts may not be as accurately positioned within sequences as they would be with the MACSE_ALFIX pipeline, which may lead HMMCleaner to remove some extra residues.

For large datasets of sequences expected to contain few frameshifts, as was the case with the OrthoMaM CDS database, this strategy seems to work remarkably well. The OMM_MACSE pipeline (Figure 6) has the same mandatory options as the MACSE_ALFIX pipeline: singularity run ./OMM_MACSE_v10.01.sif --in_seq_file LOC_48720.fasta

--out_dir RES_LOC_48720

--out_file_prefix LOC_48720

ð The most simple use case of the OMM_MACSE pipeline for larger datasets.

Note that, if a dataset contains some pseudogenes or contigs assembled de novo, it may be worth using the refineAlignment subprogram of MACSE to polish the alignment obtained by MAFFT and adjust frameshift positions before applying HMMCleaner. When dealing with a handful of clusters, several alignTwoProfiles invocations may be chained to build the global alignment. The idea here is to take the output of one alignTwoProfiles invocation as the p1 profile for the next one. For instance, four alignments can be combined using a MACSE command file as follows:

Aligning thousands of sequences

java -jar macse.jar -prog multiPrograms -MACSE_command_file align_multi.macse where align_multi.macse is a text file containing this four lines:

-prog alignTwoProfiles -p1 ali1.fasta -p2 ali2.fasta -out_NT ali12.fasta -prog alignTwoProfiles -p1 ali12.fasta -p2 ali3.fasta -out_NT ali123.fasta -prog alignTwoProfiles -p1 ali123.fasta -p2 ali4.fasta -out_NT aliAll.fasta ð Basic strategy to align four previously computed alignments.

Using this basic strategy, the final alignment will depend on the order in which the profiles are sequentially added. Under the same rationale as for usual multiple sequence alignment, it would be better to first align the most similar alignments. More elaborate strategies can be designed using MACSE, but this is beyond the scope of this chapter.

Metabarcoding applications

Metabarcoding analysis often requires handling of thousands of sequences. Such datasets are not directly tractable with the alignSequence subprogram of MACSE, but they can be handled by sequentially adding the newly obtained sequences to a reference alignment containing sequences of related taxa for the targeted barcoding locus (e.g. COX1, matK, rbcL, etc...). We successfully used this approach in the Moorea BIOCODE project on coral reef biodiversity [START_REF] Leray | A new versatile primer set targeting a short fragment of the mitochondrial COI region for metabarcoding metazoan diversity: application for characterizing coral reef fish gut contents[END_REF].

The initial alignment can be either built from scratch or from an improved version of an existing alignment (using the refineAlignment subprogram of MACSE to unravel some potential sequencing errors/frameshifts). The reference alignment does not need to be huge.

For instance, rather than using all available COX1 sequences available in the BOLD database [START_REF] Ratnasingham | BOLD: The Barcode of Life data system (http://www. barcodinglife. org)[END_REF], for a given taxonomic group it may be better to collect some carefully checked sequences that reflect the molecular diversity of the taxonomic groups of interest. Those carefully selected sequences may be aligned using one of the previously detailed strategies (e.g. using the MACSE_ALFIX pipeline). Then, using the enrichAlignment subprogram, problematic reads can be detected while adding the remaining reads to the reference alignment. By default, enrichAlignment adds sequences to an alignment (referred to as the initial alignment) in sequential mode: each sequence is aligned with the current alignment, i.e.

that contains the sequences of the initial alignment plus those previously added. Some enrichAlignment options allow users to set thresholds/conditions for a sequence to be discarded and/or to specify that all new sequences must be aligned with the unmodified initial alignment.

The following command line may be used to sequentially enrich an alignment by adding only reads that do not induce too many frameshifts (-maxFS_inSeq), stop codons (- Alternatively, for large datasets, it could be better to work with a fixed alignment (option -fixed_alignment_ON). Working with a fixed alignment is especially convenient when dealing with (meta)barcoding data since such analyses usually require handling of numerous highly similar sequences that are not expected to contain indels. When using this option, all sequences to be added are compared with the same initial alignment. The key advantage is that this allows task parallelization. For example, if there are 50,000 reads/sequences to be added to the initial alignment, this large dataset may be split into 50 sets of 1,000 sequences each and then the tasks may be run in parallel on 50 computers/CPUs. Moreover, if each of the 50,000 sequences can be correctly aligned with the original alignment without inserting gap events in this original alignment, then the aligned version of the 50,000 sequences (that were independently computed) can be merged to the initial alignment to get a valid global alignment.

The enrichAlignment MACSE subprogram not only produces the two usual FASTA output files respectively containing the nucleotide and amino acid alignments, but also a tabular text file providing detailed information for each read, including whether it has been added or not and how many stop codons, frameshifts and insertion events are required to align this read with the reference alignment. This helps to understand why some reads were discarded, to spot reads that have been added but contain few unexpected events (e.g. one internal frameshift) and to compute some overall statistics regarding the input read quality.

Conclusion

This chapter describes typical MACSE use cases along with associated command lines and

provides two examples of pipelines built from the different MACSE subprograms. In its latest version, MACSE is suitable for bioinformaticians who need to create their own pipelines and for finely controlling the parametering of each subprogram, but it is also accessible to nonspecialists via its graphical interface.

Figure 6

Schematic representation of the OMM_MACSE pipeline. Boxes represent input/output sequence data (blue when unaligned and green when aligned) and are accompanied, on the left, by a small illustrative diagram. On the arrows it is mentioned which subprogram/tool is used and whether this step is optional or not (on/off button). On the right side, additional output files generated are represented in order to provide users with a full traceability picture.

The central part of the pipeline, with a colored background, corresponds to the alignment and filtering of the homologous sequences. This part is the only one that differs from the MACSE_ALFIX pipeline (Figure 5) and is better suited for large datasets.

  java -jar macse_v2.03.jar -prog wrongProgram ð Launches the command line version of MACSE, and print a help message listing all valid subprograms with a one-line description of each of them. Once the name of the subprogram of interest has been selected, e.g. alignSequences, a brief help message for this subprogram can be displayed by invoking it without further options and a description of what this subprogram is useful for and a list of mandatory options will be printed: java -jar macse_v2.03.jar -prog alignSequences ð Prints a basic help message of the alignSequences subprogram focusing on its mandatory options.

  java -jar macse.jar -prog alignSequences -seq Singh2009_cox1.fasta -gc_file Singh2009_cox1_gc_file.txt -out_NT Singh2009_cox1_NT.fasta -out_AA Singh2009_cox1_AA.fasta ð Aligns metazoan mitochondrial sequences with their corresponding genetic codes (Figure 3). The translateNT2AA sub-program could also be used to simply translate protein-coding sequences using either the default standard genetic code if not specified or the genetic code specified using the -gc_def and -gc_file options: java -jar macse.jar -prog translateNT2AA -seq Singh2009_cox1.fasta -gc_file Singh2009_cox1_gc_file.txt ð Translates metazoan mitochondrial sequences with their corresponding genetic codes.

  text file and then replace the initial dataset name by a different one on each line. The basic usage of this subprogram is: java -jar macse.jar -prog multiPrograms -MACSE_command_file align_multi.macse ð Launches all MACSE commands stored in the align_multi.macse file; for instance, to align sequences from three loci this file contains three lines:-prog alignSequences -seq LOC_19470.fasta -prog alignSequences -seq LOC_48720.fasta -prog alignSequences -seq LOC_72220.fasta When dealing with amino acid translation of nucleotide coding sequences, it is necessary to handle a larger alphabet (20 amino acids versus only four possible nucleotides) but then the sequences are three times shorter. However, because MACSE aligns protein-coding nucleotide sequences while accounting for their amino acid translations in the three possible reading frames, it needs to cope with longer nucleotide sequences and a larger amino acid alphabet. Moreover, most algorithmic optimizations of amino acid sequence alignment rely on the fact that their amino acid sequences are invariable and gaps can be inserted only between amino acids. This means that amino acids never change throughout the alignment process.

1 ð

 1 maxSTOP_inSeq) and insertion (maxINS_inSeq) events: java -jar macse.jar -prog enrichAlignment -align Moorea_BIOCODE_small_ref.fasta Enrich an initial alignment by conditionally adding sequences to it.

Table 1 : MACSE options to adjust stop codon and frameshift costs in sequences.

 1

		Internal		Terminal
		frameshift	stop	frameshift	stop
	Reliable sequences	-fs	-stop	-fs_term	--
	Less reliable sequences	-fs_lr	-stop_lr	-fs_lr_term	--

Table 2 : MACSE options to adjust gap costs.

 2

		Internal gap		Terminal gap
	Sequence \ event	opening	extension	opening	extension
	Any sequences	-gap_op	-gap_ext	-gap_op_term gap_ext_term

Acknowledgments

We thank François Lechevallier for developing the website hosting MACSE v2, Jimmy Lopez and Khalid Belkhir for deploying MACSE v2 and the OMM_MACSE pipeline as web services on the Montpellier Bioinformatics Platform (MBB). This work was supported by the Agence Nationale de la Recherche "Investissements d'avenir/Bioinformatique" (ANR-10-BINF-01-02 Ancestrome project), Labex CeMEB "Centre Méditerraneen de l'Environnement et de la Biodiversité" (ANR-10-LABX-0004), and the European Research Council (ERC-2015-CoG-683257 ConvergeAnt project). This is contribution ISEM 2019-xxx of the Institut des Sciences de l'Evolution de Montpellier.

Figures

Figure

 1MACSE alignment of a set of nucleotide sequences containing functional genes as well as pseudogenes (marked by a white star). The nucleotide alignment (NT) and its amino acid (AA) translation are edited with SeaView ('codon-colors' option for the NT alignment).

Frameshifts caused by deletions and insertions are represented by the '!' character. A white frame highlights Frameshifts and stop codons.

Figure 2

Presentation of the MACSE graphical user interface showing the different parts of the main window: the "program" menu allowing users to choose the subprograms accompanied by a table listing all of them (with their mandatory options and the required files) and the location where each element can be found (where a brief description of the selected subprogram or option can be found, the different menus, the command line etc.). 3 MACSE alignment of 54 metazoan mitochondrial COX1 sequences from Singh et al. [START_REF] Singh | Tunicate mitogenomics and phylogenetics: peculiarities of the Herdmania momus mitochondrial genome and support for the new chordate phylogeny[END_REF] using five different mitochondrial genetic codes corresponding to the different taxonomic groups. The nucleotide alignment (NT) and its amino acid (AA) translation are edited with SeaView ('codon-colors' option for the NT alignment). 4 MACSE alignment of 48 mammalian CHIA4 nucleotide sequences from Emerling et al. [START_REF] Emerling | Evaluating the usefulness of alignment filtering methods to reduce the impact of errors on evolutionary inferences[END_REF] containing 18 functional genes and 30 pseudogenes (_pseudo). The nucleotide alignment and its AA translation are edited with SEAVIEW ('codon-colors' option for the NT alignment).

Figure

Figure

Frameshifts caused by deletions are represented by the '!' character. A white frame highlights Frameshifts and stop codons.

Figure 5

Schematic representation of the MACSE_ALFIX pipeline. Boxes represent input/output sequence data (blue when unaligned and green when aligned) and are accompanied (on the left) by a small illustrative diagram. On the arrows it is mentioned which subprogram/tool is used and whether this step is optional or not (on/off button). On the right side, additional output files generated are represented in order to provide users with a full traceability picture.

The central part of the pipeline, with a colored background, corresponds to the alignment and filtering of the homologous sequences that could be a bottleneck for large datasets.