Hello Ian, The Compute tool accepts python operator functions. These functions are applied individually to each line in the input dataset. In the Compute tool's help (lower portion of the form), simple examples are shown that demonstrate how the variables c1, c2, etc. will be interpreted as the column values in the input tabular dataset. A suggested reference for syntax is this web resource: http://docs.python.org/library/stdtypes.html#boolean-operations-and-or-not Hopefully this helps, Best, Jen Galaxy team On 10/11/11 3:57 AM, Ian Donaldson wrote:
Thank Russell for the tip, it was just what i needed. Is there a explanation of how to construct the instructions for 'Compute' somewhere? I have not been able to find it.
Also thanks to Hans-Rudolf.
Ian ________________________________________ From: Russell Bell [Russell.Bell@hci.utah.edu] Sent: 10 October 2011 18:16 To: galaxy-user@lists.bx.psu.edu; Ian Donaldson Subject: Re: [galaxy-user] Q about 'Compute' tool
Ian,
using your chr1 500 1000 geneA . + chr1 2000 2500 geneB . -
problem i was able to get
chr1 500 1000 geneA . + 500.0 chr1 2000 2500 geneB . - 2500.0
Using
c2 if c6=='+' else c3
in the Compute tool. See if it works for you.
- Russell
Date: Mon, 10 Oct 2011 17:36:58 +0200 From: Hans-Rudolf Hotz<hrh@fmi.ch> To: Ian Donaldson<Ian.Donaldson@manchester.ac.uk>, Daniel Blankenberg <dan@bx.psu.edu>, "galaxy-user@lists.bx.psu.edu" <galaxy-user@lists.bx.psu.edu> Subject: Re: [galaxy-user] Q about 'Compute' tool Message-ID:<4E93111A.4060302@fmi.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
On 10/10/2011 04:45 PM, Ian Donaldson wrote:
Thanks, but not quite what i need.
If i start with two intervals: chr1 500 1000 geneA . + chr1 2000 2500 geneB . -
I want to add via, e.g. 'Compute', the TSS position to the end of each line. The desired result being:
chr1 500 1000 geneA . + 500 chr1 2000 2500 geneB . - 2500
This is because geneA is on the '+' strand and geneB is on the '-' strand.
Hi Ian
Have you tried
"Filter and Sort"-> "Filter" data on any column using simple expressions
and create two lists containing all genes on the '+' strand and alles genes on the '-' strand.
followed by "Text Manipulation"-> "Cut" columns from a table
using 'c1,c2,c3,c4,c5,c6,c2' for the list with all genes on the '+' strand
and
using 'c1,c2,c3,c4,c5,c6,c3' for the list with all genes on the '-' strand
and then you can create a single list again with
"Text Manipulation"-> "Concatenate" datasets tail-to-head
I guess this is waht you want, isn't-it?
Regards, Hans
Thanks, Ian ________________________________ From: Daniel Blankenberg [dan@bx.psu.edu] Sent: 10 October 2011 14:34 To: Ian Donaldson Cc: galaxy-user@lists.bx.psu.edu Subject: Re: [galaxy-user] Q about 'Compute' tool
Hi Ian,
Under Operate on Genomic Intervals, you can try the "Get Flanks" tool; you can request upstream, downstream, or both of your provided regions. Please let us know if you need additional assistance.
Thanks for using Galaxy,
Dan
On Oct 10, 2011, at 6:35 AM, Ian Donaldson wrote:
Hi,
Can 'if' statements by used in 'Text manipulation'> 'Compute'?
The reason is that i have a interval file of UCSC genes, i want to identify the TSS of each and make a new interval reflecting the TSS position for each gene. But because the TSS of a '-' stranded gene is actually the 'end' coord i want to be able to check the strand in the compute statement.
Is this possible or is there an easier way to do this inside GALAXY?
Thank you, Ian ___________________________________________________________ The Galaxy User list should be used for the discussion of Galaxy analysis and other features on the public server at usegalaxy.org<http://usegalaxy.org>. Please keep all replies on the list by using "reply all" in your mail client. For discussion of local Galaxy instances and the Galaxy source code, please use the Galaxy Development list:
http://lists.bx.psu.edu/listinfo/galaxy-dev
To manage your subscriptions to this and other Galaxy lists, please use the interface at:
___________________________________________________________ The Galaxy User list should be used for the discussion of Galaxy analysis and other features on the public server at usegalaxy.org. Please keep all replies on the list by using "reply all" in your mail client. For discussion of local Galaxy instances and the Galaxy source code, please use the Galaxy Development list:
http://lists.bx.psu.edu/listinfo/galaxy-dev
To manage your subscriptions to this and other Galaxy lists, please use the interface at:
------------------------------
_______________________________________________ galaxy-user mailing list galaxy-user@lists.bx.psu.edu http://lists.bx.psu.edu/listinfo/galaxy-user
End of galaxy-user Digest, Vol 64, Issue 9 ******************************************
___________________________________________________________ The Galaxy User list should be used for the discussion of Galaxy analysis and other features on the public server at usegalaxy.org. Please keep all replies on the list by using "reply all" in your mail client. For discussion of local Galaxy instances and the Galaxy source code, please use the Galaxy Development list:
http://lists.bx.psu.edu/listinfo/galaxy-dev
To manage your subscriptions to this and other Galaxy lists, please use the interface at:
-- Jennifer Jackson http://usegalaxy.org http://galaxyproject.org/Support