Hi Curtis, To accomplish things like your "split" command I have had success with Compute using c1.split('(').pop(0) HTH - Russell
Message: 1 Date: Mon, 22 Aug 2011 09:24:36 -0700 From: Jennifer Jackson <jen@bx.psu.edu> To: Robert Curtis Hendrickson <curtish@uab.edu> Cc: "galaxy-user@lists.bx.psu.edu" <galaxy-user@lists.bx.psu.edu> Subject: Re: [galaxy-user] Text Manipulation > Compute > c1[1:c1.find("(")] fails Message-ID: <4E5282C4.3090703@bx.psu.edu> Content-Type: text/plain; charset=windows-1252; format=flowed
Hello Curtis,
There is some more feedback from our developers. In your own instance, this is the recommended change:
Edit ->
tools/stats/column_maker.py
To add ->
__ob__ and __cb__ to the mapped_str dict.
Perhaps this will help if you still needed work-around (or others reading this thread).
Best!
Jen Galaxy team
On 7/20/11 1:13 PM, Robert Curtis Hendrickson wrote:
Folks,
I have a column c1 that has entries like ?GXP_297346(PVALB/human)?.
I?m trying to use Text Manipulation > Compute to strip off the ?(?)? portion, leaving only the accession (which can vary in length).
I have tried a variety of things that work in my python command line, but fail here, for example:
c1[1:c1.find("(")]
or
c1.split('(')[0]
This gets mangled:
An error occurred running this job: Expression "c1__ob__1:c1.find("(")__cb__" likely invalid.
Or
An error occurred running this job: Expression "c1.split("(")__ob__0__cb__" likely invalid.
Please help. This is driving me crazy.
Searching the list, I find only
http://gmod.827538.n3.nabble.com/inputs-sanitization-tt2664336.html#a266 4911
?Inputs sanitization? which seems to indicate this is a global mapper that can only be disabled with dire security consequences.
And
http://gmod.827538.n3.nabble.com/substring-sequence-on-coordinate-in-col umns-tt3026255.html#a3048100
?substring sequence on coordinate in columns? which doesn?t ever answer the question about how to get compute to work.
Thanks,
Curtis
___________________________________________________________ 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