Bodged using string functions :-)
set $data = ''.join([line for line in ($seq_source_type.seq_paste.split()) if line[0] != ">"])
Removes the fasta header line and any white-space so I can pipe sequence directly to blastn.
Means users can quickly paste in a bit of sequence for blasting without first having to upload the data to their history.
--Russell
--
From: galaxy-dev-bounces@lists.bx.psu.edu [mailto:galaxy-dev-bounces@lists.bx.psu.edu] On Behalf Of Ross
Sent: Wednesday, 13 February 2013 1:34 p.m.
To: galaxy-dev@lists.bx.psu.edu
Subject: [galaxy-dev] Fwd: Custom Cheetah filters?
Hi Russell,
There may be a better way, but this works for me in the Toolfactory to create space and special character free names?
<param name="foo" type="text" value="" label="Foo">
<sanitizer invalid_char="">
<valid initial="string.letters,string.digits"/>
</sanitizer>
</param>
On Wed, Feb 13, 2013 at 11:22 AM, Smithies, Russell <Russell.Smithies@agresearch.co.nz> wrote:
I want to add a filter to strip whitespace and newlines from a text input box so I can pipe the sanitized string to a command.
Documentation is a bit sparse (and my Python a bit basic) so does anyone have an example?
Perhaps there’s a better way of doing it – regex maybe?
Any ideas?
Thanx,
--Russell
--