Question: Statistics - Count Tool
1
gravatar for ryan.doan
4.3 years ago by
ryan.doan20
ryan.doan20 wrote:

Hello,

Is the Count tool, located in the statistics tools in galaxy, available as an independent script? I would like to use this on several large files located on our own server, but can't seem to find the source script that is used in galaxy.

Thanks

ADD COMMENTlink modified 4.3 years ago by Jennifer Hillman Jackson25k • written 4.3 years ago by ryan.doan20

Can you give me the exact name?

ADD REPLYlink written 4.3 years ago by Bjoern Gruening5.1k
2
gravatar for Jennifer Hillman Jackson
4.3 years ago by
United States
Jennifer Hillman Jackson25k wrote:

Hi,

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

ADD COMMENTlink written 4.3 years ago by Jennifer Hillman Jackson25k
1

Thank you!! The py script works great!

ADD REPLYlink written 4.3 years ago by ryan.doan20

Happy solution was right fit Ryan, and thanks for accepting the answer. This question comes up every so often (in some version) and this will aid others in learning out how to run Galaxy's tools stand-alone. Jen

ADD REPLYlink written 4.3 years ago by Jennifer Hillman Jackson25k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 169 users visited in the last hour