Question: Q About 'Compute' Tool
0
gravatar for Ian Donaldson
7.1 years ago by
Ian Donaldson120
Ian Donaldson120 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
galaxy • 791 views
ADD COMMENTlink modified 7.1 years ago by Russell Bell30 • written 7.1 years ago by Ian Donaldson120
0
gravatar for Daniel Blankenberg
7.1 years ago by
Daniel Blankenberg ♦♦ 1.7k
United States
Daniel Blankenberg ♦♦ 1.7k wrote:
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
ADD COMMENTlink written 7.1 years ago by Daniel Blankenberg ♦♦ 1.7k
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. Thanks, Ian ________________________________ 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 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: http://lists.bx.psu.edu/
ADD REPLYlink written 7.1 years ago by Ian Donaldson120
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
ADD REPLYlink written 7.1 years ago by Hotz, Hans-Rudolf1.8k
0
gravatar for Russell Bell
7.1 years ago by
Russell Bell30
Russell Bell30 wrote:
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
ADD COMMENTlink written 7.1 years ago by Russell Bell30
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 ________________________________________ 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
ADD REPLYlink written 7.1 years ago by Ian Donaldson120
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 -- Jennifer Jackson http://usegalaxy.org http://galaxyproject.org/Support
ADD REPLYlink written 7.1 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: 182 users visited in the last hour