Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Telatin authored and Andrea Telatin committed Jun 17, 2021
1 parent 0a9c4cb commit e66190a
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
50 changes: 50 additions & 0 deletions docs/utilities/fu-tabcheck.md
Original file line number Diff line number Diff line change
@@ -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] <FILE>...
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=<tab>
data/tab.txt Pass 4 3 separator=<tab>
data/table-multi.tsv Pass 2 4 separator=<tab>
data/table.csv Pass 3 3 separator=,
data/table.tsv Pass 3 4 separator=<tab>
data/table2.tsv Error
data/tablegz.tsv.gz Pass 3 4 separator=<tab>
```

## Exit code
A single file is not a valid table will lead to non-zero exit status.
2 changes: 1 addition & 1 deletion seqfu.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit e66190a

Please sign in to comment.