Csvtk convert converts csv files to tsv files and vice versa.
Output CSV data may not be autodetected properly to CSV format and you may have to manually change the format after.
**Limitations of Input Data** 1. The CSV parser requires all the lines have same number of fields/columns. If your file has illegal rows, set the "Illegal Rows" parameter to "Yes" to pass your data through Even lines with spaces will cause error. Example bad table below. 2. By default, csvtk thinks files have header rows. If your file does not, set global parameter "Has Header Row" to "No" 3. Column names should be unique and are case sensitive! 4. Lines starting with "#" or "$" will be ignored, if in the header row 5. If " exists in tab-delimited files, set Lazy quotes global parameter to "Yes"
Example bad table:
Head 1 | Head 2 | Head 3 | Head 3 |
---|---|---|---|
1 | 2 | 3 | |
this | will | break |
Bad tables may work if both the "Ignore Illegal Rows" and "Ignore Empty Rows" global parameters are set to "Yes", But there is no guarentee of that!
To run csvtk-convert, all you need is a valid (as defined above) CSV or TSV file
Multiple names can be given if separated by a ' , '.
- ex. 'ID,Organism' would target the columns named ID and Organism for the function
Column names are case SeNsitive
Column numbers can also be given:
-ex. '1,2,3' or '1-3' for inputting columns 1-3.
You can also specify all but unwanted column(s) with a ' - '.
- ex. '-ID' would target all columns but the ID column
For information from the creators of csvtk, please visit their site at: https://bioinf.shenwei.me/csvtk/
Although be aware that some features may not be available and some small changes were made to work with Galaxy.
Notable changes from their documentation: