From e66190a7ebf75a3e1607ef9a08f3b6d98f71d21c Mon Sep 17 00:00:00 2001 From: Andrea Telatin Date: Thu, 17 Jun 2021 17:57:28 +0100 Subject: [PATCH] fix --- docs/utilities/fu-tabcheck.md | 50 +++++++++++++++++++++++++++++++++++ seqfu.nimble | 2 +- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 docs/utilities/fu-tabcheck.md diff --git a/docs/utilities/fu-tabcheck.md b/docs/utilities/fu-tabcheck.md new file mode 100644 index 0000000..83e163e --- /dev/null +++ b/docs/utilities/fu-tabcheck.md @@ -0,0 +1,50 @@ +--- +sort: 8 +--- + +# fu-tabcheck + +An utility to parse CSV/TSV files to check that all the records have the same size. +Multiline records are supported using double quotes as field delimiter. +Gzipped files are also supported. + +``` +fu-tabcheck + + A program inspect TSV and CSV files, that must contain more than 1 column. + Double quotes are considered field delimiters, if present. + Gzipped files are supported natively. + + Usage: + fu-tabcheck [options] ... + + Options: + -s --separator CHAR Character separating the values, 'tab' for tab and 'auto' + to try tab or commas [default: auto] + -c --comment CHAR Comment/Header char [default: #] + --verbose Enable verbose mode + +``` + +## Output +Tabular output has these columns: + +* File name +* Pass/Error +* Columns number +* Records number +* Separator (when using _auto_ both tabs and commas are tested) + +Example: +``` +data/tab-int.txt.gz Pass 8 7 separator= +data/tab.txt Pass 4 3 separator= +data/table-multi.tsv Pass 2 4 separator= +data/table.csv Pass 3 3 separator=, +data/table.tsv Pass 3 4 separator= +data/table2.tsv Error +data/tablegz.tsv.gz Pass 3 4 separator= +``` + +## Exit code +A single file is not a valid table will lead to non-zero exit status. \ No newline at end of file diff --git a/seqfu.nimble b/seqfu.nimble index a0dea26..15c0336 100644 --- a/seqfu.nimble +++ b/seqfu.nimble @@ -10,7 +10,7 @@ requires "nim >= 1.2", "docopt", "terminaltables", "readfq", "iterutils", "argpa srcDir = "src" binDir = "bin" namedBin = {"sfu": "seqfu", "fu_cov": "fu-cov", "fu_primers": "fu-primers", "fu_orf": "fu-orf", -"fu-tabcheck": "fu_tabcheck", +"fu_tabcheck": "fu-tabcheck", "fu_multirelabel": "fu-multirelabel", "fu_sw": "fu-sw", "fu_index": "fu-index", "fu_nanotags": "fu-nanotags", "dadaist2_mergeseqs": "dadaist2-mergeseqs", "dadaist2_region": "fu-16Sregion"}.toTable()