Closed davised closed 1 year ago
Hi Ed, that's a bug, I've fixed it. Thanks for reporting this.
$ cat 96_well_sample.txt | csvtk sep -H -s '_' -N 3 --merge | csvtk pretty -H | head
A1_S1_L001_R1_001.fastq.gz A1 S1 L001_R1_001.fastq.gz
A1_S1_L001_R2_001.fastq.gz A1 S1 L001_R2_001.fastq.gz
B1_S2_L001_R1_001.fastq.gz B1 S2 L001_R1_001.fastq.gz
$ cat 96_well_sample.txt | csvtk add-header -n fastq | csvtk sep -s '_' -n 'sample,sequence,suffix' --merge | csvtk pretty | head
fastq sample sequence suffix
---------------------------- ------ -------- --------------------
A1_S1_L001_R1_001.fastq.gz A1 S1 L001_R1_001.fastq.gz
A1_S1_L001_R2_001.fastq.gz A1 S1 L001_R2_001.fastq.gz
B1_S2_L001_R1_001.fastq.gz B1 S2 L001_R1_001.fastq.gz
Please use the new binaries.
Prerequisites
csvtk version
Describe your issue
csvtk sep
does not provide the same output when headers are disabled with-H
option.See examples below:
As you can see, the
-N 3 --merge
is not being respected. However, if headers are added:96_well_sample.txt