aboutsummaryrefslogtreecommitdiff
path: root/uploader
diff options
context:
space:
mode:
Diffstat (limited to 'uploader')
-rw-r--r--uploader/templates/phenotypes/add-phenotypes-raw-files.html13
1 files changed, 12 insertions, 1 deletions
diff --git a/uploader/templates/phenotypes/add-phenotypes-raw-files.html b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
index 833cd87..27e71c9 100644
--- a/uploader/templates/phenotypes/add-phenotypes-raw-files.html
+++ b/uploader/templates/phenotypes/add-phenotypes-raw-files.html
@@ -337,13 +337,24 @@
var tableheader = table.find("thead");
var tablebody = table.find("tbody");
var numheadings = 0;
+ var navalues = formdata
+ .na_strings
+ .split(" ")
+ .map((v) => {return v.trim();})
+ .filter((v) => {return Boolean(v);});
filedata.forEach((line) => {
if(line.startsWith(formdata.comment_char) || linenum >= numrows) {
return false;
}
var row = $("<tr></tr>");
line.split(formdata.separator)
- .map((field) => {return field.trim();})
+ .map((field) => {
+ var value = field.trim();
+ if(navalues.includes(value)) {
+ return "⋘NUL⋙";
+ }
+ return value;
+ })
.filter((field) => {
return (field !== "" && field != undefined && field != null);
})