Question: Compute An Expression On Every Row Question
0
gravatar for Tobias Hohenauer
5.0 years ago by
Japan
Tobias Hohenauer20 wrote:
Hello, I am looking for the right way to do a computation using "text manipulation, compute an expression on every row". I have a table consisting of 20 columns and about 15.000 rows. Column 1 is my untreated or control and I would like to normalize every other column to this control by simple division. As a result I would like to obtain a table in which column 1 is set to a value of 1 for every row, and the corresponding values in the other columns resulting from column x / column 1. I tried something like c2/c1,c3/c1,c4/c1... on a small testfile but that results in all normalized values being put into one column in brackets rather than being put into individual columns. What would be the right parameters? I also thought about creating a workflow consisting of successive divisions of the columns but that feels rather complicated. Is there an easier way? Any help would be much appreciated! Best, Tobias -- Tobias Hohenauer, PhD GCNA, Disease Mechanism Research Core RIKEN Brain Science Institute 2-1 Hirosawa, Wako-shi 351-0198 Japan
• 783 views
ADD COMMENTlink modified 5.0 years ago by Jennifer Hillman Jackson25k • written 5.0 years ago by Tobias Hohenauer20
0
gravatar for Jennifer Hillman Jackson
5.0 years ago by
United States
Jennifer Hillman Jackson25k wrote:
Hi Tobias, The "Compute" tool does output just one column of data. The parenthesis are problematic to get rid of, so the starting and ending values would need to be disposable. Then you could break up this column with the tool "Convert delimiters to TAB" (commas and spaces can be converted) followed by "Cut" to just pull out the ones that you want (watch out for double tabs - or remove them if really wanted with the tool " Condense consecutive characters"). And you are correct, using a workflow to add the columns iteratively is another option. The good thing about a workflow is that once created, you can run it as if it was a single "tool", placing it in the tool menu and hiding intermediate output datasets. Either of these could become a workflow. There is the tool "Arithmetic Operations on tables" on the Test server (https://test.galaxyproject.org/), but this would involve creating a new separate file that would be about as much work as the the others. I didn't see any obvious solutions in the Tool Shed for use in a local instance (this type of simple operation should be fine on a basic laptop install), but this is something you could also review. http://usegalaxy.org/toolshed Hopefully one of these options will work out for you, even if not a single step, Jen Galaxy team -- Jennifer Hillman-Jackson http://galaxyproject.org
ADD COMMENTlink written 5.0 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: 179 users visited in the last hour