diff --git a/.gitignore b/.gitignore
index 1ead8deac6ed38153d0b52483d839074648e1213..5e5a444070c0a2131398da98599a24bf23b2333b 100755
--- a/.gitignore
+++ b/.gitignore
@@ -3,4 +3,5 @@
 work/
 work/*
 bin/*
-results/*
\ No newline at end of file
+results/*
+.Rproj.user
diff --git a/LICENSE b/LICENSE
deleted file mode 100755
index d290c0694a6f52bee4b4d955fa67212bd072fecc..0000000000000000000000000000000000000000
--- a/LICENSE
+++ /dev/null
@@ -1,518 +0,0 @@
-
-  CeCILL FREE SOFTWARE LICENSE AGREEMENT
-
-Version 2.1 dated 2013-06-21
-
-
-    Notice
-
-This Agreement is a Free Software license agreement that is the result
-of discussions between its authors in order to ensure compliance with
-the two main principles guiding its drafting:
-
-  * firstly, compliance with the principles governing the distribution
-    of Free Software: access to source code, broad rights granted to users,
-  * secondly, the election of a governing law, French law, with which it
-    is conformant, both as regards the law of torts and intellectual
-    property law, and the protection that it offers to both authors and
-    holders of the economic rights over software.
-
-The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
-license are:
-
-Commissariat à l'énergie atomique et aux énergies alternatives - CEA, a
-public scientific, technical and industrial research establishment,
-having its principal place of business at 25 rue Leblanc, immeuble Le
-Ponant D, 75015 Paris, France.
-
-Centre National de la Recherche Scientifique - CNRS, a public scientific
-and technological establishment, having its principal place of business
-at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
-
-Institut National de Recherche en Informatique et en Automatique -
-Inria, a public scientific and technological establishment, having its
-principal place of business at Domaine de Voluceau, Rocquencourt, BP
-105, 78153 Le Chesnay cedex, France.
-
-
-    Preamble
-
-The purpose of this Free Software license agreement is to grant users
-the right to modify and redistribute the software governed by this
-license within the framework of an open source distribution model.
-
-The exercising of this right is conditional upon certain obligations for
-users so as to preserve this status for all subsequent redistributions.
-
-In consideration of access to the source code and the rights to copy,
-modify and redistribute granted by the license, users are provided only
-with a limited warranty and the software's author, the holder of the
-economic rights, and the successive licensors only have limited liability.
-
-In this respect, the risks associated with loading, using, modifying
-and/or developing or reproducing the software by the user are brought to
-the user's attention, given its Free Software status, which may make it
-complicated to use, with the result that its use is reserved for
-developers and experienced professionals having in-depth computer
-knowledge. Users are therefore encouraged to load and test the
-suitability of the software as regards their requirements in conditions
-enabling the security of their systems and/or data to be ensured and,
-more generally, to use and operate it in the same conditions of
-security. This Agreement may be freely reproduced and published,
-provided it is not altered, and that no provisions are either added or
-removed herefrom.
-
-This Agreement may apply to any or all software for which the holder of
-the economic rights decides to submit the use thereof to its provisions.
-
-Frequently asked questions can be found on the official website of the
-CeCILL licenses family (http://www.cecill.info/index.en.html) for any
-necessary clarification.
-
-
-    Article 1 - DEFINITIONS
-
-For the purpose of this Agreement, when the following expressions
-commence with a capital letter, they shall have the following meaning:
-
-Agreement: means this license agreement, and its possible subsequent
-versions and annexes.
-
-Software: means the software in its Object Code and/or Source Code form
-and, where applicable, its documentation, "as is" when the Licensee
-accepts the Agreement.
-
-Initial Software: means the Software in its Source Code and possibly its
-Object Code form and, where applicable, its documentation, "as is" when
-it is first distributed under the terms and conditions of the Agreement.
-
-Modified Software: means the Software modified by at least one
-Contribution.
-
-Source Code: means all the Software's instructions and program lines to
-which access is required so as to modify the Software.
-
-Object Code: means the binary files originating from the compilation of
-the Source Code.
-
-Holder: means the holder(s) of the economic rights over the Initial
-Software.
-
-Licensee: means the Software user(s) having accepted the Agreement.
-
-Contributor: means a Licensee having made at least one Contribution.
-
-Licensor: means the Holder, or any other individual or legal entity, who
-distributes the Software under the Agreement.
-
-Contribution: means any or all modifications, corrections, translations,
-adaptations and/or new functions integrated into the Software by any or
-all Contributors, as well as any or all Internal Modules.
-
-Module: means a set of sources files including their documentation that
-enables supplementary functions or services in addition to those offered
-by the Software.
-
-External Module: means any or all Modules, not derived from the
-Software, so that this Module and the Software run in separate address
-spaces, with one calling the other when they are run.
-
-Internal Module: means any or all Module, connected to the Software so
-that they both execute in the same address space.
-
-GNU GPL: means the GNU General Public License version 2 or any
-subsequent version, as published by the Free Software Foundation Inc.
-
-GNU Affero GPL: means the GNU Affero General Public License version 3 or
-any subsequent version, as published by the Free Software Foundation Inc.
-
-EUPL: means the European Union Public License version 1.1 or any
-subsequent version, as published by the European Commission.
-
-Parties: mean both the Licensee and the Licensor.
-
-These expressions may be used both in singular and plural form.
-
-
-    Article 2 - PURPOSE
-
-The purpose of the Agreement is the grant by the Licensor to the
-Licensee of a non-exclusive, transferable and worldwide license for the
-Software as set forth in Article 5 <#scope> hereinafter for the whole
-term of the protection granted by the rights over said Software.
-
-
-    Article 3 - ACCEPTANCE
-
-3.1 The Licensee shall be deemed as having accepted the terms and
-conditions of this Agreement upon the occurrence of the first of the
-following events:
-
-  * (i) loading the Software by any or all means, notably, by
-    downloading from a remote server, or by loading from a physical medium;
-  * (ii) the first time the Licensee exercises any of the rights granted
-    hereunder.
-
-3.2 One copy of the Agreement, containing a notice relating to the
-characteristics of the Software, to the limited warranty, and to the
-fact that its use is restricted to experienced users has been provided
-to the Licensee prior to its acceptance as set forth in Article 3.1
-<#accepting> hereinabove, and the Licensee hereby acknowledges that it
-has read and understood it.
-
-
-    Article 4 - EFFECTIVE DATE AND TERM
-
-
-      4.1 EFFECTIVE DATE
-
-The Agreement shall become effective on the date when it is accepted by
-the Licensee as set forth in Article 3.1 <#accepting>.
-
-
-      4.2 TERM
-
-The Agreement shall remain in force for the entire legal term of
-protection of the economic rights over the Software.
-
-
-    Article 5 - SCOPE OF RIGHTS GRANTED
-
-The Licensor hereby grants to the Licensee, who accepts, the following
-rights over the Software for any or all use, and for the term of the
-Agreement, on the basis of the terms and conditions set forth hereinafter.
-
-Besides, if the Licensor owns or comes to own one or more patents
-protecting all or part of the functions of the Software or of its
-components, the Licensor undertakes not to enforce the rights granted by
-these patents against successive Licensees using, exploiting or
-modifying the Software. If these patents are transferred, the Licensor
-undertakes to have the transferees subscribe to the obligations set
-forth in this paragraph.
-
-
-      5.1 RIGHT OF USE
-
-The Licensee is authorized to use the Software, without any limitation
-as to its fields of application, with it being hereinafter specified
-that this comprises:
-
- 1. permanent or temporary reproduction of all or part of the Software
-    by any or all means and in any or all form.
-
- 2. loading, displaying, running, or storing the Software on any or all
-    medium.
-
- 3. entitlement to observe, study or test its operation so as to
-    determine the ideas and principles behind any or all constituent
-    elements of said Software. This shall apply when the Licensee
-    carries out any or all loading, displaying, running, transmission or
-    storage operation as regards the Software, that it is entitled to
-    carry out hereunder.
-
-
-      5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS
-
-The right to make Contributions includes the right to translate, adapt,
-arrange, or make any or all modifications to the Software, and the right
-to reproduce the resulting software.
-
-The Licensee is authorized to make any or all Contributions to the
-Software provided that it includes an explicit notice that it is the
-author of said Contribution and indicates the date of the creation thereof.
-
-
-      5.3 RIGHT OF DISTRIBUTION
-
-In particular, the right of distribution includes the right to publish,
-transmit and communicate the Software to the general public on any or
-all medium, and by any or all means, and the right to market, either in
-consideration of a fee, or free of charge, one or more copies of the
-Software by any means.
-
-The Licensee is further authorized to distribute copies of the modified
-or unmodified Software to third parties according to the terms and
-conditions set forth hereinafter.
-
-
-        5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
-
-The Licensee is authorized to distribute true copies of the Software in
-Source Code or Object Code form, provided that said distribution
-complies with all the provisions of the Agreement and is accompanied by:
-
- 1. a copy of the Agreement,
-
- 2. a notice relating to the limitation of both the Licensor's warranty
-    and liability as set forth in Articles 8 and 9,
-
-and that, in the event that only the Object Code of the Software is
-redistributed, the Licensee allows effective access to the full Source
-Code of the Software for a period of at least three years from the
-distribution of the Software, it being understood that the additional
-acquisition cost of the Source Code shall not exceed the cost of the
-data transfer.
-
-
-        5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
-
-When the Licensee makes a Contribution to the Software, the terms and
-conditions for the distribution of the resulting Modified Software
-become subject to all the provisions of this Agreement.
-
-The Licensee is authorized to distribute the Modified Software, in
-source code or object code form, provided that said distribution
-complies with all the provisions of the Agreement and is accompanied by:
-
- 1. a copy of the Agreement,
-
- 2. a notice relating to the limitation of both the Licensor's warranty
-    and liability as set forth in Articles 8 and 9,
-
-and, in the event that only the object code of the Modified Software is
-redistributed,
-
- 3. a note stating the conditions of effective access to the full source
-    code of the Modified Software for a period of at least three years
-    from the distribution of the Modified Software, it being understood
-    that the additional acquisition cost of the source code shall not
-    exceed the cost of the data transfer.
-
-
-        5.3.3 DISTRIBUTION OF EXTERNAL MODULES
-
-When the Licensee has developed an External Module, the terms and
-conditions of this Agreement do not apply to said External Module, that
-may be distributed under a separate license agreement.
-
-
-        5.3.4 COMPATIBILITY WITH OTHER LICENSES
-
-The Licensee can include a code that is subject to the provisions of one
-of the versions of the GNU GPL, GNU Affero GPL and/or EUPL in the
-Modified or unmodified Software, and distribute that entire code under
-the terms of the same version of the GNU GPL, GNU Affero GPL and/or EUPL.
-
-The Licensee can include the Modified or unmodified Software in a code
-that is subject to the provisions of one of the versions of the GNU GPL,
-GNU Affero GPL and/or EUPL and distribute that entire code under the
-terms of the same version of the GNU GPL, GNU Affero GPL and/or EUPL.
-
-
-    Article 6 - INTELLECTUAL PROPERTY
-
-
-      6.1 OVER THE INITIAL SOFTWARE
-
-The Holder owns the economic rights over the Initial Software. Any or
-all use of the Initial Software is subject to compliance with the terms
-and conditions under which the Holder has elected to distribute its work
-and no one shall be entitled to modify the terms and conditions for the
-distribution of said Initial Software.
-
-The Holder undertakes that the Initial Software will remain ruled at
-least by this Agreement, for the duration set forth in Article 4.2 <#term>.
-
-
-      6.2 OVER THE CONTRIBUTIONS
-
-The Licensee who develops a Contribution is the owner of the
-intellectual property rights over this Contribution as defined by
-applicable law.
-
-
-      6.3 OVER THE EXTERNAL MODULES
-
-The Licensee who develops an External Module is the owner of the
-intellectual property rights over this External Module as defined by
-applicable law and is free to choose the type of agreement that shall
-govern its distribution.
-
-
-      6.4 JOINT PROVISIONS
-
-The Licensee expressly undertakes:
-
- 1. not to remove, or modify, in any manner, the intellectual property
-    notices attached to the Software;
-
- 2. to reproduce said notices, in an identical manner, in the copies of
-    the Software modified or not.
-
-The Licensee undertakes not to directly or indirectly infringe the
-intellectual property rights on the Software of the Holder and/or
-Contributors, and to take, where applicable, vis-à-vis its staff, any
-and all measures required to ensure respect of said intellectual
-property rights of the Holder and/or Contributors.
-
-
-    Article 7 - RELATED SERVICES
-
-7.1 Under no circumstances shall the Agreement oblige the Licensor to
-provide technical assistance or maintenance services for the Software.
-
-However, the Licensor is entitled to offer this type of services. The
-terms and conditions of such technical assistance, and/or such
-maintenance, shall be set forth in a separate instrument. Only the
-Licensor offering said maintenance and/or technical assistance services
-shall incur liability therefor.
-
-7.2 Similarly, any Licensor is entitled to offer to its licensees, under
-its sole responsibility, a warranty, that shall only be binding upon
-itself, for the redistribution of the Software and/or the Modified
-Software, under terms and conditions that it is free to decide. Said
-warranty, and the financial terms and conditions of its application,
-shall be subject of a separate instrument executed between the Licensor
-and the Licensee.
-
-
-    Article 8 - LIABILITY
-
-8.1 Subject to the provisions of Article 8.2, the Licensee shall be
-entitled to claim compensation for any direct loss it may have suffered
-from the Software as a result of a fault on the part of the relevant
-Licensor, subject to providing evidence thereof.
-
-8.2 The Licensor's liability is limited to the commitments made under
-this Agreement and shall not be incurred as a result of in particular:
-(i) loss due the Licensee's total or partial failure to fulfill its
-obligations, (ii) direct or consequential loss that is suffered by the
-Licensee due to the use or performance of the Software, and (iii) more
-generally, any consequential loss. In particular the Parties expressly
-agree that any or all pecuniary or business loss (i.e. loss of data,
-loss of profits, operating loss, loss of customers or orders,
-opportunity cost, any disturbance to business activities) or any or all
-legal proceedings instituted against the Licensee by a third party,
-shall constitute consequential loss and shall not provide entitlement to
-any or all compensation from the Licensor.
-
-
-    Article 9 - WARRANTY
-
-9.1 The Licensee acknowledges that the scientific and technical
-state-of-the-art when the Software was distributed did not enable all
-possible uses to be tested and verified, nor for the presence of
-possible defects to be detected. In this respect, the Licensee's
-attention has been drawn to the risks associated with loading, using,
-modifying and/or developing and reproducing the Software which are
-reserved for experienced users.
-
-The Licensee shall be responsible for verifying, by any or all means,
-the suitability of the product for its requirements, its good working
-order, and for ensuring that it shall not cause damage to either persons
-or properties.
-
-9.2 The Licensor hereby represents, in good faith, that it is entitled
-to grant all the rights over the Software (including in particular the
-rights set forth in Article 5 <#scope>).
-
-9.3 The Licensee acknowledges that the Software is supplied "as is" by
-the Licensor without any other express or tacit warranty, other than
-that provided for in Article 9.2 <#good-faith> and, in particular,
-without any warranty as to its commercial value, its secured, safe,
-innovative or relevant nature.
-
-Specifically, the Licensor does not warrant that the Software is free
-from any error, that it will operate without interruption, that it will
-be compatible with the Licensee's own equipment and software
-configuration, nor that it will meet the Licensee's requirements.
-
-9.4 The Licensor does not either expressly or tacitly warrant that the
-Software does not infringe any third party intellectual property right
-relating to a patent, software or any other property right. Therefore,
-the Licensor disclaims any and all liability towards the Licensee
-arising out of any or all proceedings for infringement that may be
-instituted in respect of the use, modification and redistribution of the
-Software. Nevertheless, should such proceedings be instituted against
-the Licensee, the Licensor shall provide it with technical and legal
-expertise for its defense. Such technical and legal expertise shall be
-decided on a case-by-case basis between the relevant Licensor and the
-Licensee pursuant to a memorandum of understanding. The Licensor
-disclaims any and all liability as regards the Licensee's use of the
-name of the Software. No warranty is given as regards the existence of
-prior rights over the name of the Software or as regards the existence
-of a trademark.
-
-
-    Article 10 - TERMINATION
-
-10.1 In the event of a breach by the Licensee of its obligations
-hereunder, the Licensor may automatically terminate this Agreement
-thirty (30) days after notice has been sent to the Licensee and has
-remained ineffective.
-
-10.2 A Licensee whose Agreement is terminated shall no longer be
-authorized to use, modify or distribute the Software. However, any
-licenses that it may have granted prior to termination of the Agreement
-shall remain valid subject to their having been granted in compliance
-with the terms and conditions hereof.
-
-
-    Article 11 - MISCELLANEOUS
-
-
-      11.1 EXCUSABLE EVENTS
-
-Neither Party shall be liable for any or all delay, or failure to
-perform the Agreement, that may be attributable to an event of force
-majeure, an act of God or an outside cause, such as defective
-functioning or interruptions of the electricity or telecommunications
-networks, network paralysis following a virus attack, intervention by
-government authorities, natural disasters, water damage, earthquakes,
-fire, explosions, strikes and labor unrest, war, etc.
-
-11.2 Any failure by either Party, on one or more occasions, to invoke
-one or more of the provisions hereof, shall under no circumstances be
-interpreted as being a waiver by the interested Party of its right to
-invoke said provision(s) subsequently.
-
-11.3 The Agreement cancels and replaces any or all previous agreements,
-whether written or oral, between the Parties and having the same
-purpose, and constitutes the entirety of the agreement between said
-Parties concerning said purpose. No supplement or modification to the
-terms and conditions hereof shall be effective as between the Parties
-unless it is made in writing and signed by their duly authorized
-representatives.
-
-11.4 In the event that one or more of the provisions hereof were to
-conflict with a current or future applicable act or legislative text,
-said act or legislative text shall prevail, and the Parties shall make
-the necessary amendments so as to comply with said act or legislative
-text. All other provisions shall remain effective. Similarly, invalidity
-of a provision of the Agreement, for any reason whatsoever, shall not
-cause the Agreement as a whole to be invalid.
-
-
-      11.5 LANGUAGE
-
-The Agreement is drafted in both French and English and both versions
-are deemed authentic.
-
-
-    Article 12 - NEW VERSIONS OF THE AGREEMENT
-
-12.1 Any person is authorized to duplicate and distribute copies of this
-Agreement.
-
-12.2 So as to ensure coherence, the wording of this Agreement is
-protected and may only be modified by the authors of the License, who
-reserve the right to periodically publish updates or new versions of the
-Agreement, each with a separate number. These subsequent versions may
-address new issues encountered by Free Software.
-
-12.3 Any Software distributed under a given version of the Agreement may
-only be subsequently distributed under the same version of the Agreement
-or a subsequent version, subject to the provisions of Article 5.3.4
-<#compatibility>.
-
-
-    Article 13 - GOVERNING LAW AND JURISDICTION
-
-13.1 The Agreement is governed by French law. The Parties agree to
-endeavor to seek an amicable solution to any disagreements or disputes
-that may arise during the performance of the Agreement.
-
-13.2 Failing an amicable solution within two (2) months as from their
-occurrence, and unless emergency proceedings are necessary, the
-disagreements or disputes shall be referred to the Paris Courts having
-jurisdiction, by the more diligent Party.
diff --git a/LICENSE/AGPL-3.0-or-later.txt b/LICENSE/AGPL-3.0-or-later.txt
new file mode 100644
index 0000000000000000000000000000000000000000..0c97efd25b5974b974ed9a8a18207bc4f55bb338
--- /dev/null
+++ b/LICENSE/AGPL-3.0-or-later.txt
@@ -0,0 +1,235 @@
+GNU AFFERO GENERAL PUBLIC LICENSE
+Version 3, 19 November 2007
+
+Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+
+Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
+
+                            Preamble
+
+The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
+
+The licenses for most software and other practical works are designed to take away your freedom to share and change the works.  By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users.
+
+When we speak of free software, we are referring to freedom, not price.  Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
+
+Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software.
+
+A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate.  Many developers of free software are heartened and encouraged by the resulting cooperation.  However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public.
+
+The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community.  It requires the operator of a network server to provide the source code of the modified version running there to the users of that server.  Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version.
+
+An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals.  This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+                       TERMS AND CONDITIONS
+
+0. Definitions.
+
+"This License" refers to version 3 of the GNU Affero General Public License.
+
+"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
+
+"The Program" refers to any copyrightable work licensed under this License.  Each licensee is addressed as "you".  "Licensees" and "recipients" may be individuals or organizations.
+
+To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy.  The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work.
+
+A "covered work" means either the unmodified Program or a work based on the Program.
+
+To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy.  Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
+
+To "convey" a work means any kind of propagation that enables other parties to make or receive copies.  Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License.  If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
+
+1. Source Code.
+The "source code" for a work means the preferred form of the work for making modifications to it.  "Object code" means any non-source form of a work.
+
+A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
+
+The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form.  A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
+
+The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities.  However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work.  For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same work.
+
+2. Basic Permissions.
+All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met.  This License explicitly affirms your unlimited permission to run the unmodified Program.  The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work.  This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force.  You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright.  Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under the conditions stated below.  Sublicensing is not allowed; section 10 makes it unnecessary.
+
+3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
+
+When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
+
+4. Conveying Verbatim Copies.
+You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
+
+5. Conveying Modified Source Versions.
+You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7.  This requirement modifies the requirement in section 4 to "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy.  This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged.  This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
+
+A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit.  Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
+
+6. Conveying Non-Source Forms.
+You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source.  This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
+
+    d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge.  You need not require recipients to copy the Corresponding Source along with the object code.  If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source.  Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
+
+A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
+
+A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling.  In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage.  For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product.  A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
+
+"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source.  The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information.  But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
+
+The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed.  Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
+
+Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
+
+7. Additional Terms.
+"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law.  If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it.  (Additional permissions may be written to require their own removal in certain cases when you modify the work.)  You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
+
+All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10.  If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term.  If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
+
+8. Termination.
+
+You may not propagate or modify a covered work except as expressly provided under this License.  Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
+
+However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
+
+Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License.  If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
+
+9. Acceptance Not Required for Having Copies.
+
+You are not required to accept this License in order to receive or run a copy of the Program.  Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance.  However, nothing other than this License grants you permission to propagate or modify any covered work.  These actions infringe copyright if you do not accept this License.  Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
+
+10. Automatic Licensing of Downstream Recipients.
+
+Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License.  You are not responsible for enforcing compliance by third parties with this License.
+
+An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations.  If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License.  For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
+
+11. Patents.
+
+A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based.  The work thus licensed is called the contributor's "contributor version".
+
+A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version.  For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
+
+In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement).  To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
+
+A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License.  You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
+
+12. No Surrender of Others' Freedom.
+
+If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License.  If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
+
+13. Remote Network Interaction; Use with the GNU General Public License.
+
+Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software.  This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph.
+
+Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work.  The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License.
+
+14. Revised Versions of this License.
+
+The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time.  Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation.  If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation.
+
+If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
+
+Later license versions may give you additional or different permissions.  However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
+
+15. Disclaimer of Warranty.
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. Limitation of Liability.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+17. Interpretation of Sections 15 and 16.
+
+If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
+
+END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program.  It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+
+     <one line to give the program's name and a brief idea of what it does.>
+     Copyright (C) <year>  <name of author>
+
+     This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
+
+     This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.
+
+     You should have received a copy of the GNU Affero General Public License along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source.  For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code.  There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements.
+
+You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see <http://www.gnu.org/licenses/>.
diff --git a/LICENSE/CC-BY-SA-4.0.txt b/LICENSE/CC-BY-SA-4.0.txt
new file mode 100644
index 0000000000000000000000000000000000000000..835a6836b385fa068fdd625685548845cda60c2f
--- /dev/null
+++ b/LICENSE/CC-BY-SA-4.0.txt
@@ -0,0 +1,170 @@
+Creative Commons Attribution-ShareAlike 4.0 International
+
+ Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
+
+Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors.
+
+Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described.
+
+Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public.
+
+Creative Commons Attribution-ShareAlike 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
+
+Section 1 – Definitions.
+
+     a.	Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
+
+     b.	Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
+
+     c.	BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
+
+     d.	Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
+
+     e.	Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
+
+     f.	Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
+
+     g.	License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
+
+     h.	Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
+
+     i.	Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
+
+     j.	Licensor means the individual(s) or entity(ies) granting rights under this Public License.
+
+     k.	Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
+
+     l.	Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
+
+     m.	You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
+
+Section 2 – Scope.
+
+     a.	License grant.
+
+          1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
+
+               A. reproduce and Share the Licensed Material, in whole or in part; and
+
+               B. produce, reproduce, and Share Adapted Material.
+
+          2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
+
+          3. Term. The term of this Public License is specified in Section 6(a).
+
+          4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
+
+          5. Downstream recipients.
+
+               A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
+
+               B. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
+
+               C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
+
+          6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
+
+     b.	Other rights.
+
+          1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
+
+          2. Patent and trademark rights are not licensed under this Public License.
+
+          3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
+
+Section 3 – License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the following conditions.
+
+     a.	Attribution.
+
+          1. If You Share the Licensed Material (including in modified form), You must:
+
+               A. retain the following if it is supplied by the Licensor with the Licensed Material:
+
+                    i.	identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
+
+                    ii.	a copyright notice;
+
+                    iii. a notice that refers to this Public License;
+
+                    iv.	a notice that refers to the disclaimer of warranties;
+
+                    v.	a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
+
+               B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
+
+               C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
+
+          2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
+
+          3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
+
+     b.	ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
+
+          1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
+
+          2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
+
+          3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
+
+Section 4 – Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
+
+     a.	for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
+
+     b.	if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
+
+     c.	You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
+For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
+
+Section 5 – Disclaimer of Warranties and Limitation of Liability.
+
+     a.	Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
+
+     b.	To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
+
+     c.	The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
+
+Section 6 – Term and Termination.
+
+     a.	This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
+
+     b.	Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
+
+          1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
+
+          2. upon express reinstatement by the Licensor.
+
+     c.	For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
+
+     d.	For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
+
+     e.	Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
+
+Section 7 – Other Terms and Conditions.
+
+     a.	The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
+
+     b.	Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
+
+Section 8 – Interpretation.
+
+     a.	For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
+
+     b.	To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
+
+     c.	No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
+
+     d.	Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
+
+Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
diff --git a/src/.docker_modules/r-bolero/1.1/Junctions_NanoSplicer.R b/src/.docker_modules/r-bolero/1.1/Junctions_NanoSplicer.R
index 4e17944651f86adfdda9bf1ff680c9bc61295921..c1c457cf61df2a506537b253dfd7e42776f3c6e0 100755
--- a/src/.docker_modules/r-bolero/1.1/Junctions_NanoSplicer.R
+++ b/src/.docker_modules/r-bolero/1.1/Junctions_NanoSplicer.R
@@ -89,10 +89,7 @@ assignation_donor <- function(pg_donor) {
 
 assignation_acceptor <- function(pg_acceptor) {
   if (pg_acceptor > 1868) {
-    if (pg_acceptor >= 2452 & pg_acceptor <= 2468) {
-      acceptor_site <- "3170"
-    }
-    else if (pg_acceptor >= 2661 & pg_acceptor <= 2685) {
+    if (pg_acceptor >= 2661 & pg_acceptor <= 2685) {
       acceptor_site <- "1306"
     }
     else if (pg_acceptor >= 2743 & pg_acceptor <= 2762) {
@@ -108,6 +105,9 @@ assignation_acceptor <- function(pg_acceptor) {
   else if (pg_acceptor >= 1639 & pg_acceptor <= 1668) {
     acceptor_site <- "283"
   }
+  else if (pg_acceptor >= 1348 & pg_acceptor <= 1364) {
+    acceptor_site <- "3170"
+  }
   else if (pg_acceptor >= 1076 & pg_acceptor <= 1098) {
     acceptor_site <- "2903"
   }
@@ -317,6 +317,23 @@ if (length(multiple_junction$promoter) != 0) {
   df_combinaison <- df_combinaison[2:length(df_combinaison$id),]
 }
 
+# solution by AI:
+# Define a function to process each read_id
+# process_read_id <- function(read_id) {
+#   SP_name_computed <- SP_assignation_multiple(read_id,
+#                                               tmp[tmp$id == read_id,]$junction,
+#                                               tmp[tmp$id == read_id,]$promoter[1])
+#   res_vector <- data.frame(t(c(read_id, SP_name_computed)))
+#   colnames(res_vector) <- colnames(df_combinaison)
+#   return(res_vector)
+# }
+# 
+# # Parallelize the loop using future_lapply
+# results <- future_lapply(list_read_multiple, process_read_id)
+# 
+# # Combine the results into a single data frame
+# df_combinaison <- do.call(rbind, results)
+
 # Parallel processing using future_apply:
 # results <- future_apply(multiple_junction$id, 2, FUN = process_read_id,
 #                         future.seed = FALSE, future.progress = FALSE)
diff --git a/src/.docker_modules/r-bolero/1.2/.RData b/src/.docker_modules/r-bolero/1.2/.RData
new file mode 100644
index 0000000000000000000000000000000000000000..85d1786dea40f3d0b9d035c5a4a44fdc935cce41
Binary files /dev/null and b/src/.docker_modules/r-bolero/1.2/.RData differ
diff --git a/src/.docker_modules/r-bolero/1.2/1.2.Rproj b/src/.docker_modules/r-bolero/1.2/1.2.Rproj
new file mode 100644
index 0000000000000000000000000000000000000000..8e3c2ebc99e2e337f7d69948b93529a437590b27
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/1.2.Rproj
@@ -0,0 +1,13 @@
+Version: 1.0
+
+RestoreWorkspace: Default
+SaveWorkspace: Default
+AlwaysSaveHistory: Default
+
+EnableCodeIndexing: Yes
+UseSpacesForTab: Yes
+NumSpacesForTab: 2
+Encoding: UTF-8
+
+RnwWeave: Sweave
+LaTeX: pdfLaTeX
diff --git a/src/.docker_modules/r-bolero/1.2/Dockerfile b/src/.docker_modules/r-bolero/1.2/Dockerfile
new file mode 100755
index 0000000000000000000000000000000000000000..a9d839790db502bb302b9ac4b773649292719ef5
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/Dockerfile
@@ -0,0 +1,29 @@
+FROM rocker/r-base:4.2.3
+LABEL AUTHOR="Alia Rifki"
+LABEL MAINTAINER="Xavier Grand <xavier.grand@inserm.fr>"
+LABEL build_date="2023-05-26"
+
+
+RUN apt-get update \
+	&& apt-get install -y --no-install-recommends \
+		libcurl4-openssl-dev \
+		libssl-dev \
+		libfontconfig1-dev \
+		libxml2-dev \
+		libharfbuzz-dev \
+		libfribidi-dev \
+		libfreetype-dev \
+		libpng-dev \
+		libtiff5-dev \
+		libjpeg-dev \
+		procps
+
+## copy Rscript files
+COPY ./*.R .
+
+## Install packages
+RUN Rscript Install_packages.R
+
+## Langage
+CMD ["bash"]
+
diff --git a/src/.docker_modules/r-bolero/1.2/HBV_RNAs_count.R b/src/.docker_modules/r-bolero/1.2/HBV_RNAs_count.R
new file mode 100755
index 0000000000000000000000000000000000000000..770ee956277ddb616122656e7e09c11ec2ef8115
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/HBV_RNAs_count.R
@@ -0,0 +1,313 @@
+#!/bin/Rscript
+# Packages loading
+library(ggplot2, quietly = TRUE)
+library(tidyr, quietly = TRUE)
+library(dplyr, quietly = TRUE)
+library(stringr, quietly = TRUE)
+library(RColorBrewer, quietly = TRUE)
+library(optparse, quietly = TRUE)
+library(conflicted, quietly = TRUE)
+
+# Résolution de conflits entre les bibliothèques dplyr et stats
+conflict_prefer("filter", "dplyr")
+conflict_prefer("lag", "dplyr")
+
+# source graphical theme:
+source(file="ggplot_theme_publication-2.R")
+
+# Load files
+option_list = list(
+  make_option(c("-s", "--SPvariants"), type="character", default=NULL, 
+              help="input identified SP variants table (.csv)", metavar="character"),
+  make_option(c("-c", "--classification"), type="character", default=NULL, 
+              help="input classification of reads file (.txt)", metavar="character"),
+  make_option(c("-b", "--barcode"), type="character", default=NULL, 
+              help="input barcode", metavar="character"))
+opt_parser = OptionParser(option_list=option_list)
+opt = parse_args(opt_parser)
+
+# vectors of species & Palettes Colors:
+SPvariants <- c("SP01", "SP02", "SP03", "SP04", "SP05", "SP06", "SP07", "SP08",
+                "SP09", "SP10", "SP11", "SP12", "SP13", "SP14", "SP15", "SP16",
+                "SP17", "SP18", "SP19", "SP20", "SP21", "SP22")
+SPvariants <- factor(SPvariants, levels = SPvariants)
+colors_SP1_22 <- c("#FADD4E", "#FBE0C3", "#C8FF94", "#9ED7C3", "#CCEDE3", 
+                   "#A9E5F0", "#A9C8E6", "#BBC7DF", "#D8C8EB", "#FFBADC", 
+                   "#E2C9B5", "#E2B5AB", "#CAC4C5", "#D7D9DF", "#F9B7BA", 
+                   "#99DDF9", "#ABA7D1", "#B26572", "#FB9651", "#4F7E7E", 
+                   "#4FBCBA", "#608AD2")
+palette_SP1_22 <- data.frame(nom = SPvariants, teinte = colors_SP1_22, 
+                             stringsAsFactors = FALSE)
+
+TSS_species <- c("preCore", "pgRNA", "preS1", "preS2/S", "HBx")
+TSS_species <- factor(TSS_species, levels = TSS_species)
+colors_RNAs_species <- c("#712E80", "#006695", "#3B9746", "#1F4F25", "#F5751A")
+palette_TSS <- data.frame(nom = TSS_species, teinte = colors_RNAs_species, 
+                          stringsAsFactors = FALSE)
+
+new_SP_candidates <- c("new_comb_pg", "new_comb_HBs", "new_comb_HBx", 
+                       "new_comb_UnC", "new_SP", "new_SP_HBs", "Undefined")
+new_SP_candidates <- factor(new_SP_candidates, levels = new_SP_candidates)
+colors_newSP <- c("#AC0E0D", "#CB674F", "#AD565C", "#923222", "#C78A77", 
+                  "#A92322", "#964B34")
+palette_new_SP <- data.frame(nom = new_SP_candidates, teinte = colors_newSP, 
+                             stringsAsFactors = FALSE)
+
+SPxx <- c("SPvariants")
+SPxx <- factor(SPxx, levels = SPxx)
+color_SPxx <- c("#33C5FF")
+palette_SPxx <- data.frame(nom = SPxx, 
+                           teinte = color_SPxx, 
+                           stringsAsFactors = FALSE)
+
+all_species_name <- c(TSS_species, SPvariants, new_SP_candidates, SPxx)
+
+palette_complete <- rbind.data.frame(palette_TSS, 
+                                     palette_SP1_22, 
+                                     palette_new_SP,
+                                     palette_SPxx,
+                                     stringsAsFactors = FALSE)
+
+# Load Start_positions_count files:
+identified_SP <- read.table(file = opt$SPvariants,
+                            header = TRUE)
+
+clean_SP <- identified_SP[!duplicated(identified_SP$id),] %>% 
+  select(id, mapQ, transcript_strand, JAQ, barcode, promoter, junction, SP_name)
+
+countSP <- clean_SP %>% count(SP_name)
+countSP$SP_name <- factor(countSP$SP_name)
+countSP <- dplyr::inner_join(palette_complete, 
+                      countSP, 
+                      by = c("nom" = "SP_name"))
+#print(names(palette_complete))
+#print(names(countSP))
+
+countSP$nom <- factor(countSP$nom, levels = all_species_name)
+countSP <- dplyr::mutate(countSP,
+                  proportion = (as.numeric(n)/sum(as.numeric(n))*100))
+#print(countSP)
+if (length(countSP$nom) != 0) {
+  ggplot(countSP, aes(x = "percent", 
+                      y = proportion,
+                      fill = nom)) +
+    geom_col() +
+    coord_polar("y") +
+    scale_fill_manual(values = countSP$teinte) +
+    labs(fill = "spliced-variants") +
+    xlab(element_blank()) + ylab(element_blank()) +
+    scale_colour_Publication() + theme_Publication()
+  
+  ggsave(file = paste0(opt$barcode, "_SP_proportion_piechart.png"),
+         scale = 2,
+         width = 1920,
+         height = 1080,
+         units = "px",
+         dpi = 300)
+  
+  ggplot(countSP, aes(x = nom, y = proportion, fill = nom)) +
+    geom_col() +
+    scale_fill_manual(values = countSP$teinte) + 
+    theme(axis.text.x = element_text(angle = 45)) +
+    xlab("Position on HBV genome.") + ylab(element_blank()) +
+    scale_colour_Publication() + theme_Publication() +
+    theme(axis.text.x = element_text(angle = 45, hjust=1))
+  
+  ggsave(file = paste0(opt$barcode, "_SP_proportion.png"),
+         scale = 2,
+         width = 1920,
+         height = 1080,
+         units = "px",
+         dpi = 300)
+}
+
+# TSS not spliced:
+classified_reads <- read.table(file = opt$classification, 
+                               header = TRUE)
+
+not_spliced <- classified_reads[!(classified_reads$read_ID %in% clean_SP$id),]
+not_spliced <- dplyr::mutate(not_spliced,
+                      species = not_spliced$promoter)
+#print(not_spliced)
+not_spliced <- not_spliced %>% select(read_ID, species)
+colnames(not_spliced) <- c("id", "species")
+
+clean_SP_type <- clean_SP %>% select(id, SP_name)
+colnames(clean_SP_type) <- c("id", "species")
+
+df_species <- rbind.data.frame(not_spliced, clean_SP_type, 
+                               stringsAsFactors = FALSE)
+count_species <- df_species %>% count(species)
+count_species <- dplyr::mutate(count_species,
+                        percent = (as.numeric(n)/sum(as.numeric(n))*100))
+#print(count_species)
+write.table(df_species, file = paste0(opt$barcode, "_all_reads_identified.csv"), 
+            sep = "\t", quote = FALSE, row.names = FALSE)
+
+# Null dataset:
+species <- c(TSS_species, SPvariants, new_SP_candidates)
+
+# canonical_species <- TSS_species[c(1:3,5)]
+
+null_count <- data.frame(species = species, 
+                         n = rep(0, times = length(species)),
+                         percent = rep(0, times = length(species)), 
+                         stringsAsFactors = FALSE)
+
+null_count <- transform(null_count,
+                        n = as.integer(n),
+                        percent = as.numeric(percent))
+
+# Join:
+count_species <- rbind.data.frame(count_species, 
+                                  subset(null_count, 
+                                         !(species %in% count_species$species)),
+                                  stringsAsFactors = FALSE)
+
+# Merge all SP variants:
+count_species_SPxx <- data.frame(species = "SPvariants", 
+                                 n = sum(count_species[count_species$species 
+                                                       %in% SPvariants,]$n))
+count_species_SPxx <- rbind.data.frame(count_species_SPxx,
+                                       count_species[count_species$species 
+                                                     %in% c(TSS_species, 
+                                                            SPvariants), 1:2],
+                                       stringsAsFactors = FALSE)
+count_species_SPxx <- count_species_SPxx[count_species_SPxx$species %in% 
+                                           all_species_name[c(1:5,35)],] # c(1:3,5,35)
+count_species_SPxx <- dplyr::mutate(count_species_SPxx,
+                             percent=(as.numeric(n)/sum(as.numeric(n))*100))
+#print(count_species_SPxx)
+# save the tab:
+write.csv(count_species_SPxx, 
+          file = paste0(opt$barcode, "_count_canonical_species_SPxx.csv"))
+
+# prepare to plot:
+count_species_SPxx <- dplyr::inner_join(palette_complete,
+                                 count_species_SPxx,
+                                 by = c("nom" = "species"))
+#names(palette_complete)
+#names(count_species_SPxx)
+count_species_SPxx$nom <- factor(count_species_SPxx$nom, 
+                                 levels = all_species_name)
+
+# Save:
+write.csv(count_species, file = paste0(opt$barcode, "_count_species.csv"))
+
+# RNA species composition all species:
+count_species <- dplyr::inner_join(palette_complete, count_species,
+                                  by = c("nom" = "species"),
+                                  suffix = c("",""))
+count_species$nom <- factor(count_species$nom, levels = all_species_name)
+
+ggplot(count_species, 
+       aes(x = nom, 
+           y = percent,
+           fill = nom)) +
+  geom_col() +
+  scale_fill_manual(values = count_species$teinte) +
+  labs(fill = element_blank()) +
+  xlab(label = element_blank())+
+  scale_colour_Publication() + theme_Publication() +
+  theme(axis.text.x = element_text(angle = 45, hjust=1))
+
+ggsave(file = paste0(opt$barcode, "_count_RNAs_species.png"),
+       scale = 2,
+       width = 1920,
+       height = 1080,
+       units = "px",
+       dpi = 300)
+
+# Filter RNA species canonical + SPvariants:
+count_species_clear <- count_species[count_species$nom %in% c(TSS_species, SPvariants),]
+
+# RNA species composition all species:
+count_species_clear <- dplyr::inner_join(palette_complete, count_species_clear,
+                            by = c("nom" = "nom"),
+                            suffix = c("",""))
+count_species_clear$nom <- factor(count_species_clear$nom, levels = all_species_name)
+
+ggplot(count_species_clear, 
+       aes(x = nom, 
+           y = percent,
+           fill = nom)) +
+  geom_col() +
+  scale_fill_manual(values = count_species_clear$teinte) +
+  theme(axis.text.x = element_text(angle = 45)) +
+  labs(fill = "RNA species & spliced-variants") +
+  xlab(label = "RNA species & spliced-variants") +
+  scale_colour_Publication() + theme_Publication()
+
+ggsave(file = paste0(opt$barcode, "_count_RNAs_species_clear.png"),
+       scale = 2,
+       width = 1920,
+       height = 1080,
+       units = "px",
+       dpi = 300)
+
+# SP composition clear:
+count_clear <- clean_SP[clean_SP$SP_name %in% SPvariants,] %>% count(SP_name)
+count_clear <- dplyr::mutate(count_clear,
+                      proportion=(as.numeric(n)/sum(as.numeric(n))*100))
+#print(count_clear)
+count_clear$SP_name <- factor(count_clear$SP_name)
+count_clear <- dplyr::inner_join(palette_complete,
+                          count_clear, 
+                          by = c("nom" = "SP_name"))
+#names(count_clear)
+count_clear$nom <- factor(count_clear$nom, levels = all_species_name)
+
+if(nrow(count_clear)!=0){
+  ggplot(count_clear, aes(x = "percent", 
+                          y = proportion,
+                          fill = nom)) +
+    geom_col() +
+    coord_polar("y") +
+    scale_fill_manual(values = count_clear$teinte) +
+    labs(fill = "spliced-variants") +
+    scale_colour_Publication() + theme_Publication()
+  
+  ggsave(file = paste0(opt$barcode, "_SP_clear_proportion_piechart.png"),
+         scale = 2,
+         width = 1920,
+         height = 1080,
+         units = "px",
+         dpi = 300)}
+
+ggplot(count_clear, aes(x = nom, 
+                        y = proportion,
+                        fill = nom)) +
+  geom_col() +
+  scale_fill_manual(values = count_clear$teinte) + 
+  theme(axis.text.x = element_text(angle = 45)) +
+  labs(fill = "spliced-variants") +
+  xlab(label = "spliced-variants") +
+  ylab(label = "percent") +
+  scale_colour_Publication() + theme_Publication()
+
+ggsave(file = paste0(opt$barcode, "_SP_clear_proportion.png"),
+       scale = 2,
+       width = 1920,
+       height = 1080,
+       units = "px",
+       dpi = 300)
+
+# Camembert SPxx:
+ggplot(count_species_SPxx, aes(x = "species", 
+                               y = percent,
+                               fill = nom)) +
+  geom_col() +
+  coord_polar("y") +
+  scale_fill_manual(values = count_species_SPxx$teinte) +
+  labs(fill = "TSS") +
+  ylab(label = "TSS usage") +
+  xlab(label = "percent") +
+  scale_colour_Publication() + theme_Publication()
+
+ggsave(file = paste0(opt$barcode, "_count_RNAs_species_piechart.png"),
+       scale = 2,
+       width = 1920,
+       height = 1080,
+       units = "px",
+       dpi = 300)
+
diff --git a/src/.docker_modules/r-bolero/1.2/Install_packages.R b/src/.docker_modules/r-bolero/1.2/Install_packages.R
new file mode 100755
index 0000000000000000000000000000000000000000..1716eee62b8459a845bc574f181c2f026e36cadd
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/Install_packages.R
@@ -0,0 +1,3 @@
+list.of.packages <- c("ggplot2", "tidyr", "dplyr", "tidyverse", "stringr", "optparse", "RColorBrewer", "conflicted", "BiocManager", "resshape2", "R.utils", "conflicted", "future", "future.apply")
+new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
+if(length(new.packages)) install.packages(new.packages, dependencies = T)
diff --git a/src/.docker_modules/r-bolero/1.2/Junctions_NanoSplicer.R b/src/.docker_modules/r-bolero/1.2/Junctions_NanoSplicer.R
new file mode 100644
index 0000000000000000000000000000000000000000..04b0f7b608e36a9b0796cc47bc63abc75bc632ce
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/Junctions_NanoSplicer.R
@@ -0,0 +1,351 @@
+#!/bin/Rscript
+#library(ggplot2, quietly = TRUE)
+library(tidyr, quietly = TRUE)
+library(dplyr, quietly = TRUE)
+library(stringr, quietly = TRUE)
+library(optparse, quietly = TRUE)
+library(future, quietly = TRUE)
+library(future.apply)
+library(conflicted, quietly = TRUE)
+
+# Set up parallel processing plan
+plan("multisession", workers = 18)
+
+# Résolution de conflits entre les bibliothèques dplyr et stats
+conflict_prefer("filter", "dplyr")
+conflict_prefer("lag", "dplyr")
+
+# Load classification per promoter:
+option_list = list(
+  make_option(c("-c", "--classification"), type="character", default="./classification.txt", 
+              help="input classification or reads file (.txt)", metavar="character"),
+  make_option(c("-j", "--jwr"), type="character", default=NULL, 
+              help="input nanosplicer results table (.csv)", metavar="character"),
+  make_option(c("-b", "--barcode"), type="character", default=NULL, 
+              help="input barcode", metavar="character"))
+opt_parser = OptionParser(option_list=option_list)
+opt = parse_args(opt_parser)
+reads_pos <- read.table(opt$classification,
+                        sep = "\t")
+colnames(reads_pos) <- c("id", reads_pos[1,2:length(reads_pos[1,])])
+reads_pos <- reads_pos[2:length(reads_pos$id),]
+
+# Function to transform position into EcoRI based: U95551.1
+shift <- function(pos) {
+  if(pos <= 1489) {
+    return(pos + 1693)
+  }
+  else {
+    return(pos - 1489)
+  }
+}
+
+# Load Nanosplicer results:
+if (file.exists(opt$jwr)) {
+  df <- read.csv(opt$jwr)
+  colnames(df)[1] <- "juncNumber"
+} else { # Define column names
+  column_names <- c("juncNumber", "id", "mapQ", "transcript_strand", "chrID", "loc", "JAQ")
+  
+  # Create an empty dataframe
+  df <- data.frame(matrix(ncol = length(column_names), nrow = 0))
+  colnames(df) <- column_names 
+}
+
+# split donor and acceptor positions:
+df <- df %>%
+  separate(col = "loc",
+           into = c("donor", "acceptor"), sep = ", ",
+           extra = "warn")
+
+df$donor <- str_replace(df$donor, '[(]', '')
+df$acceptor <- str_replace(df$acceptor, '[)]', '')
+
+#df <- dplyr::mutate(df,
+#                    donorEcoRI = shift(donor),
+#                    acceptorEcoRI = shift(acceptor))
+
+df <- merge(df, reads_pos, by = 'id')
+
+assignation_donor <- function(donor) {
+  if (donor >= 743 & donor <= 764) {
+    donor_site <- "J2450_"
+  }
+  else if (donor >= 767 & donor <= 794) {
+    donor_site <- "J2474_"
+  }
+  else if (donor >= 1283 & donor <= 1303) {
+    donor_site <- "J2988_"
+  }
+  else if (donor >= 1934 & donor <= 1959) {
+    donor_site <- "J461_"
+  }
+  else if (donor >= 385 & donor <= 404) {
+    donor_site <- "J2090_"
+  }
+  else if (donor >= 362 & donor <= 382) {
+    donor_site <- "J2070_"
+  }
+  else {
+    donor_site <- paste0("J", donor, "new_")
+  }
+  return(donor_site)
+}
+
+assignation_acceptor <- function(acceptor) {
+  if (acceptor >= 1468 & acceptor <= 1487) {
+    acceptor_site <- "3170"
+  }
+  else if (acceptor >= 2784 & acceptor <= 2805) {
+    acceptor_site <- "1306"
+  }
+  else if (acceptor >= 2865 & acceptor <= 2887) {
+    acceptor_site <- "1386"
+  }
+  else if (acceptor >= 1967 & acceptor <= 1988) {
+    acceptor_site <- "490"
+  }
+  else if (acceptor >= 1761 & acceptor <= 1786) {
+    acceptor_site <- "283"
+  }
+  else if (acceptor >= 1200 & acceptor <= 1220) {
+    acceptor_site <- "2903"
+  }
+  else if (acceptor >= 649 & acceptor <= 666) {
+    acceptor_site <- "2351"
+  }
+  else if (acceptor >= 536 & acceptor <= 552) {
+    acceptor_site <- "2237"
+  }
+  else {
+    acceptor_site <- paste0(acceptor,"new")
+  }
+  return(acceptor_site)
+}
+
+df$donor_site <- future_sapply(df$donor, assignation_donor)
+df$acceptor_site <- future_sapply(df$acceptor, assignation_acceptor)
+df <- dplyr::mutate(df,
+                    junction = paste0(donor_site, acceptor_site))
+
+write.table(df, file = paste0(opt$barcode, "_JWR_check_parsed.csv"), row.names = FALSE, sep = "\t")
+
+duplicated2 <- function(x){
+  if (sum(dup <- duplicated(x))==0)
+    return(dup)
+  if (class(x) %in% c("data.frame","matrix"))
+    duplicated(rbind(x[dup,],x))[-(1:sum(dup))]
+  else duplicated(c(x[dup],x))[-(1:sum(dup))]
+}
+
+list_read_multiple <- unique(df[duplicated2(df$id),]$id)
+multiple_junction <- df[duplicated2(df$id),]
+single_junction <- df %>% dplyr::filter(!(id %in% list_read_multiple))
+
+SP_assignation_single <- function(site, promoter) {
+  if (promoter == "pgRNA" | promoter == "preCore") {
+    if (str_detect(site, "new")) { SP_name <- "new_SP" }
+    else if (site == "J2450_490") { SP_name <- "SP01" }
+    else if (site == "J2070_490") { SP_name <- "SP03" }
+    else if (site == "J2090_490") { SP_name <- "SP05" }
+    else if (site == "J2474_490") { SP_name <- "SP06" }
+    else if (site == "J2450_283") { SP_name <- "SP09" }
+    else if (site == "J2474_283") { SP_name <- "SP11" }
+    else if (site == "J2988_490") { SP_name <- "SP13" }
+    else if (site == "J2450_2903") { SP_name <- "SP14" }
+    else if (site == "J2070_283") { SP_name <- "SP17" }
+    else if (site == "J2988_3170") { SP_name <- "SP19" }
+    else if (site == "J2988_283") { SP_name <- "SP20" }
+    else { SP_name <- "new_comb_pg" }
+  }
+  else if (promoter == "preS1" | promoter == "preS2/S") {
+    if (str_detect(site, "new")) { SP_name <- "new_SP" }
+    else if (site == "J461_1306") { SP_name <- "SP21" }
+    else if (site == "J461_1386") { SP_name <- "SP22" }
+    else { SP_name <- "new_comb_HBs" }
+  }
+  else if (promoter == "HBx") {
+    if (str_detect(site, "new")) { SP_name <- "new_SP" }
+    else { SP_name <- "new_comb_HBx" }
+  }
+  else if (promoter == "Undefined") {
+    if (str_detect(site, "new")) { SP_name <- "new_SP" }
+    else { SP_name <- "new_comb_UnC" }
+  }
+  else { 
+    if (str_detect(site, "new")) { SP_name <- "new_SP" }
+    else { SP_name <- "error" }
+  }
+}
+
+
+#dplyr version:
+single_junction <- single_junction %>% dplyr::group_by(id) 
+
+if (length(single_junction$promoter) != 0) {
+  single_junction <- single_junction %>% 
+    dplyr::mutate(SP_name = SP_assignation_single(junction, promoter))
+} else { single_junction$SP_name = "" }
+
+SP_assignation_multiple <- function(read_id, combinaison, promoter) {
+  if (promoter == "pgRNA" | promoter == "preCore") {
+    
+    # New junctions detection:
+    if (str_detect(str_c(combinaison, collapse = "_"), "new")) {
+      SP_name <- "new_SP"
+    }
+    
+    #SP02, SP08, SP10, SP16:
+    else if ("J2070_2351" %in% combinaison) {
+      #SP02:
+      if ("J2450_490" %in% combinaison & length(combinaison) == 2) {
+        SP_name <- "SP02"
+      }
+      
+      #SP08:
+      else if ("J2450_2903" %in% combinaison & "J2988_490" %in% combinaison &
+               length(combinaison) == 3) {
+        SP_name <- "SP08"
+      }
+      
+      #SP10:
+      else if ("J2450_283" %in% combinaison & length(combinaison) == 2) {
+        SP_name <- "SP10"
+      }
+      
+      #SP16:
+      else if ("J2474_490" %in% combinaison & length(combinaison) == 2) {
+        SP_name <- "SP16"
+      }
+      
+      #If there is another combination of already described junction associated to "J2070_2351":
+      else {SP_name <- "new_comb_pg"}
+    }
+    
+    #SP12, SP15:
+    else if ("J2070_2237" %in% combinaison) {
+      #SP12:
+      if ("J2450_283" %in% combinaison & length(combinaison) == 2) {
+        SP_name <- "SP12"
+      }
+      else if ("J2450_490" %in% combinaison & length(combinaison) == 2) {
+        SP_name <- "SP15"
+      }
+      #If there is another combination of already described junction associated to "J2070_2237":
+      else {SP_name <- "new_comb_pg"}
+    }
+    
+    #SP04:
+    else if ("J2090_2351" %in% combinaison) {
+      if ("J2450_490" %in% combinaison & length(combinaison) == 2) {
+        SP_name <- "SP04"
+      }
+      #If there is another combination of already described junction associated to "J2090_2351":
+      else {SP_name <- "new_comb_pg"}
+    }
+    
+    #SP07, SP18:
+    else if ("J2988_490" %in% combinaison) {
+      #SP07:
+      if ("J2450_2903" %in% combinaison & length(combinaison) == 2) {
+        SP_name <- "SP07"
+      }
+      #SP18:
+      else if ("J2474_2903" %in% combinaison & length(combinaison) == 2) {
+        SP_name <- "SP18"
+      }
+      #If there is another combination of already described junction associated to "J2988_490":
+      else {SP_name <- "new_comb_pg"}
+    }
+    
+    #New combinaisons of multiple already described junctions:
+    else {SP_name <- "new_comb_pg"}
+  }
+  
+  #SP from preS1, preS2/2:
+  else if (promoter == "preS1" | promoter == "preS2/S") {
+    if (str_detect(str_c(combinaison, collapse = "_"), "new")) {
+      SP_name <- "new_SP_HBs"
+    }
+    else { SP_name <- "new_comb_HBs"}
+  }
+  
+  #SP from HBx:
+  else if (promoter == "HBx") {
+    if (str_detect(str_c(combinaison, collapse = "_"), "new")) {
+      SP_name <- "new_SP_HBx"
+    }
+    else { SP_name <- "new_comb_HBx"}
+  }
+  
+  #SP from Undefined:
+  else if (promoter == "Undefined") {
+    if (str_detect(str_c(combinaison, collapse = "_"), "new")) { SP_name <- "new_SP" }
+    else { SP_name <- "new_comb_UnC" }
+  }
+  
+  #Error case:
+  else {
+    SP_name <- "error"
+  }
+  return(SP_name)
+}
+
+tmp <- multiple_junction %>% select(all_of(c("id", "junction", "promoter")))
+
+# Create an empty data frame with appropriate column names
+df_combinaison <- data.frame(id = character(0), SP_name = character(0))
+
+# Function to process each read_id
+process_read_id <- function(read_id) {
+  SP_name_computed <- SP_assignation_multiple(read_id, 
+                                              tmp[tmp$id == read_id,]$junction, 
+                                              tmp[tmp$id == read_id,]$promoter[1])
+  data.frame(id = read_id, SP_name = SP_name_computed)
+}
+
+if (length(multiple_junction$promoter) != 0) {
+  for (read_id in list_read_multiple) {
+    SP_name_computed <- SP_assignation_multiple(read_id,
+                                                tmp[tmp$id == read_id,]$junction,
+                                                tmp[tmp$id == read_id,]$promoter[1])
+    res_vector <- data.frame(t(c(read_id, SP_name_computed)))
+    colnames(res_vector) <- colnames(df_combinaison)
+    df_combinaison <- rbind(df_combinaison, res_vector)
+  }
+  
+  df_combinaison <- df_combinaison[2:length(df_combinaison$id),]
+}
+
+# Parallel processing using future_apply:
+# results <- future_apply(multiple_junction$id, 2, FUN = process_read_id,
+#                         future.seed = FALSE, future.progress = FALSE)
+# Combine the results into a single data frame
+# df_combinaison <- do.call(rbind, results)
+
+# Old loop:
+# for (read_id in list_read_multiple) {
+#   SP_name_computed <- SP_assignation_multiple(read_id, 
+#                                               tmp[tmp$id == read_id,]$junction, 
+#                                               tmp[tmp$id == read_id,]$promoter[1])
+#   res_vector <- data.frame(t(c(read_id, SP_name_computed)))
+#   colnames(res_vector) <- colnames(df_combinaison)
+#   df_combinaison <- rbind(df_combinaison, res_vector)
+# }
+
+# df_combinaison <- df_combinaison[2:length(df_combinaison$id),]
+
+multiple_junction <- merge(multiple_junction, df_combinaison, by="id")
+
+df_SPvariants <- rbind(as.data.frame(single_junction), multiple_junction)
+
+SP_variant_unique <- df_SPvariants %>% select(id, SP_name)
+SP_variant_unique <- SP_variant_unique[!duplicated(SP_variant_unique$id),] 
+# distinct(SP_variant_unique, id)
+
+write.table(df_SPvariants, 
+            paste0(opt$barcode, "_identified_SPvariants.csv"), 
+            row.names = FALSE, 
+            sep = "\t", 
+            quote = FALSE)
+
diff --git a/src/.docker_modules/r-bolero/1.2/Start_positions.R b/src/.docker_modules/r-bolero/1.2/Start_positions.R
new file mode 100755
index 0000000000000000000000000000000000000000..a21966f397eb9f55692908ef38cf077af633e5be
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/Start_positions.R
@@ -0,0 +1,242 @@
+#!/bin/Rscript
+# Packages loading
+library(dplyr, quietly = TRUE)
+library(ggplot2, quietly = TRUE)
+library(RColorBrewer, quietly = TRUE)
+library(conflicted, quietly = TRUE)
+library(optparse, quietly = TRUE)
+library(tidyverse, quietly = TRUE)
+library(future, quietly = TRUE)
+library(future.apply)
+
+# Résolution de conflits entre les bibliothèques dplyr et stats
+conflict_prefer("filter", "dplyr")
+conflict_prefer("lag", "dplyr")
+
+# source graphical theme:
+source(file="ggplot_theme_publication-2.R")
+
+# Load Start_positions_count files:
+option_list = list(
+  make_option(c("-i", "--input"), type="character", default=NULL, 
+              help="input start position file (.txt)", metavar="character"),
+  make_option(c("-b", "--barcode"), type="character", default=NULL, 
+              help="input barcode", metavar="character"),
+  make_option(c("-s", "--start-positions"), type = "character", 
+              default = "103,117,276,1106,1221,1455,1632,2550,2968"),
+  make_option(c("-t", "--threads"), type = "integer", default = 16,
+              help="Number of threads.")
+)
+
+opt_parser = OptionParser(option_list=option_list)
+opt = parse_args(opt_parser)
+
+# Set up parallel processing plan
+plan("multisession", workers = opt$threads)
+
+file_to_load <- opt$input
+splitted <- strsplit(opt$input, split = "[/]")[[1]]
+filename <- strsplit(splitted[length(splitted)], split = "[.]")[[1]][1]
+
+sam_bc01 <- read.table(file_to_load, header = F)
+sam_bc01[3] <- rep(filename, length(sam_bc01[,1]))
+
+# Function to transform position into EcoRI based: U95551.1
+shift <- function(pos) {
+  if(pos <= 1489) {
+    return(pos + 1693)
+  }
+  else {
+    return(pos - 1489)
+  }
+}
+
+# Function to parse and arrange data:
+parsingData <- function(df) {
+  binsize <- 10
+  pos <- as.data.frame(table(df[,2]))
+  colnames(pos)[1] <- "Start"
+  
+  Start <- as.data.frame(as.factor(seq(0, 3300)))
+  colnames(Start)[1] = "Start"
+  
+  tmp <- dplyr::left_join(Start, pos)
+  tmp[is.na(tmp)] <- 0
+  
+  tmp$Start <- as.numeric(tmp$Start)
+  
+  df2 <- as_tibble(tmp) %>% 
+    dplyr::mutate(bin = round(Start/binsize)*binsize) %>% 
+    group_by(bin) %>% 
+    dplyr::summarize(nb_reads = sum(Freq, na.rm = T))
+  df2[is.na(df2)] <- 0
+  df2[3] <- rep(df[1,3], length(df2$bin))
+  colnames(df2) <- c("Start_position", "nb_reads", "Barcode")
+  df2
+}
+
+df_parsed <- parsingData(sam_bc01)
+
+ggplot(df_parsed, aes(Start_position, nb_reads)) + 
+  geom_area(alpha = 0.5, fill = "blue") + 
+  scale_y_sqrt() +
+  facet_wrap(facets = vars(df_parsed$Barcode)) +
+  scale_x_continuous(breaks = c(1, 127, 1114, 1490, 2554, 2732, 2907, 3421),
+                     label = c("1694", "1820", "2807", "EcoRI", "1065", 
+                               "1243", "1418", "1932")) +
+  scale_fill_discrete(name="") +
+  scale_colour_Publication() + theme_Publication()+
+  theme(axis.text.x = element_text(angle = 45, hjust=1)
+  )
+
+ggsave(paste0(filename,".png"),
+       plot = last_plot(),
+       scale = 2,
+       width = 1920,
+       height = 1080,
+       units = "px",
+       dpi = 300,
+)
+
+# Classify reads based on start-position:
+
+# Separate preCore & pg:
+classify_reads <- function(read_info) {
+  if (read_info <= 103) {
+    promoter <- "preCore"
+  }
+  else if (read_info >= 117 &
+           read_info <= 276) {
+    promoter <- "pgRNA"
+  }
+  else if (read_info >= 1106 & 
+           read_info <= 1221 ) {
+    promoter <- "preS1"
+  }
+  else if (read_info >= 1455 & 
+           read_info <= 1632 ) {
+    promoter <- "preS2/S"
+  }
+  else if (read_info >= 2550 & 
+           read_info <= 2968 ) {
+    promoter <- "HBx"
+  }
+  else promoter <- "Undefined"
+}
+
+colnames(sam_bc01) <- c("read_ID", "start_position", "barcode")
+sam_bc01$EcoRIpos <- future_sapply(sam_bc01$start_position, 
+                                  shift)
+sam_bc01$promoter <- future_sapply(sam_bc01$start_position, 
+                            classify_reads)
+
+write.table(sam_bc01,
+            file = paste0(opt$barcode, "_classification_of_reads_per_RNA.txt"),
+            quote = FALSE, 
+            sep = "\t", 
+            row.names = FALSE)
+
+# Compute Reads number per promoters:
+list_name_samples <- list(filename)
+
+count_promoter_reads <- function(barcode, df) {
+  tmpdf <- as.data.frame(df)
+  tmpdf <- tmpdf[tmpdf$Barcode == barcode,]
+  preCore <- sum(tmpdf$nb_reads[tmpdf$Start_position <= 103])
+  pgRNA <- sum(tmpdf$nb_reads[tmpdf$Start_position >= 117 & 
+                                tmpdf$Start_position <= 276])
+  preS1 <- sum(tmpdf$nb_reads[tmpdf$Start_position >= 1106 & 
+                                tmpdf$Start_position <= 1221])
+  preS2S <- sum(tmpdf$nb_reads[tmpdf$Start_position >= 1455 & 
+                                 tmpdf$Start_position <= 1632])
+  HBx <- sum(tmpdf$nb_reads[tmpdf$Start_position >= 2550 & 
+                              tmpdf$Start_position <= 2968])
+  total <- sum(preCore, pgRNA, preS1, preS2S, HBx)
+  res <- c(preCore/total*100, pgRNA/total*100, preS1/total*100, 
+           preS2S/total*100, HBx/total*100, total)
+  return(res)
+}
+
+abscount_promoter_reads <- function(barcode, df) {
+  tmpdf <- as.data.frame(df)
+  tmpdf <- tmpdf[tmpdf$Barcode == barcode,]
+  preCore <- sum(tmpdf$nb_reads[tmpdf$Start_position <= 103])
+  pgRNA <- sum(tmpdf$nb_reads[tmpdf$Start_position >= 117 & 
+                                tmpdf$Start_position <= 276])
+  preS1 <- sum(tmpdf$nb_reads[tmpdf$Start_position >= 1106 & 
+                                tmpdf$Start_position <= 1221])
+  preS2S <- sum(tmpdf$nb_reads[tmpdf$Start_position >= 1455 & 
+                                 tmpdf$Start_position <= 1632])
+  HBx <- sum(tmpdf$nb_reads[tmpdf$Start_position >= 2550 & 
+                              tmpdf$Start_position <= 2968])
+  total <- sum(preCore, pgRNA, preS1, preS2S, HBx)
+  res <- c(preCore, pgRNA, preS1, preS2S, 
+           HBx, total)
+  return(res)
+}
+
+promoters <- factor(c("preCore", "pgRNA", "preS1", "preS2/S", "HBx"), 
+                    levels = c("preCore", "pgRNA", "preS1", "preS2/S", "HBx"))
+
+abs_count_reads <- data.frame()
+abs_count_reads <- future_sapply(list_name_samples, 
+                          abscount_promoter_reads, 
+                          df_parsed)
+abs_count_reads <- cbind(c(as.vector(promoters),"total"), abs_count_reads)
+colnames(abs_count_reads) <- c("promoter", "read_number")
+
+write.table(abs_count_reads,
+            file = paste0(opt$barcode, "_count_reads_per_promoter.tsv"),
+            quote = FALSE, 
+            sep = "\t", 
+            row.names = FALSE)
+
+resultats_start_promoters <- future_lapply(list_name_samples, 
+                                    count_promoter_reads, 
+                                    df_parsed)
+
+resultats_start_promoters <- as.data.frame(do.call(cbind, 
+                                                   resultats_start_promoters))
+totalCountSample <- as.data.frame(resultats_start_promoters[6,])
+colnames(totalCountSample) <- c(filename)
+resultats_start_promoters <- as.data.frame(resultats_start_promoters[1:5,])
+colnames(resultats_start_promoters) <- as.vector(list_name_samples)
+resultats_start_promoters <- cbind(promoters, resultats_start_promoters)
+formated_start_promoters <- pivot_longer(resultats_start_promoters, 
+                                         cols = c(filename),
+                                         names_to = "Barcodes", 
+                                         values_to = "nb_reads")
+
+mycolors <- c("#712E80", "#006695", "#3B9746", "#1F4F25", "#F5751A")
+
+plot_camembert <- function(barcode, df, tot) {
+  camembert <- ggplot(df[df$Barcodes == barcode,], aes(x = barcode, 
+                                                       y = nb_reads, 
+                                                       fill=promoters)) +
+    geom_col() +
+    coord_polar("y") +
+    scale_fill_manual(values = mycolors) +
+    labs(title = paste0("#reads = ", tot[1,barcode]), 
+                        x=element_blank(), 
+                        y=element_blank()) +
+    scale_fill_discrete(name="") +
+    scale_colour_Publication() + theme_Publication()+
+    theme(axis.text.x = element_text(angle = 45, hjust=1)
+    )
+  
+  print(camembert)
+  
+  ggsave(filename = paste0("./", opt$barcode, 
+                           "_reads_start_promoters_piechart.png"),
+         plot = last_plot(),
+         scale = 1,
+         width = 1920,
+         height = 1080,
+         units = "px",
+         dpi = 300)
+}
+
+future_lapply(list_name_samples, 
+              plot_camembert, 
+              formated_start_promoters, 
+              totalCountSample)
diff --git a/src/.docker_modules/r-bolero/1.2/docker_init.sh b/src/.docker_modules/r-bolero/1.2/docker_init.sh
new file mode 100755
index 0000000000000000000000000000000000000000..caa62b7ce436d2f005bfb61a3c37829129b518b7
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/docker_init.sh
@@ -0,0 +1,2 @@
+docker build src/.docker_modules/r-bolero/1.1 -t 'xgrand/r-bolero:1.1'
+docker push xgrand/r-bolero:1.1
diff --git a/src/.docker_modules/r-bolero/1.2/ggplot_theme_Publication-2.R b/src/.docker_modules/r-bolero/1.2/ggplot_theme_Publication-2.R
new file mode 100755
index 0000000000000000000000000000000000000000..953db35254a797c088aadcfe5c7f8dfd8dd29a3b
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/ggplot_theme_Publication-2.R
@@ -0,0 +1,165 @@
+
+
+theme_Publication <- function(base_size=14, base_family="sans") {
+      library(grid)
+      library(ggthemes)
+      (theme_foundation(base_size=base_size, base_family=base_family)
+       + theme(plot.title = element_text(face = "bold",
+                                         size = rel(1.2), hjust = 0.5, margin = margin(0,0,20,0)),
+               text = element_text(),
+               panel.background = element_rect(colour = NA),
+               plot.background = element_rect(colour = NA),
+               panel.border = element_rect(colour = NA),
+               axis.title = element_text(face = "bold",size = rel(1)),
+               axis.title.y = element_text(angle=90,vjust =2),
+               axis.title.x = element_text(vjust = -0.2),
+               axis.text = element_text(), 
+               axis.line.x = element_line(colour="black"),
+               axis.line.y = element_line(colour="black"),
+               axis.ticks = element_line(),
+               panel.grid.major = element_line(colour="#f0f0f0"),
+               panel.grid.minor = element_blank(),
+               legend.key = element_rect(colour = NA),
+               legend.position = "bottom",
+               legend.direction = "horizontal",
+               legend.box = "vetical",
+               legend.key.size= unit(0.5, "cm"),
+               #legend.margin = unit(0, "cm"),
+               legend.title = element_text(face="italic"),
+               plot.margin=unit(c(10,5,5,5),"mm"),
+               strip.background=element_rect(colour="#f0f0f0",fill="#f0f0f0"),
+               strip.text = element_text(face="bold")
+       ))
+      
+}
+
+scale_fill_Publication <- function(...){
+      library(scales)
+      discrete_scale("fill","Publication",manual_pal(values = c("#386cb0","#f87f01","#7fc97f","#ef3b2c","#feca01","#a6cee3","#fb9a99","#984ea3","#8C591D")), ...)
+      
+}
+
+scale_colour_Publication <- function(...){
+      library(scales)
+      discrete_scale("colour","Publication",manual_pal(values = c("#386cb0","#f87f01","#7fc97f","#ef3b2c","#feca01","#a6cee3","#fb9a99","#984ea3","#8C591D")), ...)
+      
+}
+
+
+### Dark theme for ggplot plots
+
+theme_dark_grey <- function(base_size=14, base_family="sans") {
+   library(grid)
+   library(ggthemes)
+   (theme_foundation(base_size=base_size, base_family=base_family)
+      + theme(plot.title = element_text(face = "bold", colour = '#ffffb3',
+                                        size = rel(1.2), hjust = 0.5, margin = margin(0,0,20,0)),
+              text = element_text(),
+              panel.background = element_rect(colour = NA, fill = 'grey20'),
+              plot.background = element_rect(colour = NA, fill = '#262626'),
+              panel.border = element_rect(colour = NA),
+              axis.title = element_text(face = "bold",size = rel(1), colour = 'white'),
+              axis.title.y = element_text(angle=90,vjust =2),
+              axis.title.x = element_text(vjust = -0.2),
+              axis.text = element_text(colour = 'grey70'), 
+              axis.line.x = element_line(colour="grey70"),
+              axis.line.y = element_line(colour="grey70"),
+              axis.ticks = element_line(colour="grey70"),
+              panel.grid.major = element_line(colour="#262626"),
+              panel.grid.minor = element_blank(),
+              legend.background = element_rect(fill ='#262626'),
+              legend.text = element_text(color = 'white'),
+              legend.key = element_rect(colour = NA, fill = '#262626'),
+              legend.position = "bottom",
+              legend.direction = "horizontal",
+              legend.box = "vetical",
+              legend.key.size= unit(0.5, "cm"),
+              #legend.margin = unit(0, "cm"),
+              legend.title = element_text(face="italic", colour = 'white'),
+              plot.margin=unit(c(10,5,5,5),"mm"),
+              strip.background=element_rect(colour="#2D3A4C",fill="#2D3A4C"),
+              strip.text = element_text(face="bold", colour = 'white')
+      ))
+}
+
+scale_fill_Publication_dark <- function(...){
+   library(scales)
+   discrete_scale("fill","Publication",manual_pal(values = c("#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2")), ...)
+   
+}
+
+scale_colour_Publication_dark <- function(...){
+   library(scales)
+   discrete_scale("colour","Publication",manual_pal(values = c("#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2")), ...)
+   
+}
+
+
+# theme_transparent <- function(base_size=14, base_family="sans") {
+#    library(grid)
+#    library(ggthemes)
+#    (theme_foundation(base_size=base_size, base_family=base_family)
+#       + theme(plot.title = element_text(face = "bold", colour = '#ffffb3',
+#                                         size = rel(1.2), hjust = 0.5),
+#               text = element_text(),
+#               panel.background = element_rect(colour = NA, fill = 'transparent'),
+#               plot.background = element_rect(colour = NA, fill = 'transparent'),
+#               panel.border = element_rect(colour = NA),
+#               axis.title = element_text(face = "bold",size = rel(1), colour = 'white'),
+#               axis.title.y = element_text(angle=90,vjust =2),
+#               axis.title.x = element_text(vjust = -0.2),
+#               axis.text = element_text(colour = 'grey70'), 
+#               axis.line.x = element_line(colour="grey70"),
+#               axis.line.y = element_line(colour="grey70"),
+#               axis.ticks = element_line(colour="grey70"),
+#               panel.grid.major = element_line(colour="#262626"),
+#               panel.grid.minor = element_blank(),
+#               legend.background = element_rect(fill = 'transparent'),
+#               legend.text = element_text(color = 'white'),
+#               legend.key = element_rect(colour = NA, fill = 'grey20'),
+#               legend.position = "bottom",
+#               legend.direction = "horizontal",
+#               legend.box = "vetical",
+#               legend.key.size= unit(0.5, "cm"),
+#               #legend.margin = unit(0, "cm"),
+#               legend.title = element_text(face="italic", colour = 'white'),
+#               plot.margin=unit(c(10,5,5,5),"mm"),
+#               strip.background=element_rect(colour="#2D3A4C",fill="#2D3A4C"),
+#               strip.text = element_text(face="bold", colour = 'white')
+#       ))
+# }
+
+theme_dark_blue <- function(base_size=14, base_family="sans") {
+   library(grid)
+   library(ggthemes)
+   (theme_foundation(base_size=base_size, base_family=base_family)
+      + theme(plot.title = element_text(face = "bold", colour = '#ffffb3',
+                                        size = rel(1.2), hjust = 0.5, margin = margin(0,0,20,0)),
+              text = element_text(),
+              panel.background = element_rect(colour = NA, fill = '#282C33'),
+              plot.background = element_rect(colour = NA, fill = '#282C33'),
+              panel.border = element_rect(colour = NA),
+              axis.title = element_text(face = "bold",size = rel(1), colour = 'white'),
+              axis.title.y = element_text(angle=90,vjust =2),
+              axis.title.x = element_text(vjust = -0.2),
+              axis.text = element_text(colour = 'grey70'), 
+              axis.line.x = element_line(colour="grey70"),
+              axis.line.y = element_line(colour="grey70"),
+              axis.ticks = element_line(colour="grey70"),
+              panel.grid.major = element_line(colour="#343840"),
+              panel.grid.minor = element_blank(),
+              legend.background = element_rect(fill ='#282C33'),
+              legend.text = element_text(color = 'white'),
+              legend.key = element_rect(colour = NA, fill = '#282C33'),
+              legend.position = "bottom",
+              legend.direction = "horizontal",
+              legend.box = "vetical",
+              legend.key.size= unit(0.5, "cm"),
+              #legend.margin = unit(0, "cm"),
+              legend.title = element_text(face="italic", colour = 'white'),
+              plot.margin=unit(c(10,5,5,5),"mm"),
+              strip.background=element_rect(colour="#2D3A4C",fill="#2D3A4C"),
+              strip.text = element_text(face="bold", colour = 'white'),
+              axis.text.x = element_text(angle = 45)
+      ))
+}
\ No newline at end of file
diff --git a/src/.docker_modules/r-bolero/1.2/ggplot_theme_publication-2.R b/src/.docker_modules/r-bolero/1.2/ggplot_theme_publication-2.R
new file mode 100755
index 0000000000000000000000000000000000000000..953db35254a797c088aadcfe5c7f8dfd8dd29a3b
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/ggplot_theme_publication-2.R
@@ -0,0 +1,165 @@
+
+
+theme_Publication <- function(base_size=14, base_family="sans") {
+      library(grid)
+      library(ggthemes)
+      (theme_foundation(base_size=base_size, base_family=base_family)
+       + theme(plot.title = element_text(face = "bold",
+                                         size = rel(1.2), hjust = 0.5, margin = margin(0,0,20,0)),
+               text = element_text(),
+               panel.background = element_rect(colour = NA),
+               plot.background = element_rect(colour = NA),
+               panel.border = element_rect(colour = NA),
+               axis.title = element_text(face = "bold",size = rel(1)),
+               axis.title.y = element_text(angle=90,vjust =2),
+               axis.title.x = element_text(vjust = -0.2),
+               axis.text = element_text(), 
+               axis.line.x = element_line(colour="black"),
+               axis.line.y = element_line(colour="black"),
+               axis.ticks = element_line(),
+               panel.grid.major = element_line(colour="#f0f0f0"),
+               panel.grid.minor = element_blank(),
+               legend.key = element_rect(colour = NA),
+               legend.position = "bottom",
+               legend.direction = "horizontal",
+               legend.box = "vetical",
+               legend.key.size= unit(0.5, "cm"),
+               #legend.margin = unit(0, "cm"),
+               legend.title = element_text(face="italic"),
+               plot.margin=unit(c(10,5,5,5),"mm"),
+               strip.background=element_rect(colour="#f0f0f0",fill="#f0f0f0"),
+               strip.text = element_text(face="bold")
+       ))
+      
+}
+
+scale_fill_Publication <- function(...){
+      library(scales)
+      discrete_scale("fill","Publication",manual_pal(values = c("#386cb0","#f87f01","#7fc97f","#ef3b2c","#feca01","#a6cee3","#fb9a99","#984ea3","#8C591D")), ...)
+      
+}
+
+scale_colour_Publication <- function(...){
+      library(scales)
+      discrete_scale("colour","Publication",manual_pal(values = c("#386cb0","#f87f01","#7fc97f","#ef3b2c","#feca01","#a6cee3","#fb9a99","#984ea3","#8C591D")), ...)
+      
+}
+
+
+### Dark theme for ggplot plots
+
+theme_dark_grey <- function(base_size=14, base_family="sans") {
+   library(grid)
+   library(ggthemes)
+   (theme_foundation(base_size=base_size, base_family=base_family)
+      + theme(plot.title = element_text(face = "bold", colour = '#ffffb3',
+                                        size = rel(1.2), hjust = 0.5, margin = margin(0,0,20,0)),
+              text = element_text(),
+              panel.background = element_rect(colour = NA, fill = 'grey20'),
+              plot.background = element_rect(colour = NA, fill = '#262626'),
+              panel.border = element_rect(colour = NA),
+              axis.title = element_text(face = "bold",size = rel(1), colour = 'white'),
+              axis.title.y = element_text(angle=90,vjust =2),
+              axis.title.x = element_text(vjust = -0.2),
+              axis.text = element_text(colour = 'grey70'), 
+              axis.line.x = element_line(colour="grey70"),
+              axis.line.y = element_line(colour="grey70"),
+              axis.ticks = element_line(colour="grey70"),
+              panel.grid.major = element_line(colour="#262626"),
+              panel.grid.minor = element_blank(),
+              legend.background = element_rect(fill ='#262626'),
+              legend.text = element_text(color = 'white'),
+              legend.key = element_rect(colour = NA, fill = '#262626'),
+              legend.position = "bottom",
+              legend.direction = "horizontal",
+              legend.box = "vetical",
+              legend.key.size= unit(0.5, "cm"),
+              #legend.margin = unit(0, "cm"),
+              legend.title = element_text(face="italic", colour = 'white'),
+              plot.margin=unit(c(10,5,5,5),"mm"),
+              strip.background=element_rect(colour="#2D3A4C",fill="#2D3A4C"),
+              strip.text = element_text(face="bold", colour = 'white')
+      ))
+}
+
+scale_fill_Publication_dark <- function(...){
+   library(scales)
+   discrete_scale("fill","Publication",manual_pal(values = c("#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2")), ...)
+   
+}
+
+scale_colour_Publication_dark <- function(...){
+   library(scales)
+   discrete_scale("colour","Publication",manual_pal(values = c("#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2")), ...)
+   
+}
+
+
+# theme_transparent <- function(base_size=14, base_family="sans") {
+#    library(grid)
+#    library(ggthemes)
+#    (theme_foundation(base_size=base_size, base_family=base_family)
+#       + theme(plot.title = element_text(face = "bold", colour = '#ffffb3',
+#                                         size = rel(1.2), hjust = 0.5),
+#               text = element_text(),
+#               panel.background = element_rect(colour = NA, fill = 'transparent'),
+#               plot.background = element_rect(colour = NA, fill = 'transparent'),
+#               panel.border = element_rect(colour = NA),
+#               axis.title = element_text(face = "bold",size = rel(1), colour = 'white'),
+#               axis.title.y = element_text(angle=90,vjust =2),
+#               axis.title.x = element_text(vjust = -0.2),
+#               axis.text = element_text(colour = 'grey70'), 
+#               axis.line.x = element_line(colour="grey70"),
+#               axis.line.y = element_line(colour="grey70"),
+#               axis.ticks = element_line(colour="grey70"),
+#               panel.grid.major = element_line(colour="#262626"),
+#               panel.grid.minor = element_blank(),
+#               legend.background = element_rect(fill = 'transparent'),
+#               legend.text = element_text(color = 'white'),
+#               legend.key = element_rect(colour = NA, fill = 'grey20'),
+#               legend.position = "bottom",
+#               legend.direction = "horizontal",
+#               legend.box = "vetical",
+#               legend.key.size= unit(0.5, "cm"),
+#               #legend.margin = unit(0, "cm"),
+#               legend.title = element_text(face="italic", colour = 'white'),
+#               plot.margin=unit(c(10,5,5,5),"mm"),
+#               strip.background=element_rect(colour="#2D3A4C",fill="#2D3A4C"),
+#               strip.text = element_text(face="bold", colour = 'white')
+#       ))
+# }
+
+theme_dark_blue <- function(base_size=14, base_family="sans") {
+   library(grid)
+   library(ggthemes)
+   (theme_foundation(base_size=base_size, base_family=base_family)
+      + theme(plot.title = element_text(face = "bold", colour = '#ffffb3',
+                                        size = rel(1.2), hjust = 0.5, margin = margin(0,0,20,0)),
+              text = element_text(),
+              panel.background = element_rect(colour = NA, fill = '#282C33'),
+              plot.background = element_rect(colour = NA, fill = '#282C33'),
+              panel.border = element_rect(colour = NA),
+              axis.title = element_text(face = "bold",size = rel(1), colour = 'white'),
+              axis.title.y = element_text(angle=90,vjust =2),
+              axis.title.x = element_text(vjust = -0.2),
+              axis.text = element_text(colour = 'grey70'), 
+              axis.line.x = element_line(colour="grey70"),
+              axis.line.y = element_line(colour="grey70"),
+              axis.ticks = element_line(colour="grey70"),
+              panel.grid.major = element_line(colour="#343840"),
+              panel.grid.minor = element_blank(),
+              legend.background = element_rect(fill ='#282C33'),
+              legend.text = element_text(color = 'white'),
+              legend.key = element_rect(colour = NA, fill = '#282C33'),
+              legend.position = "bottom",
+              legend.direction = "horizontal",
+              legend.box = "vetical",
+              legend.key.size= unit(0.5, "cm"),
+              #legend.margin = unit(0, "cm"),
+              legend.title = element_text(face="italic", colour = 'white'),
+              plot.margin=unit(c(10,5,5,5),"mm"),
+              strip.background=element_rect(colour="#2D3A4C",fill="#2D3A4C"),
+              strip.text = element_text(face="bold", colour = 'white'),
+              axis.text.x = element_text(angle = 45)
+      ))
+}
\ No newline at end of file
diff --git a/src/.docker_modules/r-bolero/1.2/opt.R b/src/.docker_modules/r-bolero/1.2/opt.R
new file mode 100644
index 0000000000000000000000000000000000000000..72882e6a918de955d942145eb47add363b21c9b9
--- /dev/null
+++ b/src/.docker_modules/r-bolero/1.2/opt.R
@@ -0,0 +1,18 @@
+#Start-positions:
+opt <- data.frame(input = "/home/xavier/Data/NanoporeSimulation/20240216_pbsim3_transERRHMM_250k_SP19only/07_start-positions/All_RNAs/All_RNAs.txt",
+                  barcode = "All_RNAs",
+                  threads=18)
+
+#Junctions_NanoSplicer:
+opt <- data.frame(classification = "/home/xavier/Data/NanoporeSimulation/20240216_pbsim3_transERRHMM_250k_SP19only/07_start-positions/All_RNAs/All_RNAs_classification_of_reads_per_RNA.txt",
+                  jwr = "/home/xavier/Data/NanoporeSimulation/20240216_pbsim3_transERRHMM_250k_SP19only/10_nanosplicer/All_RNAs/All_RNAs_JWR_check.h5.csv",
+                  barcode = "All_RNAs")
+
+opt <- data.frame(classification = "/home/xavier/Data/NanoporeSimulation/20240226/07_start-positions/SP19/SP19_classification_of_reads_per_RNA.txt",
+                  jwr = "/home/xavier/Data/NanoporeSimulation/20240226/10_nanosplicer/SP19/SP19_JWR_check.h5.csv",
+                  barcode = "SP19")
+
+#HBV_RNAs count:
+opt <- data.frame(SPvariants = "./All_RNAs_identified_SPvariants_3HBx.csv",
+                  classification = "/home/xavier/Data/NanoporeSimulation/20230827_pbsim3_transERRHMM_250k_TO_THE_PAPER_newRscript/12_Start-positions_simulation/All_RNAs_classification_of_reads_per_RNA_HBx3.txt",
+                  barcode = "All_RNAs")