Mercurial > repos > devteam > picard1106
annotate picard_DownsampleSam.xml @ 153:5d881472c379 draft default tip
mm
| author | Rayan Chikhi <chikhi@psu.edu> |
|---|---|
| date | Mon, 21 Jul 2014 16:36:03 -0400 |
| parents | 896709401435 51fd923aa0ab |
| children |
| rev | line source |
|---|---|
|
150
896709401435
dummy commit to attempt to merge multiple heads
Rayan Chikhi <chikhi@psu.edu>
parents:
148
diff
changeset
|
1 <tool name="Downsample SAM/BAM" id="picard_DownsampleSam" version="1.106.2"> |
| 62 | 2 <!-- found on https://bitbucket.org/bwlang/galaxy-dist/src/ca5ded2e18a9ef802c31429e3cb861e8775b24d0/tools/picard/picard_DownsampleSam.xml --> |
| 3 <description>Down-sample a file to retain a subset of the reads</description> | |
| 4 <requirements><requirement type="package" version="1.106.0">picard</requirement></requirements> | |
| 5 <command interpreter="python"> | |
| 6 picard_wrapper.py | |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
7 --input "$inputFile" |
|
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
8 --output "$outFile" |
| 62 | 9 --probability=$probability |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
10 --output-format $outputFormat |
| 62 | 11 --seed=$seed |
| 12 -j "\$JAVA_JAR_PATH/DownsampleSam.jar" | |
| 13 </command> | |
| 14 <inputs> | |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
15 <param format="sam,bam" name="inputFile" type="data" label="SAM/BAM dataset to be downsampled" |
|
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
16 help="If empty, upload or import a SAM or BAM dataset." /> |
| 62 | 17 <param name="probability" type="float" size="5" label="Probability (between 0 and 1) that any given read will be kept" help="specify 1 to keep all reads, 0.1 to keep 10% of the reads" value="1" /> |
| 18 <param name="seed" type="integer" size="5" label="Random seed value" help="(same seed + same probability = same set of reads kept)" value="1" /> | |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
19 <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output BAM instead of SAM" help="Uncheck for SAM output" /> |
| 62 | 20 </inputs> |
| 21 <outputs> | |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
22 <data name="outFile" format="bam" label="${tool.name} on ${on_string}: downsampled ${outputFormat}"> |
|
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
23 <change_format> |
|
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
24 <when input="outputFormat" value="sam" format="sam" /> |
|
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
25 </change_format> |
| 62 | 26 </data> |
| 27 </outputs> | |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
28 |
| 62 | 29 <tests> |
| 30 <test> | |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
31 <param name="inputFile" value="cleansamtestinput.sam" ftype="sam" /> |
| 62 | 32 <param name="probability" value="0.1" /> |
| 33 <param name="seed" value="2" /> | |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
34 <param name="outputFormat" value="False" /> |
| 62 | 35 <output name="outFile" file="downsamplesamoutput.sam" ftype="sam" /> |
| 36 </test> | |
| 37 </tests> | |
| 38 <help> | |
| 39 | |
| 40 .. class:: infomark | |
| 41 | |
| 42 **Purpose** | |
| 43 | |
| 44 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. | |
| 45 | |
| 46 **Picard documentation** | |
| 47 | |
| 48 This is a Galaxy wrapper for DownsampleSam, a part of the external package Picard-tools_. | |
| 49 | |
| 50 .. _Picard-tools: http://www.google.com/search?q=picard+samtools | |
| 51 | |
| 52 ------ | |
| 53 | |
| 54 .. class:: warningmark | |
| 55 | |
| 56 **Warning on SAM/BAM quality** | |
| 57 | |
| 58 Many SAM/BAM files produced externally and uploaded to Galaxy do not fully conform to SAM/BAM specifications. Galaxy deals with this by using the **LENIENT** | |
| 59 flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears | |
| 60 to be the only way to deal with SAM/BAM that cannot be parsed. | |
| 61 | |
| 62 | |
| 63 </help> | |
|
143
b2ca2d181fb4
fixed downsample sam in picard1106 (accept bam)
Rayan Chikhi <chikhi@psu.edu>
parents:
62
diff
changeset
|
64 </tool> |
