<% meth="merge_tabular" %>
<div class="lvl1">

    <div class="alert alert-warning" role="alert">
        <p> Although this binary's use is a bit overlapped with "intersect_columns" and "table_linker", the difference is that it can join a indefinite number of tables (taking into account that the column to join all tables must be the first one) </p>
    </div>

    <p> It is used to merge N tables based on their first column when they share the same IDs.  </p>
    
    <h3> Basic example </h3>
        <p> In this script, we'll use the --tables flag to specify all input tables, separated by commas (,). The --columns2add flag will be used to indicate the column indexes (1 based) of each file added to the first one (therefore, we will not specify the first table's columns), separating the columns in each set by commas and each set of columns (pet table) by a semicolon (;). The --fill_character flag will be used to specify which character we want the empty fields to be filled with. Lastly, we'll use the --union flag to also add the rows that do not have a match to the merging table (first table). </p>
        <p> In this case, we'll join tables  <code>tables/disease_cluster</code>, <code>tables/disease_gene</code> and <code>tables/mondo_to_orpha</code> and we will fill the empty fields with "NA". </p>
        <%
            first_table = 'disease_cluster'
            second_table = 'disease_gene'
            third_table = 'mondo_to_orpha'
            second_table_tex = 'Segunda tabla'
            third_table_tex = 'Tercera tabla'
            args = f"--tables tables/{first_table},tables/{second_table},tables/{third_table} --columns2add '1,2,3;1,2' --union --fill_character 'NA'"
        %>
		${show_n_exec(first_table, args, "cmdtabs_merge", supp_tables=[[second_table_tex, second_table], [third_table_tex, third_table]])}

</div>                                                                        