5
|
1 <tool name="Downsample SAM/BAM" id="picard_DownsampleSam" version="1.126.0">
|
|
2 <description>Downsample a file to retain a subset of the reads</description>
|
|
3 <requirements>
|
|
4 <requirement type="package" version="1.126.0">picard</requirement>
|
|
5 </requirements>
|
|
6
|
|
7 <macros>
|
|
8 <import>picard_macros.xml</import>
|
|
9 </macros>
|
|
10
|
|
11 <command>
|
|
12 @java_options@
|
|
13 java -jar
|
|
14 \$JAVA_JAR_PATH/picard.jar
|
|
15 DownsampleSam
|
|
16 INPUT="${inputFile}"
|
|
17 OUTPUT="${outFile}"
|
|
18 PROBABILITY=${probability}
|
|
19 RANDOM_SEED=${seed}
|
|
20 QUIET=true
|
|
21 VERBOSITY=ERROR
|
|
22 VALIDATION_STRINGENCY=${validation_stringency}
|
|
23 </command>
|
|
24 <inputs>
|
|
25 <param format="sam,bam" name="inputFile" type="data" label="Select SAM/BAM dataset or dataset collection" help="If empty, upload or import a SAM or BAM dataset" />
|
|
26 <param name="probability" type="float" size="4" min="0.0" max="1.0" label="Probability (between 0 and 1) that any given read will be kept" help="PROBABILITY; specify 1 to keep all reads, 0.1 to keep 10% of the reads" value="1" />
|
|
27 <param name="seed" type="integer" size="5" label="Random seed value" help="RANDOM_SEED; default=1" value="1" />
|
|
28
|
|
29 <expand macro="VS" />
|
|
30
|
|
31 </inputs>
|
|
32
|
|
33 <stdio>
|
|
34 <exit_code range="1:" level="fatal"/>
|
|
35 </stdio>
|
|
36
|
|
37 <outputs>
|
|
38 <data name="outFile" format="bam" label="${tool.name} on ${on_string}: downsampled BAM"/>
|
|
39 </outputs>
|
|
40
|
|
41 <tests>
|
|
42 <test>
|
|
43 <param name="inputFile" value="picard_DownsampleSam.bam" ftype="bam" />
|
|
44 <param name="probability" value="0.1" />
|
|
45 <param name="seed" value="1024" />
|
|
46 <param name="validation_stringency" value="LENIENT" />
|
|
47 <output name="outFile" file="picard_DownsampleSam_test1.bam" ftype="bam"/>
|
|
48 </test>
|
|
49 </tests>
|
|
50 <help>
|
|
51
|
|
52 .. class:: infomark
|
|
53
|
|
54 **Purpose**
|
|
55
|
|
56 Randomly down-sample a SAM or BAM file to retain a random subset of the reads. Mate-pairs are either both kept or both discarded. Reads marked as not primary alignments are all discarded. Each read is given a probability P of being retained - results with the exact same input in the same order and with the same value for RANDOM_SEED will produce the same results.
|
|
57
|
|
58 @dataset_collections@
|
|
59
|
|
60 @description@
|
|
61
|
|
62 INPUT=File
|
|
63 I=File The input SAM or BAM file to downsample. Required.
|
|
64
|
|
65 OUTPUT=File
|
|
66 O=File The output, downsampled, SAM or BAM file to write. Required.
|
|
67
|
|
68 RANDOM_SEED=Long
|
|
69 R=Long Random seed to use if reproducibilty is desired. Setting to null will cause multiple
|
|
70 invocations to produce different results.
|
|
71
|
|
72 PROBABILITY=Double
|
|
73 P=Double The probability of keeping any individual read, between 0 and 1.
|
|
74
|
|
75
|
|
76
|
|
77 @more_info@
|
|
78 </help>
|
|
79 </tool>
|