{"id":2832,"date":"2025-07-04T17:28:21","date_gmt":"2025-07-04T21:28:21","guid":{"rendered":"https:\/\/gen-fish.ca\/?page_id=2832"},"modified":"2026-04-02T14:02:11","modified_gmt":"2026-04-02T18:02:11","slug":"decision-guiding-tools","status":"publish","type":"page","link":"https:\/\/gen-fish.ca\/fr\/decision-guiding-tools\/","title":{"rendered":"Decision-Guiding Tools"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"2832\" class=\"elementor elementor-2832\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-c15d51a elementor-section-boxed elementor-section-height-default elementor-section-height-default sc_fly_static\" data-id=\"c15d51a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-extended\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-92b8cc2 sc_content_align_inherit sc_layouts_column_icons_position_left sc_fly_static\" data-id=\"92b8cc2\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8e25ba1 sc_fly_static elementor-widget elementor-widget-heading\" data-id=\"8e25ba1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Decision-Guiding Tools<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-04e8c72 sc_fly_static elementor-widget elementor-widget-spacer\" data-id=\"04e8c72\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4dec941 sc_fly_static elementor-widget elementor-widget-text-editor\" data-id=\"4dec941\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Although its contributions to science are impressive, GEN-FISH was originally conceived as a project to design and develop <em>tools<\/em>. This means that GEN-FISH will only be considered a success in the long-term if the science is translated for actual use in the real world\u2014as broadly and widely as possible. For this reason, the social scientists on our team have worked closely with our <a href=\"https:\/\/gen-fish.ca\/partners-and-co-producers\/\"><strong>Project Partners<\/strong><\/a><strong>,<\/strong> professionals, community members, and citizen scientists from the very beginning to create decision-guiding tools for both eDNA and transcriptomics.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dfbf031 sc_fly_static elementor-widget elementor-widget-spacer\" data-id=\"dfbf031\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-51f2984 sc_fly_static elementor-widget elementor-widget-heading\" data-id=\"51f2984\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">FISH SURVEY DECISION-GUIDING TOOL<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-db3f4bf sc_fly_static elementor-widget elementor-widget-spacer\" data-id=\"db3f4bf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-767eff7 sc_fly_static elementor-widget elementor-widget-text-editor\" data-id=\"767eff7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p class=\"p1\">The Fish Survey Decision-Guiding Tool is intended for use after a preliminary assessment on the viability of eDNA as a sampling method compared to conventional methods. If eDNA is a viable option for a given project, this tool can be used to further assess the viability, allowing for simple comparisons and estimates on the basis of cost, sampling power, and several other metrics and preferences.<\/p><p>Work through the modules below and, once the model is run, the higher score represents the most effective sampling method. For more information, please reference the manual.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-79ff2f8 sc_fly_static elementor-widget elementor-widget-spacer\" data-id=\"79ff2f8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cd51ab4 sc_fly_static elementor-widget elementor-widget-html\" data-id=\"cd51ab4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<head>\n<\/head>\n\n\n<div class=\"frame\" id=\"frameMain\">\n  <div class=\"frame\">\n    <div class=\"column\">\n      <h3 class=\"headerCustom\">Functions<\/h3><br>\n      <button type=\"button\" id=\"buttonPower\" onclick=\"swapTo(frameMain, framePower)\">\n        Set Sampling Power<\/button>\n      <br><br>\n      <button type=\"button\" id=\"buttonCost\" onclick=\"swapTo(frameMain, frameCost)\">\n        Estimate Cost<\/button><br><br>\n      <label for=\"siteSelect\">Site Applicability:<\/label>\n      <select id=\"siteSelect\" name=\"siteSelect\">\n        <option value=\"none\">Select Site Applicability<\/option>\n        <option value=\"1\">1 : Poorly Suited<\/option>\n        <option value=\"2\">2 : Somewhat Poorly Suited<\/option>\n        <option value=\"3\">3 : Slightly Well Suited<\/option>\n        <option value=\"4\">4 : Moderately Well Suited<\/option>\n        <option value=\"5\">5 : Well Suited<\/option>\n        <option value=\"6\">6 : Very Well Suited<\/option>\n        <option value=\"7\">7 : Ideal for Sampling<\/option>\n      <\/select><br><br>\n      <button type=\"button\" id=\"buttonJudgment\" onclick=\"startJudgment()\">\n        Rank Criteria<\/button>\n      <br><br>\n      <button type=\"button\" onclick=\"run()\">Run Model<\/button>\n    <\/div>\n    <div class=\"column\">\n      <h3 class=\"headerCustom\">Traditional Data<\/h3><br>\n      <p id=\"tradSitesMain\">Number of Sites: <\/p>\n      <p id=\"tradPowPMain\">Power to Detect Presence: <\/p>\n      <p id=\"tradPowAMain\">Power to Detect Absence: <\/p>\n      <p id=\"tradCostMain\">Cost: <\/p>\n      <p id=\"tradGearMain\">Sampling Method: <\/p>\n      <p id=\"tradSiteMain\">Waterbody Type: <\/p>\n    <\/div>\n    <div class=\"column\">\n      <h3 class=\"headerCustom\">eDNA Data<\/h3><br>\n      <p id=\"eDNASitesMain\">Number of Sites: <\/p>\n      <p id=\"eDNAPowPMain\">Power to Detect Presence: <\/p>\n      <p id=\"eDNAPowAMain\">Power to Detect Absence: <\/p>\n      <p id=\"eDNACostMain\">Cost: <\/p>\n    <\/div>\n  <\/div>\n  <div class=\"column\">\n    <p>Sampling Applicability: <\/p>\n  <\/div>\n  <div class=\"column\">\n    <p id=\"tradApp\"><\/p>\n  <\/div>\n  <div class=\"column\">\n    <p id=\"eDNAApp\"><\/p>\n  <\/div>\n<\/div>\n<div class=\"frame hidden\" id=\"framePower\">\n  <button type=\"button\" onclick=\"swapTo(framePower, frameMain)\">\n    Cancel<\/button>\n  <div class=\"frame\">\n    <form action=\"\/action_page.php\" method=\"post\" name=\"powerForm\">\n      <div class=\"bicolumn\">\n        <h3 class=\"headerCustom\">Traditional Sampling<\/h3><br>\n        <label for=\"tradSites\">Number of Sites:<\/label>\n        <input type=\"text\" id=\"tradSites\" name=\"tradSites\"><br>\n        <label for=\"tradPowP\">Power to Detect Presence:<\/label>\n        <input type=\"text\" id=\"tradPowP\" name=\"tradPowP\"><br>\n        <label for=\"tradPowA\">Power to Detect Absence:<\/label>\n        <input type=\"text\" id=\"tradPowA\" name=\"tradPowA\"><br>\n      <\/div>\n      <div class=\"bicolumn\">\n        <h3 class=\"headerCustom\">eDNA Sampling<\/h3><br>\n        <label for=\"eDNASites\">Number of Sites:<\/label>\n        <input type=\"text\" id=\"eDNASites\" name=\"eDNASites\"><br>\n        <label for=\"eDNAPowP\">Power to Detect Presence:<\/label>\n        <input type=\"text\" id=\"eDNAPowP\" name=\"eDNAPowP\"><br>\n        <label for=\"eDNAPowA\">Power to Detect Absence:<\/label>\n        <input type=\"text\" id=\"eDNAPowA\" name=\"eDNAPowA\"><br>\n      <\/div>\n    <\/form>\n  <\/div>\n  <br><button type=\"button\" onclick=\"confirmPow()\">Confirm<\/button>\n<\/div>\n<div class=\"frame hidden\" id=\"frameCost\">\n  <button type=\"button\" onclick=\"swapTo(frameCost, frameMain)\">\n    Cancel<\/button>\n  <div class=\"frame\">\n    <form action=\"\/action_page.php\" method=\"post\" name=\"powerForm\">\n      <div class=\"bicolumn\">\n        <h3 class=\"headerCustom\">Traditional Sampling<\/h3><br>\n        <label for=\"tradSitesCost\">Number of Sites:<\/label>\n        <input type=\"text\" id=\"tradSitesCost\" name=\"tradSitesCost\"><br>\n        <label for=\"tradTeam\">Number of Team Members:<\/label>\n        <input type=\"text\" id=\"tradTeam\" name=\"tradTeam\"><br>\n        <label for=\"tradArea\">Total Sample Area (square meters):<\/label>\n        <input type=\"text\" id=\"tradArea\" name=\"tradArea\"><br>\n        <label for=\"tradWage\">Average Hourly Wage:<\/label>\n        <input type=\"text\" id=\"tradWage\" name=\"tradWage\"><br>\n        <label for=\"tradTravel\">Travel Expenses:<\/label>\n        <input type=\"text\" id=\"tradTravel\" name=\"tradTravel\"><br>\n        <label for=\"wbType\">Water Body Type:<\/label>\n        <select id=\"wbType\" name=\"wbType\">\n          <option value=\"none\">Select Water Body Type<\/option>\n          <option value=\"lake\">Lake<\/option>\n          <option value=\"stream\">Stream<\/option>\n          <option value=\"wetland\">Wetland<\/option>\n        <\/select><br>\n        <label for=\"gear\">Gear Type:<\/label>\n        <select id=\"gear\" name=\"gear\">\n          <option value=\"none\">Select Gear Type<\/option>\n          <option value=\"haul\">Haul Netting<\/option>\n          <option value=\"ef\">Electrofishing<\/option>\n        <\/select>\n      <\/div>\n      <div class=\"bicolumn\">\n        <h3 class=\"headerCustom\">eDNA Sampling<\/h3><br>\n        <label for=\"eDNASitesCost\">Number of Sites:<\/label>\n        <input type=\"text\" id=\"eDNASitesCost\" name=\"eDNASitesCost\"><br>\n        <label for=\"eDNATeam\">Number of Team Members:<\/label>\n        <input type=\"text\" id=\"eDNATeam\" name=\"eDNATeam\"><br><br>\n        <label for=\"eDNAWage\">Average Hourly Wage:<\/label>\n        <input type=\"text\" id=\"eDNAWage\" name=\"eDNAWage\"><br>\n        <label for=\"eDNATravel\">Travel Expenses:<\/label>\n        <input type=\"text\" id=\"eDNATravel\" name=\"eDNATravel\"><br>\n      <\/div>\n    <\/form>\n  <\/div>\n  <br><button type=\"button\" onclick=\"confirmCost()\">\n    Confirm<\/button>\n<\/div>\n<div class=\"frame hidden\" id=\"frameJudgment\">\n  <button type=\"button\" onclick=\"swapTo(frameJudgment, frameMain)\">\n    Cancel<\/button><br>\n  <p id=\"jdgCounter\">0 \/ 28<\/p>\n  <div class=\"column\">\n    <p id=\"option1\" style=\"font-size: 1.3em\">Option 1<\/p>\n  <\/div>\n  <div class=\"column\">\n    <p style=\"font-size: 1.3em\">Compared To...<\/p>\n  <\/div>\n  <div class=\"column\">\n    <p id=\"option2\" style=\"font-size: 1.3em\">Option 2<\/p>\n  <\/div><br>\n  <button type=\"button\" onclick=\"submitComparison(1)\">1: Equally Important<\/button>\n  <button type=\"button\" onclick=\"submitComparison(2)\">2<\/button>\n  <button type=\"button\" onclick=\"submitComparison(3)\">3<\/button>\n  <button type=\"button\" onclick=\"submitComparison(4)\">4: Moderately More Important<\/button>\n  <button type=\"button\" onclick=\"submitComparison(5)\">5<\/button>\n  <button type=\"button\" onclick=\"submitComparison(6)\">6<\/button>\n  <button type=\"button\" onclick=\"submitComparison(7)\">7: Much More Important<\/button><br><br>\n  <button type=\"button\" onclick=\"swapOptions()\">\n    Swap<\/button>\n<\/div>\n\n\n<script>\n\/\/ Store frame \/ module location for easy access in code\nvar main = document.getElementById(\"frameMain\");\nvar power = document.getElementById(\"framePower\");\nvar cost = document.getElementById(\"frameCost\");\nvar judgment = document.getElementById(\"frameJudgment\")\n\n\/\/ Initialize control variables indicating module completion\nvar costReady = false;\nvar powerDone = false;\nvar judgmentDone = false;\n\n\/\/ Initialize further control variables\n\/\/ Counts number of pairwise criteria comparisons made\nvar judgmentCount = 0;\n\/\/ Stores the two criteria being compared\nvar choiceA = 0;\nvar choiceB = 0;\n\/\/ Stores list of criteria. Note that these are just the names of criteria\n\/\/ and have no information describing behaviour\nvar judgments = ([\"Power to Detect Presence\", \"Power to Detect Absence\", \"Cost\", \"Site Applicability\", \"Lethality\", \"Seasonality\", \"Handling Fish\", \"Ease of Training\"])\n\/\/ Create the matrix used in storing ccomparisons\nlet judgmentMatrix = ([\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0]\n]);\n\/\/ Create a matrix used for temporary operations involving comparisons\nlet judgmentMatrixTemp = ([\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0, 0]\n]);\n\n\/\/Define site constructs\nconst site = {};\n\n\/\/ Create traditional and eDNA site objects\n\/\/ These objects store information about the two sampling methods\n\/\/ Most notably, they store the variables needed to estimate cost\n\/\/ As well as the power to detect presence and absence\nconst tradSite = Object.create(site);\n\/\/ The traditional site is initialized with water body and gear variables\n\/\/ to help with display and functionality in the cost module\ntradSite.wb = \"none\"\ntradSite.gear = \"none\"\n\/\/ \"dummy\" copies are made. These store temporary changes to the main\n\/\/ objects before these changes are comitted\nconst tradSiteDummy = Object.create(site);\nconst eDNASite = Object.create(site);\nconst eDNASiteDummy = Object.create(site);\n\/\/ These values reflect the difference in criteria of eDNA and traditional\n\/\/ sampling. Changes to the criteria *see above* should be reflected here.\n\/\/ Each pair represents a crieteria, with the first number relating to\n\/\/ Traditional sampling, and the second to eDNA sampling.\n\/\/ The first four values, relating to power, cost and site applicability\n\/\/ should not be changed as they are used later in code.\n\/\/ The Final four may be changed more freely.\nconst values = ([\n  [0, 0],\n  [0, 0],\n  [0, 0],\n  [0, 5],\n  [0, 1],\n  [0, 1],\n  [1, 0],\n  [0, 1]\n])\n\n\/\/ Initialize a random pairwise comparison\ngenerateComparison();\n\nfunction startJudgment() {\n  judgmentMatrixTemp = ([\n    [0, 0, 0, 0, 0, 0, 0, 0],\n    [0, 0, 0, 0, 0, 0, 0, 0],\n    [0, 0, 0, 0, 0, 0, 0, 0],\n    [0, 0, 0, 0, 0, 0, 0, 0],\n    [0, 0, 0, 0, 0, 0, 0, 0],\n    [0, 0, 0, 0, 0, 0, 0, 0],\n    [0, 0, 0, 0, 0, 0, 0, 0],\n    [0, 0, 0, 0, 0, 0, 0, 0]\n  ]);\n  judgmentCount = 0;\n  generateComparison(judgmentCount);\n  swapTo(main, judgment);\n}\n\n\/\/ Validates all input in the sampling power module\n\/\/ At present, the modules does not automatically restrict input to\n\/\/ correct decimal values. Users may input any number, including \n\/\/ those which do not make sense contextually.\n\/\/ Either decimal values, or percent values *without symbol* will function\n\/\/ provided the input is consistent.\nfunction confirmPow() {\n\/\/ Copies all validated input to the dummy site\n\/\/ Non-validated input is highlighted and not copied.\n  tradSiteDummy.sites = validateInput(document.getElementById(\"tradSites\"));\n  tradSiteDummy.powP = validateInput(document.getElementById(\"tradPowP\"));\n  tradSiteDummy.powA = validateInput(document.getElementById(\"tradPowA\"));\n  eDNASiteDummy.sites = validateInput(document.getElementById(\"eDNASites\"));\n  eDNASiteDummy.powP = validateInput(document.getElementById(\"eDNAPowP\"));\n  eDNASiteDummy.powA = validateInput(document.getElementById(\"eDNAPowA\"));\n\/\/ Checks that all input has been validated\n  if (!isNaN(tradSiteDummy.powP) && !isNaN(tradSiteDummy.powA) && !isNaN(tradSiteDummy.sites) && !isNaN(eDNASiteDummy.powP) && !isNaN(eDNASiteDummy.powA) && !isNaN(eDNASiteDummy.sites)) {\n\/\/ Copies over the data if validation was successful\n    tradSite.sites = tradSiteDummy.sites;\n    tradSite.powP = tradSiteDummy.powP;\n    tradSite.powA = tradSiteDummy.powA;\n    eDNASite.sites = eDNASiteDummy.sites;\n    eDNASite.powP = eDNASiteDummy.powP;\n    eDNASite.powA = eDNASiteDummy.powA;\n\/\/ Updates the criteria values using the supplied power\n    values[0][0] = tradSite.powP;\n    values[1][0] = tradSite.powA;\n    values[0][1] = eDNASite.powP;\n    values[1][1] = eDNASite.powA;\n\/\/ Updates controller indicating the power module has been completed\n\/\/ This update includes removing the error indicator from the module\n\/\/ button, as well as navigating to the main page.\n    powerDone = true;\n    document.getElementById(\"buttonPower\").classList.remove(\"inputError\");\n    swapTo(power, main);\n  }\n\/\/ If validation was unsuccessful, no changes are made.\n\/\/ The validate input function will highlight incorrect fields.\n}\n\n\/\/ Functions similarly to the confirmPower function.\n\/\/ As before the function will not check for logic in the entered data,\n\/\/ only ensure that proper numeric values have been used.\nfunction confirmCost() {\n\/\/ Copies all validated input to the dummy site\n\/\/ Non-validated input is highlighted and not copied.\n  tradSiteDummy.sites = validateInput(document.getElementById(\"tradSitesCost\"));\n  tradSiteDummy.team = validateInput(document.getElementById(\"tradTeam\"));\n  tradSiteDummy.area = validateInput(document.getElementById(\"tradArea\"));\n  tradSiteDummy.wage = validateInput(document.getElementById(\"tradWage\"));\n  tradSiteDummy.travel = validateInput(document.getElementById(\"tradTravel\"));\n  tradSiteDummy.wb = validateInputSelect(document.getElementById(\"wbType\"))\n  tradSiteDummy.gear = validateInputSelect(document.getElementById(\"gear\"))\n  eDNASiteDummy.sites = validateInput(document.getElementById(\"eDNASitesCost\"));\n  eDNASiteDummy.team = validateInput(document.getElementById(\"eDNATeam\"));\n  eDNASiteDummy.wage = validateInput(document.getElementById(\"eDNAWage\"));\n  eDNASiteDummy.travel = validateInput(document.getElementById(\"eDNATravel\"));\n\/\/ Checks that all input has been validated\n  if (!isNaN(tradSiteDummy.sites) && !isNaN(tradSiteDummy.team) && !isNaN(tradSiteDummy.wage) && !isNaN(tradSiteDummy.area) && !isNaN(tradSiteDummy.travel) && !isNaN(eDNASiteDummy.sites) && !isNaN(eDNASiteDummy.team) && !isNaN(eDNASiteDummy.wage) && !isNaN(eDNASiteDummy.travel) && (tradSiteDummy.wb != \"none\") && (tradSiteDummy.gear != \"none\")) {\n\/\/ Copies over the data if validation was successful\n    tradSite.sites = tradSiteDummy.sites;\n    tradSite.team = tradSiteDummy.team;\n    tradSite.area = tradSiteDummy.area;\n    tradSite.wage = tradSiteDummy.wage;\n    tradSite.travel = tradSiteDummy.travel;\n    tradSite.wb = document.getElementById(\"wbType\").value\n    tradSite.gear = document.getElementById(\"gear\").value\n    eDNASite.sites = eDNASiteDummy.sites;\n    eDNASite.team = eDNASiteDummy.team;\n    eDNASite.wage = eDNASiteDummy.wage;\n    eDNASite.travel = eDNASiteDummy.travel;\n\/\/ Updates controller indicating the cost module has been completed\n\/\/ This update includes removing the error indicator from the module\n\/\/ button, as well as navigating to the main page.\n\/\/ It should be noted that the calculation to estimate the cost\n\/\/ is performed seperately from this data validation\n\/\/ This is because the number of sites used in cost estimation\n\/\/ May be changed elsewhere in the module\n    costReady = true;\n    document.getElementById(\"buttonCost\").classList.remove(\"inputError\");\n    swapTo(cost, main);\n  }\n\/\/ If validation was unsuccessful, no changes are made.\n\/\/ The validate input function will highlight incorrect fields.\n}\n\n\/\/ Function for validating numeric input\n\/\/ Accepts positive and negative decimal values\n\/\/ \"0\" is not accepted, as it is not considered a valid input\n\/\/ Does not accept any other symbol, ie $1.00 is not validated\n\/\/ Takes as input variable the field being validated\nfunction validateInput(form) {\n\/\/ Copies the value of the input field\n  let input = form.value;\n\/\/ Checks if the input value is a number and not equal to zero\n  if (!isNaN(input) & !(input == 0)) {\n\/\/ If validated, removes the error marker from the field *if existing*\n\/\/ And returns the decimal value of the input\n    form.classList.remove(\"inputError\");\n    return Number(input);\n  } else {\n\/\/ If not validated adds the error marker to the field and returns NaN\n    form.classList.add(\"inputError\");\n    return NaN;\n  }\n}\n\n\/\/ Similar to the validate input function, this validates drop-down fields\n\/\/ The input of \"none\" *the default input of drop down fields* is rejected\n\/\/ Takes as input the location of the drop-down field\nfunction validateInputSelect(form) {\n\/\/ Take the value of the drop-down field\n  let input = form.value;\n\/\/ Checks if this value is \"none\"\n  if (input != \"none\") {\n\/\/ If validated, removes the error marker from the field *if existing*\n\/\/ And returns the string value of the input drop-down\n    form.classList.remove(\"inputError\");\n    return input;\n  } else {\n\/\/ If not validated adds the error marker to the field and returns \"none\"\n    form.classList.add(\"inputError\");\n    return \"none\";\n  }\n}\n\n\/\/ Used to swap between the larger modules that make up the page\n\/\/ Non-active modules are hidden\n\/\/ Modules are defined <div class=\"frame\">\n\/\/ Takes as input the location of the current module, and the target module\nfunction swapTo(current, target) {\n\/\/ Checks to ensure the current module is not hidden\n\/\/ Although this should always be true  it ensures that the swap function\n\/\/ Is only used where logically appropriate\n  if (!current.classList.contains(\"hidden\")) {\n\/\/ Hides the current module and removes the hidden class from the target\n    current.classList.add(\"hidden\");\n    target.classList.remove(\"hidden\");\n\/\/ Updates the entries in the Main, Power and Cost modules.\n\/\/ As changes in one module may affect the others the update functions\n\/\/ are all ran at this time. This also preserves generality of function\n\/\/ and avoids the need to account for any potential special cases\n    mainUpdate();\n    powerUpdate();\n    costUpdate();\n  }\n}\n\n\/\/ The function calculates the estimated cost of sampling \n\/\/ for traditional methods\n\/\/ It uses data from a multiple linear regression of sampling metadata\nfunction calculateCostTrad() {\n\/\/ Defines the regression constants used in calculation\n\/\/ The definitions are isolated here to allow for easy updating\n\/\/ b0 is the constant term\n  let b0 = 2.98117;\n\/\/ b1 relates to the total area of sites\n  let b1 = 0.16352;\n\/\/ b2 relates to the number of team members\n  let b2 = 0.12447;\n\/\/ b3 relates to the number of sites sampled\n  let b3 = 0.49296;\n  let wb = 0;\n  let gear = 0;\n  let gearCost = 0;\n\/\/ Grabs water body type data from the traditional sampling object\n\/\/ Based on that value, wb, the categorical regression constant is\n\/\/ defined.\n  if (tradSite.wb == \"lake\") {\n    wb = 0;\n  } else if (tradSite.wb == \"stream\") {\n    wb = 0.15213;\n  } else if (tradSite.wb == \"wetland\") {\n    wb = 0.10546;\n  }\n\/\/ Grabs sampling gear data from the traditional sampling object\n\/\/ Based on that value, gear, the categorical regression constant is\n\/\/ defined.\n\/\/ The amortized cost of this sampling gear is also defined here.\n  if (tradSite.gear == \"ef\") {\n    gear = 0;\n    gearCost = 505.85;\n  } else if (tradSite.gear == \"haul\") {\n    gear = 0.93750;\n    gearCost = 196.09;\n  }\n\/\/ Calculates the effort following the model developed through \n\/\/ multiple linear regression alnalysis. The natural log of effort\n\/\/ is first calculated. Then the total cost is calculated using\n\/\/ a combination of this effort value, the number of team members,\n\/\/ the wage they are being payed, and travel and gear costs.\n  let effort = (b0 + b1 * Math.log(tradSite.area) + b2 * Math.log(tradSite.team) + b3 * Math.log(tradSite.sites) + wb + gear);\n  effort = Math.exp(effort) \/ 60;\n  effort = effort * tradSite.team * tradSite.wage;\n  effort = effort + tradSite.travel;\n  effort = effort + gearCost;\n\/\/ The final cost is passed to the appropriate criteria value for \n\/\/ use in MCDA comparison.\n  values[2][0] = effort;\n\/\/ This final cost is also returned by the function for display on the\n\/\/ main page of the tool\n  return effort;\n}\n\n\/\/ The function calculates the estimated cost of sampling \n\/\/ for eDNA methods\n\/\/ It uses data from a multiple linear regression of sampling metadata\nfunction calculateCosteDNA() {\n\/\/ Defines the regression constants used in calculation\n\/\/ The definitions are isolated here to allow for easy updating\n\/\/ b0 is the constant term\n  let b0 = 3.21342;\n\/\/ b2 relates to the number of team members\n  let b2 = -0.57121;\n\/\/ b3 relates to the number of sites sampled\n  let b3 = 0.83021;\n  let wb = 0;\n\/\/ Grabs water body type data from the traditional sampling object\n\/\/ Based on that value, wb, the categorical regression constant is\n\/\/ defined.\n\/\/ This tool makes the assumption that traditional and eDNA sampling are to\n\/\/ be performed at the same site. As such, the water body type is only\n\/\/ stored one time, in the traditional site object.\n  if (tradSite.wb == \"lake\") {\n    wb = 0;\n  } else if (tradSite.wb == \"stream\") {\n    wb = -0.19578;\n  } else if (tradSite.wb == \"wetland\") {\n    wb = -0.09540;\n  }\n\/\/ Calculates the effort following the model developed through \n\/\/ multiple linear regression alnalysis. The natural log of effort\n\/\/ is first calculated. Then the total cost is calculated using\n\/\/ a combination of this effort value, the number of team members,\n\/\/ the wage they are being payed, and travel and gear costs.\n  let effort = (b0 + b2 * Math.log(eDNASite.team) + b3 * Math.log(eDNASite.sites) + wb);\n  effort = Math.exp(effort) \/ 60;\n  effort = effort * eDNASite.team * eDNASite.wage;\n  effort = effort + eDNASite.travel;\n\/\/ eDNA gear or lab costs are usually determined by gourps of several sites\n\/\/ ie. there is a specific cost to process samples from 5 sites\n\/\/ thus, for between 6 and 10 sites this cost does not change\n  effort = effort + 250 * Math.ceil(eDNASite.sites \/ 5);\n\/\/ The final cost is passed to the appropriate criteria value for \n\/\/ use in MCDA comparison.\n  values[2][1] = effort;\n\/\/ This final cost is also returned by the function for display on the\n\/\/ main page of the tool\n  return effort;\n}\n\n\/\/ The function updating the information displayed on the main page.\n\/\/ This function is called each time the tool switches between modules\n\/\/ In general, each of the fields is updated in the same way.\nfunction mainUpdate() {\n\/\/ Checks if the number of sites field in the traditional sites\n\/\/ object is a number.\n  if (!isNaN(tradSite.sites)) {\n\/\/ If a number is found, the appropriate field on the main page is\n\/\/ updated to reflect this value.\n\/\/ If a number is not found, no changes are made. In general, once\n\/\/ the number of sites has been updated with a numeric value it will\n\/\/ never return to a NaN value.\n    document.getElementById(\"tradSitesMain\").innerHTML = \"Number of Sites: \" + Number(tradSite.sites.toFixed(2));\n  }\n\/\/ All other fields *with the exception of Method and Waterbody type*\n\/\/ are updated in the same manner\n  if (!isNaN(eDNASite.sites)) {\n    document.getElementById(\"eDNASitesMain\").innerHTML = \"Number of Sites: \" + Number(eDNASite.sites.toFixed(2));\n  }\n  if (!isNaN(tradSite.powP)) {\n    document.getElementById(\"tradPowPMain\").innerHTML = \"Power to Detect Presence: \" + Number(tradSite.powP.toFixed(2));\n  }\n  if (!isNaN(eDNASite.powP)) {\n    document.getElementById(\"eDNAPowPMain\").innerHTML = \"Power to Detect Presence: \" + Number(eDNASite.powP.toFixed(2));\n  }\n  if (!isNaN(tradSite.powA)) {\n    document.getElementById(\"tradPowAMain\").innerHTML = \"Power to Detect Absence: \" + Number(tradSite.powA.toFixed(2));\n  }\n  if (!isNaN(eDNASite.powA)) {\n    document.getElementById(\"eDNAPowAMain\").innerHTML = \"Power to Detect Absence: \" + Number(eDNASite.powA.toFixed(2));\n  }\n\/\/ If the cost module has been flagged as completed, the costs\n\/\/ are calculated and displayed.\n  if (costReady) {\n    tradSite.cost = calculateCostTrad();\n    document.getElementById(\"tradCostMain\").innerHTML = \"Cost: \" + Number(tradSite.cost.toFixed(2));\n    eDNASite.cost = calculateCosteDNA();\n    document.getElementById(\"eDNACostMain\").innerHTML = \"Cost: \" + Number(eDNASite.cost.toFixed(2));\n  }\n\/\/ For the categorical fields of waterbody type and gear type\n\/\/ The value is checked. Depending on this value, the field\n\/\/ is updated with the appropriate text.\n  if (tradSite.wb == \"none\") {\n    document.getElementById(\"tradSiteMain\").innerHTML = \"Waterbody Type: \"\n  } else if (tradSite.wb == \"lake\") {\n    document.getElementById(\"tradSiteMain\").innerHTML = \"Waterbody Type: Lake\"\n  } else if (tradSite.wb == \"stream\") {\n    document.getElementById(\"tradSiteMain\").innerHTML = \"Waterbody Type: Stream\"\n  } else if (tradSite.wb == \"wetland\") {\n    document.getElementById(\"tradSiteMain\").innerHTML = \"Waterbody Type: Wetland\"\n  }\n  if (tradSite.gear == \"none\") {\n    document.getElementById(\"tradGearMain\").innerHTML = \"Sampling Method: \"\n  } else if (tradSite.gear == \"haul\") {\n    document.getElementById(\"tradGearMain\").innerHTML = \"Sampling Method: Haul Netting\"\n  } else if (tradSite.gear == \"ef\") {\n    document.getElementById(\"tradGearMain\").innerHTML = \"Sampling Method: Electrofishing\"\n  }\n}\n\n\/\/ The function updating the information displayed on the power module.\n\/\/ This function is called each time the tool switches between modules\n\/\/ In general, each of the fields is updated in the same way.\nfunction powerUpdate() {\n\/\/ Removes all existing input error tags\n  document.getElementById(\"tradSites\").classList.remove(\"inputError\");\n  document.getElementById(\"tradPowP\").classList.remove(\"inputError\");\n  document.getElementById(\"tradPowA\").classList.remove(\"inputError\");\n  document.getElementById(\"eDNASites\").classList.remove(\"inputError\");\n  document.getElementById(\"eDNAPowP\").classList.remove(\"inputError\");\n  document.getElementById(\"eDNAPowA\").classList.remove(\"inputError\");\n\/\/ Checks if the number of sites field in the traditional sites\n\/\/ object is a number.\n  if (!isNaN(tradSite.sites)) {\n\/\/ If a number is found, the appropriate field on the module is\n\/\/ updated to reflect this value.\n\/\/ If a number is not found, the field is changed to be blank.\n    document.getElementById(\"tradSites\").value = Number(tradSite.sites);\n  } else {\n    document.getElementById(\"tradSites\").value = \"\";\n  }\n\/\/ All other fields are updated in the same manner\n  if (!isNaN(tradSite.powP)) {\n    document.getElementById(\"tradPowP\").value = Number(tradSite.powP);\n  } else {\n    document.getElementById(\"tradPowP\").value = \"\";\n  }\n  if (!isNaN(tradSite.powA)) {\n    document.getElementById(\"tradPowA\").value = Number(tradSite.powA);\n  } else {\n    document.getElementById(\"tradPowA\").value = \"\";\n  }\n  if (!isNaN(eDNASite.sites)) {\n    document.getElementById(\"eDNASites\").value = Number(eDNASite.sites);\n  } else {\n    document.getElementById(\"eDNASites\").value = \"\";\n  }\n  if (!isNaN(eDNASite.powP)) {\n    document.getElementById(\"eDNAPowP\").value = Number(eDNASite.powP);\n  } else {\n    document.getElementById(\"eDNAPowP\").value = \"\";\n  }\n  if (!isNaN(eDNASite.powA)) {\n    document.getElementById(\"eDNAPowA\").value = Number(eDNASite.powA);\n  } else {\n    document.getElementById(\"eDNAPowA\").value = \"\";\n  }\n}\n\n\/\/ The function updating the information displayed on the cost module.\n\/\/ This function is called each time the tool switches between modules\n\/\/ In general, each of the fields is updated in the same way.\nfunction costUpdate() {\n\/\/ Removes all existing input error tags\n  document.getElementById(\"tradSitesCost\").classList.remove(\"inputError\");\n  document.getElementById(\"tradTeam\").classList.remove(\"inputError\");\n  document.getElementById(\"tradArea\").classList.remove(\"inputError\");\n  document.getElementById(\"tradWage\").classList.remove(\"inputError\");\n  document.getElementById(\"tradTravel\").classList.remove(\"inputError\");\n  document.getElementById(\"wbType\").classList.remove(\"inputError\");\n  document.getElementById(\"gear\").classList.remove(\"inputError\");\n  document.getElementById(\"eDNASitesCost\").classList.remove(\"inputError\");\n  document.getElementById(\"eDNATeam\").classList.remove(\"inputError\");\n  document.getElementById(\"eDNAWage\").classList.remove(\"inputError\");\n  document.getElementById(\"eDNATravel\").classList.remove(\"inputError\");\n\/\/ Checks if the number of sites field in the traditional sites\n\/\/ object is a number.\n  if (!isNaN(tradSite.sites)) {\n\/\/ If a number is found, the appropriate field on the module is\n\/\/ updated to reflect this value.\n\/\/ If a number is not found, the field is changed to be blank.\n    document.getElementById(\"tradSitesCost\").value = Number(tradSite.sites);\n  } else {\n    document.getElementById(\"tradSitesCost\").value = \"\";\n  }\n\/\/ All other fields are updated in the same manner\n  if (!isNaN(tradSite.team)) {\n    document.getElementById(\"tradTeam\").value = Number(tradSite.team);\n  } else {\n    document.getElementById(\"tradTeam\").value = \"\";\n  }\n  if (!isNaN(tradSite.area)) {\n    document.getElementById(\"tradArea\").value = Number(tradSite.area);\n  } else {\n    document.getElementById(\"tradArea\").value = \"\";\n  }\n  if (!isNaN(tradSite.wage)) {\n    document.getElementById(\"tradWage\").value = Number(tradSite.wage);\n  } else {\n    document.getElementById(\"tradWage\").value = \"\";\n  }\n  if (!isNaN(tradSite.travel)) {\n    document.getElementById(\"tradTravel\").value = Number(tradSite.travel);\n  } else {\n    document.getElementById(\"tradTravel\").value = \"\";\n  }\n  if (tradSite.wb != \"none\") {\n    document.getElementById(\"wbType\").value = tradSite.wb\n  } else {\n    document.getElementById(\"wbType\").value = \"none\"\n  }\n  if (tradSite.gear != \"none\") {\n    document.getElementById(\"gear\").value = tradSite.gear\n  } else {\n    document.getElementById(\"gear\").value = \"none\"\n  }\n  if (!isNaN(eDNASite.sites)) {\n    document.getElementById(\"eDNASitesCost\").value = Number(eDNASite.sites);\n  } else {\n    document.getElementById(\"eDNASitesCost\").value = \"\";\n  }\n  if (!isNaN(eDNASite.team)) {\n    document.getElementById(\"eDNATeam\").value = Number(eDNASite.team);\n  } else {\n    document.getElementById(\"eDNATeam\").value = \"\";\n  }\n  if (!isNaN(eDNASite.wage)) {\n    document.getElementById(\"eDNAWage\").value = Number(eDNASite.wage);\n  } else {\n    document.getElementById(\"eDNAWage\").value = \"\";\n  }\n  if (!isNaN(eDNASite.travel)) {\n    document.getElementById(\"eDNATravel\").value = Number(eDNASite.travel);\n  } else {\n    document.getElementById(\"eDNATravel\").value = \"\";\n  }\n}\n\n\/\/ Function defining matral multiplication\n\/\/ Here it is used specifically with 8*8 matrices, so certain functions\n\/\/ are hard-coded in\n\/\/ Takes as input the first matrix and the second matrix to be multiplied\nfunction matrixMult(matrixA, matrixB) {\n\/\/ Ensures the matrices can be multiplied\n  if (matrixA.length != matrixB[0].length) {\n    console.log(\"Unequal Sized Matrices\");\n    return false;\n  } else {\n\/\/ If the matrices can be multiplied the 8*8 output is created\n    let outputMatrix = ([\n      [0, 0, 0, 0, 0, 0, 0, 0],\n      [0, 0, 0, 0, 0, 0, 0, 0],\n      [0, 0, 0, 0, 0, 0, 0, 0],\n      [0, 0, 0, 0, 0, 0, 0, 0],\n      [0, 0, 0, 0, 0, 0, 0, 0],\n      [0, 0, 0, 0, 0, 0, 0, 0],\n      [0, 0, 0, 0, 0, 0, 0, 0],\n      [0, 0, 0, 0, 0, 0, 0, 0]\n    ]);\n\/\/ For each row in matrix A and each column in matrix B\n\/\/ Entry n from the row and column and multiplied and added\n\/\/ This total is added to the output matrix at row, column\n    for (let i in matrixA[0]) {\n      for (let j in matrixB) {\n        for (let k in matrixA) {\n          outputMatrix[j][i] += matrixA[k][i] * matrixB[j][k];\n        }\n      }\n    }\n    return outputMatrix\n  }\n}\n\n\/\/ Generates a random pairing of two criteria that have yet to be compared\n\/\/ Takes as input the number of comparisons made so far\nfunction generateComparison(count) {\n\/\/ While the randomly chosen criteria have been compared already\n\/\/ New criteria are generated\n  while ((choiceA == choiceB) || (judgmentMatrixTemp[choiceA][choiceB] != 0)) {\n    choiceA = getRandom(8);\n    choiceB = getRandom(8);\n  }\n\/\/ When an unused comparison is found, the number of comparisons made\n\/\/ as well as the fields displaying the chosen criteria are updated\n\/\/ The text defining the criteria is defined during initialization\n  document.getElementById(\"jdgCounter\").innerHTML = count + \" \/ 28\";\n  document.getElementById(\"option1\").innerHTML = judgments[choiceA];\n  document.getElementById(\"option2\").innerHTML = judgments[choiceB];\n}\n\n\n\/\/ Fuction swapping the two criteria being compared\nfunction swapOptions() {\n\/\/ criteria are swapped, then the dsiplay fields are updated\n  let choiceHolder = choiceA;\n  choiceA = choiceB;\n  choiceB = choiceHolder;\n  document.getElementById(\"option1\").innerHTML = judgments[choiceA];\n  document.getElementById(\"option2\").innerHTML = judgments[choiceB];\n}\n\n\/\/ Function accepting the pairwise comparison between two criteria\n\/\/ Takes as input the value of that comparison between 1 and 7\nfunction submitComparison(value) {\n\/\/ The matrix holding in-progress comparisons is updated\n\/\/ The more preferable criteria defines the row, \n\/\/ the less-preferable the column\n\/\/ This cell takes the value of the comparison.\n\/\/ The cell with opposite indices takes the inverse of this value\n  judgmentMatrixTemp[choiceA][choiceB] = value;\n  judgmentMatrixTemp[choiceB][choiceA] = 1 \/ value;\n\/\/ The count of comparisons is incremented\n  judgmentCount += 1;\n\/\/ If fewer than 28 *all* judgments have been performed a new pair is\n\/\/ generated\n  if (judgmentCount < 28) {\n    generateComparison(judgmentCount);\n  } else {\n\/\/ Otherwise, the diagonal is filled with 1s\n\/\/ The in-progress comparisons are passed to the completed comparison\n\/\/ matrix, and the comparison control value is updated as complete.\n\/\/ The module switches to the main page\n    for (let i = 0; i < 8; i++) {\n      judgmentMatrixTemp[i][i] = 1;\n    }\n    judgmentDone = true;\n    judgmentMatrix = judgmentMatrixTemp;\n    document.getElementById(\"buttonJudgment\").classList.remove(\"inputError\");\n    swapTo(judgment, main);\n  }\n}\n\n\/\/ Function simply defining the creation of a random number\n\/\/ between 0 and a mximum value\nfunction getRandom(max) {\n  return Math.floor(Math.random() * max)\n}\n\n\/\/ Function which performs the MCDA math\n\/\/ When all the modules have been completed this will generate a\n\/\/ Value between 0 and 1 for each of the traditional and eDNA sampling\n\/\/ methods, indicating how preferable they are under the current\n\/\/ conditions.\nfunction run() {\n\/\/ Checks if each module is complete\n\/\/ Any incomplete module is highlighted with the error class\n\/\/ A single uncomplete module will cause the process not to run, but \n\/\/ all will be checked regardless.\n  let noGood = false;\n  if (powerDone != true) {\n    noGood = true;\n    document.getElementById(\"buttonPower\").classList.add(\"inputError\");\n  }\n  if (costReady != true) {\n    noGood = true;\n    document.getElementById(\"buttonCost\").classList.add(\"inputError\");\n  }\n  if (judgmentDone != true) {\n    noGood = true;\n    document.getElementById(\"buttonJudgment\").classList.add(\"inputError\");\n  }\n  if (document.getElementById(\"siteSelect\").value == \"none\") {\n    noGood = true;\n    document.getElementById(\"siteSelect\").classList.add(\"inputError\");\n  } else {\n    document.getElementById(\"siteSelect\").classList.remove(\"inputError\");\n\/\/ While the site applicability is being validated, its value is passed\n\/\/ to the appropriate criteria\n    values[3][0] = Number(document.getElementById(\"siteSelect\").value);\n  }\n  if (noGood == true) {\n\/\/ If any module is incomplete the function returns 0\n    return 0;\n  }\n\n\/\/ The pairwise comparison matrix is squared several times.\n\/\/ This helps ensure the matrix is coherent, and moves it in that direction\n\/\/ if it is not.\n  let finalMatrix = matrixMult(judgmentMatrix, judgmentMatrix);\n  finalMatrix = matrixMult(finalMatrix, judgmentMatrix);\n\/\/ Matrices needed for the MCDA process are initialized.\n\/\/ For each criteria the score *taken from the comparison matrix*\n\/\/ the modified criteria value and the maximum and minimum values\n\/\/ across both traditional and eDNA sampling are needed\n  let scores = ([0, 0, 0, 0, 0, 0, 0, 0]);\n  let modValues = ([\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0]\n  ]);\n  let maxMin = ([\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0],\n    [0, 0]\n  ]);\n\/\/ The scores for each criteria are determined based on the total\n\/\/ of the associated row in the comparison matrix at the total sum of\n\/\/ all values in the matrix\n  let total = 0;\n  for (let i = 0; i < 8; i++) {\n    for (let j = 0; j < 8; j++) {\n      scores[i] += finalMatrix[j][i];\n      total += finalMatrix[j][i];\n    }\n  }\n  for (let i = 0; i < 8; i++) {\n    scores[i] = scores[i] \/ total;\n  }\n\/\/ Modified criteria values are created based on the scores and values\n  for (let i = 0; i < 8; i++) {\n    modValues[i][0] = (scores[i] * values[i][0]) \/ Math.sqrt(Math.pow(values[i][0], 2) + Math.pow(values[i][1], 2));\n    modValues[i][1] = (scores[i] * values[i][1]) \/ Math.sqrt(Math.pow(values[i][0], 2) + Math.pow(values[i][1], 2));\n    if (i == 0) {\n\/\/ Maximum and minimum values are found\n\/\/ For cost, the minimum value is defined and being more preferable\n      maxMin[i][0] = Math.min(modValues[i][0], modValues[i][1]);\n      maxMin[i][1] = Math.max(modValues[i][0], modValues[i][1]);\n    } else {\n      maxMin[i][0] = Math.max(modValues[i][0], modValues[i][1]);\n      maxMin[i][1] = Math.min(modValues[i][0], modValues[i][1]);\n    }\n  }\n\/\/ The best and worst possible options as a combination of the \n\/\/ better and worse values are calculated\n  let bestWorst = ([\n    [0, 0],\n    [0, 0]\n  ]);\n  for (let i = 0; i < 8; i++) {\n    bestWorst[0][0] += Math.pow((modValues[i][0] - maxMin[i][0]), 2);\n    bestWorst[0][1] += Math.pow((modValues[i][1] - maxMin[i][0]), 2);\n    bestWorst[1][0] += Math.pow((modValues[i][0] - maxMin[i][1]), 2);\n    bestWorst[1][1] += Math.pow((modValues[i][1] - maxMin[i][1]), 2);\n  }\n  bestWorst[0][0] = Math.sqrt(bestWorst[0][0]);\n  bestWorst[0][1] = Math.sqrt(bestWorst[0][1]);\n  bestWorst[1][0] = Math.sqrt(bestWorst[1][0]);\n  bestWorst[1][1] = Math.sqrt(bestWorst[1][1]);\n\/\/ A distance between the sampling methods and the best and worst \n\/\/ options is defined. This is the final score displayed\n  let tradScore = bestWorst[1][0] \/ (bestWorst[1][0] + bestWorst[0][0]);\n  let eDNAScore = bestWorst[1][1] \/ (bestWorst[1][1] + bestWorst[0][1]);\n\/\/ The main page of the tool is updated with these scores.\n  console.log(\"Trad Score = \");\n  console.log(tradScore);\n  document.getElementById(\"tradApp\").innerHTML = Number(tradScore.toFixed(2));\n  console.log(\"eDNA Score = \");\n  console.log(eDNAScore);\n  document.getElementById(\"eDNAApp\").innerHTML = Number(eDNAScore.toFixed(2));\n}\n<\/script>\n\n<style>\n.column {\n  float: left;\n  width: 33.33%;\n}\n\n.bicolumn {\n  float: left;\n  width: 50%;\n}\n\n.frame:after {\n  content: \"\";\n  display: table;\n  clear: both;\n}\n\n.hidden {\n  display: none;\n}\n\n.inputError {\n  background: rgba(255, 0, 0, 0.6);\n  color: #000;\n}\n\n.headerCustom {\n  font-family: Verdana, Sans-serif;\n}\n<\/style>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-53371a6 elementor-align-center sc_fly_static elementor-widget elementor-widget-button\" data-id=\"53371a6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/gen-fish.ca\/wp-content\/uploads\/2025\/07\/MCDA-Manual-Online-Version.pdf\" target=\"_blank\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t<span class=\"elementor-button-icon\">\n\t\t\t\t<i aria-hidden=\"true\" class=\"icon icon-download\"><\/i>\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">DOWNLOAD MANUAL<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-75a8555 sc_fly_static elementor-widget elementor-widget-spacer\" data-id=\"75a8555\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c278eff sc_fly_static elementor-widget elementor-widget-heading\" data-id=\"c278eff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">FISH HEALTH DECISION TREE<\/h5>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-758666a sc_fly_static elementor-widget elementor-widget-spacer\" data-id=\"758666a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3c711d8 sc_fly_static elementor-widget elementor-widget-text-editor\" data-id=\"3c711d8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p class=\"p1\">Interested in exploring the most appropriate methods for your fish health assessment goals? Work through the guided Fish Health Decision Tree below, and find additional resources in the <strong><a href=\"https:\/\/gen-fish.ca\/omics-applications\/\">Omics Applications and Fisheries<\/a><\/strong> section.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ccf7e51 sc_fly_static elementor-widget elementor-widget-spacer\" data-id=\"ccf7e51\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"spacer.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-spacer\">\n\t\t\t<div class=\"elementor-spacer-inner\"><\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d09b55a sc_fly_static elementor-widget elementor-widget-html\" data-id=\"d09b55a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<iframe src=\"https:\/\/gen-fish.ca\/wp-content\/uploads\/2026\/04\/GLFC_Decision_Tree_31MAR26.pdf\" width=\"100%\" height=\"775px\"><\/iframe>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Decision-Guiding Tools Although its contributions to science are impressive, GEN-FISH was originally conceived as a project to design and develop tools. This means that GEN-FISH will only be considered a&hellip;<\/p>","protected":false},"author":8,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nf_dc_page":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-2832","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Decision-Guiding Tools &#187; GEN-FISH<\/title>\n<meta name=\"description\" content=\"Although its contributions to science are impressive, GEN-FISH was originally conceived as a project to design and develop tools. This means that GEN-FISH will only be considered a success in the long-term if the science is translated for actual use in the real world\u2014as broadly and widely as possible.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gen-fish.ca\/fr\/decision-guiding-tools\/\" \/>\n<meta property=\"og:locale\" content=\"fr_CA\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Decision-Guiding Tools &#187; GEN-FISH\" \/>\n<meta property=\"og:description\" content=\"Although its contributions to science are impressive, GEN-FISH was originally conceived as a project to design and develop tools. This means that GEN-FISH will only be considered a success in the long-term if the science is translated for actual use in the real world\u2014as broadly and widely as possible.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gen-fish.ca\/fr\/decision-guiding-tools\/\" \/>\n<meta property=\"og:site_name\" content=\"GEN-FISH\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-02T18:02:11+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimation du temps de lecture\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/decision-guiding-tools\\\/\",\"url\":\"https:\\\/\\\/gen-fish.ca\\\/decision-guiding-tools\\\/\",\"name\":\"Decision-Guiding Tools &#187; GEN-FISH\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/#website\"},\"datePublished\":\"2025-07-04T21:28:21+00:00\",\"dateModified\":\"2026-04-02T18:02:11+00:00\",\"description\":\"Although its contributions to science are impressive, GEN-FISH was originally conceived as a project to design and develop tools. This means that GEN-FISH will only be considered a success in the long-term if the science is translated for actual use in the real world\u2014as broadly and widely as possible.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/decision-guiding-tools\\\/#breadcrumb\"},\"inLanguage\":\"fr-CA\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/gen-fish.ca\\\/decision-guiding-tools\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/decision-guiding-tools\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/gen-fish.ca\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Decision-Guiding Tools\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/#website\",\"url\":\"https:\\\/\\\/gen-fish.ca\\\/\",\"name\":\"GEN-FISH\",\"description\":\"Genomic Network for Fish Identification, Stress and Health\",\"publisher\":{\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/gen-fish.ca\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-CA\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/#organization\",\"name\":\"GEN-FISH\",\"url\":\"https:\\\/\\\/gen-fish.ca\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-CA\",\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/gen-fish.ca\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/Logo-for-header.jpg\",\"contentUrl\":\"https:\\\/\\\/gen-fish.ca\\\/wp-content\\\/uploads\\\/2019\\\/12\\\/Logo-for-header.jpg\",\"width\":1044,\"height\":296,\"caption\":\"GEN-FISH\"},\"image\":{\"@id\":\"https:\\\/\\\/gen-fish.ca\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Decision-Guiding Tools &#187; GEN-FISH","description":"Although its contributions to science are impressive, GEN-FISH was originally conceived as a project to design and develop tools. This means that GEN-FISH will only be considered a success in the long-term if the science is translated for actual use in the real world\u2014as broadly and widely as possible.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gen-fish.ca\/fr\/decision-guiding-tools\/","og_locale":"fr_CA","og_type":"article","og_title":"Decision-Guiding Tools &#187; GEN-FISH","og_description":"Although its contributions to science are impressive, GEN-FISH was originally conceived as a project to design and develop tools. This means that GEN-FISH will only be considered a success in the long-term if the science is translated for actual use in the real world\u2014as broadly and widely as possible.","og_url":"https:\/\/gen-fish.ca\/fr\/decision-guiding-tools\/","og_site_name":"GEN-FISH","article_modified_time":"2026-04-02T18:02:11+00:00","twitter_card":"summary_large_image","twitter_misc":{"Estimation du temps de lecture":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gen-fish.ca\/decision-guiding-tools\/","url":"https:\/\/gen-fish.ca\/decision-guiding-tools\/","name":"Decision-Guiding Tools &#187; GEN-FISH","isPartOf":{"@id":"https:\/\/gen-fish.ca\/#website"},"datePublished":"2025-07-04T21:28:21+00:00","dateModified":"2026-04-02T18:02:11+00:00","description":"Although its contributions to science are impressive, GEN-FISH was originally conceived as a project to design and develop tools. This means that GEN-FISH will only be considered a success in the long-term if the science is translated for actual use in the real world\u2014as broadly and widely as possible.","breadcrumb":{"@id":"https:\/\/gen-fish.ca\/decision-guiding-tools\/#breadcrumb"},"inLanguage":"fr-CA","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gen-fish.ca\/decision-guiding-tools\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/gen-fish.ca\/decision-guiding-tools\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gen-fish.ca\/"},{"@type":"ListItem","position":2,"name":"Decision-Guiding Tools"}]},{"@type":"WebSite","@id":"https:\/\/gen-fish.ca\/#website","url":"https:\/\/gen-fish.ca\/","name":"GEN-FISH","description":"Genomic Network for Fish Identification, Stress and Health","publisher":{"@id":"https:\/\/gen-fish.ca\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gen-fish.ca\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-CA"},{"@type":"Organization","@id":"https:\/\/gen-fish.ca\/#organization","name":"GEN-FISH","url":"https:\/\/gen-fish.ca\/","logo":{"@type":"ImageObject","inLanguage":"fr-CA","@id":"https:\/\/gen-fish.ca\/#\/schema\/logo\/image\/","url":"https:\/\/gen-fish.ca\/wp-content\/uploads\/2019\/12\/Logo-for-header.jpg","contentUrl":"https:\/\/gen-fish.ca\/wp-content\/uploads\/2019\/12\/Logo-for-header.jpg","width":1044,"height":296,"caption":"GEN-FISH"},"image":{"@id":"https:\/\/gen-fish.ca\/#\/schema\/logo\/image\/"}}]}},"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/gen-fish.ca\/fr\/wp-json\/wp\/v2\/pages\/2832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gen-fish.ca\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gen-fish.ca\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gen-fish.ca\/fr\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/gen-fish.ca\/fr\/wp-json\/wp\/v2\/comments?post=2832"}],"version-history":[{"count":5,"href":"https:\/\/gen-fish.ca\/fr\/wp-json\/wp\/v2\/pages\/2832\/revisions"}],"predecessor-version":[{"id":3036,"href":"https:\/\/gen-fish.ca\/fr\/wp-json\/wp\/v2\/pages\/2832\/revisions\/3036"}],"wp:attachment":[{"href":"https:\/\/gen-fish.ca\/fr\/wp-json\/wp\/v2\/media?parent=2832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}