1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/72ed536a988d/
changeset: 72ed536a988d
user: dan
date: 2011-09-23 19:49:33
summary: Rewrite random lines tool. Does two passes through input file: first pass
determines line offsets/count, offsets are randomly removed, second pass writes out lines
by seeking to remaining offsets. The random seed can now be optionally specified.
affected #: 3 files (-1 bytes)
--- a/tools/filters/randomlines.xml Fri Sep 23 13:26:34 2011 -0400
+++ b/tools/filters/randomlines.xml Fri Sep 23 13:49:33 2011 -0400
@@ -1,9 +1,25 @@
-<tool id="random_lines1" name="Select random lines">
+<tool id="random_lines1" name="Select random lines"
version="2.0.0"><description>from a file</description>
- <command interpreter="python">randomlines.py $input $num_lines
$out_file1</command>
+ <command interpreter="python">random_lines_two_pass.py
"${input}" "${out_file1}" "${num_lines}"
+ #if str( $seed_source.seed_source_selector ) == "set_seed":
+ --seed "${seed_source.seed}"
+ #end if
+ </command><inputs><param name="num_lines" size="5"
type="integer" value="1" label="Randomly select"
help="lines"/><param format="txt" name="input"
type="data" label="from"/>
+ <conditional name="seed_source">
+ <param name="seed_source_selector" type="select"
label="Set a random seed">
+ <option value="no_seed" selected="True">Don't set
seed</option>
+ <option value="set_seed">Set seed</option>
+ </param>
+ <when value="no_seed">
+ <!-- Do nothing here -->
+ </when>
+ <when value="set_seed">
+ <param name="seed" type="text" label="Random
seed" />
+ </when>
+ </conditional></inputs><outputs><data format="input"
name="out_file1" metadata_source="input"/>
@@ -12,8 +28,16 @@
<test><param name="num_lines" value="65"/><param
name="input" value="1.bed"/>
+ <param name="seed_source_selector"
value="no_seed"/><output name="out_file1"
file="1.bed"/></test>
+ <test>
+ <param name="num_lines" value="1"/>
+ <param name="input" value="1.bed"/>
+ <param name="seed_source_selector" value="set_seed"/>
+ <param name="seed" value="asdf"/>
+ <output name="out_file1"
file="1_bed_random_lines_1_seed_asdf_out.bed"/>
+ </test></tests><help>
Repository URL:
https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.