<%  meth="standard_name_replacer" %>

<div class="lvl1">

    <p> We'll use this when we have a table that contains a column with IDs (i.e., ensemblIDs and associated GO terms) and another table that we want to use as a dictionary to translate certain values for different ones (i.e., a table with ensemblIDs and their corresponding gene symbol).  </p>

    <h3> Basic example </h3>

        <p> We have a table with MONDO IDs and the cluster(s) where that MONDO disease has been found. We also have a file that correlates each MONDO ID with its corresponding ORPHA ID. We'll use the latter to translate all MONDO IDs to ORPHA IDs in the first table. </p>

        <p> We'll use the -i flag to specify the input table (the first table in our case) and the -I flag for the dictionary (second table). We will then use the -c flag to select the column we want to translate, the --from flag to indicate which column from the dictionary table we want to use as the search key and the --to flag to select the column in the dictionary that contains the terms we want to use for replacing in the first table.  </p>

        <%
            table_name = 'disease_cluster'
            dictionary = 'mondo_to_orpha'
            dict_table_tex = 'Tabla diccionario para reemplazar'
            args = f"-i tables/{table_name} -I tables/{dictionary} -c 1 --from 1 --to 2"
        %>
		${show_n_exec(table_name, args, "cmdtabs", supp_tables=[[dict_table_tex, dictionary]])}

    <h3> Removing untranslated entries </h3>

        <p> As we can observe in the previous example, if an ID term from the input file is not present in the dictionary, that ID remains untranslated. If we want to remove any untranslated entries, we can add the -u flag to the command. </p>

        <%
        args = f"-i tables/{table_name} -I tables/{dictionary} -c 1 --from 1 --to 2 -u"
        %>
		${show_n_exec(table_name, args, "cmdtabs", supp_tables=[[dict_table_tex, dictionary]])}

</div>                                                                            