[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-datamash] Datamash for Windows - datamash-1.3-no-locale-64bit.e
From: |
Assaf Gordon |
Subject: |
Re: [Bug-datamash] Datamash for Windows - datamash-1.3-no-locale-64bit.exe |
Date: |
Fri, 7 Dec 2018 07:34:38 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 |
Hello,
(sorry for the delayed reply)
On 2018-11-27 7:14 a.m., Ted Marynicz wrote:
Downloaded from
http://mirror.netcologne.de/savannah/datamash/windows-binaries/datamash-1.3-no-locale-64bit.exe
Appears to contain several bugs.
1. Running the examples with genes.txt
=============================
C:\>datamash -s -g 13 count 2 < genes.txt
'LC_ALL' is not recognized as an internal or external command,
operable program or batch file.
datamash: read error (on close)
This problem is due to using the sort option (-s)
in the windows command shell (cmd.exe).
There will be a minor fix soon in the next version,
but it will still require GNU's sort to be installed.
In short: on windows, input files should be pre-sorted
before calling 'datamash'.
2. Transpose does not work correctly
===========================
C:\>type input.txt
Sample Year Count
id-123 2014 1002
id-99 2013 990
id-42 2014 2030
id-13 2014 599
C:\>datamash transpose < input.txt
Sample Year Count id-123 2014 1002 id-99 2013 990 id-42
2014 2030 id-13 2014 599
Could it be that the input file has spaces instead of tabs
as field delimiters ?
Datamash assumes tab-delimited files by default.
To use space-separated files, add "-W" option.
Example:
C:\datamash-1.3.5-21b9-mingw>datamash transpose < input.txt
Sample Year Count id-123 2014 1002 id-99 2013 990
id-42 2014 2030 id-13 2014 599
C:\datamash-1.3.5-21b9-mingw>datamash -W transpose < input.txt
Sample id-123 id-99 id-42 id-13
Year 2014 2013 2014 2014
Count 1002 990 2030 599
3. Reverse does not work
==================
C:\>type input.txt
Sample Year Count
id-123 2014 1002
id-99 2013 990
id-42 2014 2030
id-13 2014 599
C:\>datamash reverse < input.txt
Sample Year Count
id-123 2014 1002
id-99 2013 990
id-42 2014 2030
id-13 2014 599
Similar to the above, adding "-W" seems to solve the issue:
C:\datamash-1.3.5-21b9-mingw>datamash reverse < input.txt
Sample Year Count
id-123 2014 1002
id-99 2013 990
id-42 2014 2030
id-13 2014 599
C:\datamash-1.3.5-21b9-mingw>datamash -W reverse < input.txt
Count Year Sample
1002 2014 id-123
990 2013 id-99
2030 2014 id-42
599 2014 id-13
If this is not the case, please provide more details
(or if possible, attach the input file).
regards,
- assaf