mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
43 lines
1.2 KiB
XML
43 lines
1.2 KiB
XML
<tool id="random_lines1" name="Select random lines">
|
|
<description>from a file</description>
|
|
<command interpreter="python">randomlines.py $input $num_lines $out_file1</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"/>
|
|
</inputs>
|
|
<outputs>
|
|
<data format="input" name="out_file1" metadata_source="input"/>
|
|
</outputs>
|
|
<tests>
|
|
<test>
|
|
<param name="num_lines" value="65"/>
|
|
<param name="input" value="1.bed"/>
|
|
<output name="out_file1" file="1.bed"/>
|
|
</test>
|
|
</tests>
|
|
<help>
|
|
|
|
**What it does**
|
|
|
|
This tool selects N random lines from a file, with no repeats, and preserving ordering.
|
|
|
|
-----
|
|
|
|
**Example**
|
|
|
|
Input File::
|
|
|
|
chr7 56632 56652 D17003_CTCF_R6 310 +
|
|
chr7 56736 56756 D17003_CTCF_R7 354 +
|
|
chr7 56761 56781 D17003_CTCF_R4 220 +
|
|
chr7 56772 56792 D17003_CTCF_R7 372 +
|
|
chr7 56775 56795 D17003_CTCF_R4 207 +
|
|
|
|
Selecting 2 random lines might return this::
|
|
|
|
chr7 56736 56756 D17003_CTCF_R7 354 +
|
|
chr7 56775 56795 D17003_CTCF_R4 207 +
|
|
|
|
</help>
|
|
</tool>
|