4.0 years ago by
Any Galaxy tool can be run line command, this one can be found under: tools / filters / uniq.py
This comes with the distribution (http://getgalaxy.org). To obtain the command-line syntax of any tool, you can purposefully trigger an error then send yourself a bug report. Or often with tools (but not all yet) the execution string will be in the UI under the round "i" info icon's form for a result dataset (success or failure).
But if you want to run this type of count on unix server, outside of Galaxy, a few unix commands might be the way to go. Something like this
cut -c2,3 input_file | sort | uniq -c
would cut the second and third column out of a file ("input_file"), then list out the count of each unique line.
I am not sure how familiar you are with these commands, so sorry if this is too basic, but to be complete (help others that may find this post)... There are many variations on this, is just how I would do it. You can put shell commands into a simple shell script (bash) and execute it over many files in batch. I dislike stating to "google", but it really is the best way to get the syntax you want from any of these commands. Many guides exist online with examples. You wouldn't need to know much about the line-command to get started - is usually a fairly straightforward formula (until it isn't). Unix tools are deceptively simple, and do exactly what you instruct, which can be part of the problem sometimes - but that shouldn't stop you from experimenting.
Either way, please give one or both a try and see which works for you best. Thanks, Jen, Galaxy team