annotate picard_ReorderSam.xml @ 0:ff4ec13e496e draft

Uploaded tarball to repository
author devteam
date Tue, 23 Oct 2012 10:49:35 -0400
parents
children 52fdfc45590a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
1 <tool name="Reorder SAM/BAM" id="picard_ReorderSam" version="1.56.0">
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
2 <requirements><requirement type="package" version="1.56.0">picard</requirement></requirements>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
3 <command interpreter="python">
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
4 picard_wrapper.py
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
5 --input=$inputFile
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
6 #if $source.indexSource == "built-in"
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
7 --ref="${source.ref.fields.path}"
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
8 #else
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
9 --ref-file=$refFile
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
10 --species-name=$source.speciesName
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
11 --build-name=$source.buildName
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
12 --trunc-names=$source.truncateSeqNames
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
13 #end if
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
14 --allow-inc-dict-concord=$allowIncDictConcord
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
15 --allow-contig-len-discord=$allowContigLenDiscord
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
16 --output-format=$outputFormat
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
17 --output=$outFile
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
18 --tmpdir "${__new_file_path__}"
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
19 -j "\$JAVA_JAR_PATH/ReorderSam.jar"
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
20 </command>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
21 <inputs>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
22 <param format="bam,sam" name="inputFile" type="data" label="SAM/BAM dataset to be reordered"
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
23 help="If empty, upload or import a SAM/BAM dataset." />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
24 <conditional name="source">
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
25 <param name="indexSource" type="select" label="Select Reference Genome" help="This tool will re-order SAM/BAM in the same order as reference selected below.">
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
26 <option value="built-in">Locally cached</option>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
27 <option value="history">History</option>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
28 </param>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
29 <when value="built-in">
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
30 <param name="ref" type="select" label="Select a reference genome">
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
31 <options from_data_table="picard_indexes" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
32 </param>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
33 </when>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
34 <when value="history">
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
35 <param name="refFile" type="data" format="fasta" metadata_name="dbkey" label="Using reference file" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
36 <param name="speciesName" type="text" value="" label="Species name" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
37 <param name="buildName" type="text" value="" label="Build name" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
38 <param name="truncateSeqNames" type="boolean" checked="False" truevalue="true" falsevalue="false" label="Truncate sequence names after first whitespace" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
39 </when>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
40 </conditional>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
41 <param name="allowIncDictConcord" type="boolean" checked="False" truevalue="true" falsevalue="false" label="Allow incomplete dict concordance?" help="Allows a partial overlap of the BAM contigs with the new reference sequence contigs." />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
42 <param name="allowContigLenDiscord" type="boolean" checked="False" truevalue="true" falsevalue="false" label="Allow contig length discordance?" help="This is dangerous--don't check it unless you know exactly what you're doing!" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
43 <param name="outputFormat" type="boolean" checked="True" truevalue="bam" falsevalue="sam" label="Output BAM instead of SAM" help="Uncheck for SAM output" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
44 </inputs>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
45 <outputs>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
46 <data name="outFile" format="bam" label="${tool.name} on ${on_string}: reordered ${outputFormat}">
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
47 <change_format>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
48 <when input="outputFormat" value="sam" format="sam" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
49 </change_format>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
50 </data>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
51 </outputs>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
52 <tests>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
53 <test>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
54 <!-- Commands:
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
55 cp test-data/phiX.fasta .
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
56 samtools faidx phiX.fasta
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
57 java -jar CreateSequenceDictionary.jar R=phiX.fasta O=phiX.dict URI=phiX.fasta TRUNCATE_NAMES_AT_WHITESPACE=false SPECIES=phiX174
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
58 java -jar ReorderSam.jar VALIDATION_STRINGENCY=LENIENT I=test-data/picard_RS_input1.bam O=picard_RS_output1.bam REFERENCE=phiX.fasta ALLOW_INCOMPLETE_DICT_CONCORDANCE=false ALLOW_CONTIG_LENGTH_DISCORDANCE=false
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
59 -->
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
60 <param name="inputFile" value="picard_RS_input1.bam" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
61 <param name="indexSource" value="history" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
62 <param name="refFile" value="phiX.fasta" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
63 <param name="speciesName" value="phiX174" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
64 <param name="buildName" value="" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
65 <param name="truncateSeqNames" value="false" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
66 <param name="allowIncDictConcord" value="false" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
67 <param name="allowContigLenDiscord" value="false" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
68 <param name="outputFormat" value="True" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
69 <output name="outFile" file="picard_RS_output1.bam" ftype="bam" lines_diff="4" compare="contains" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
70 </test>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
71 <test>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
72 <!-- Command:
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
73 java -jar ReorderSam.jar VALIDATION_STRINGENCY=LENIENT I=test-data/picard_RS_input2.sam O=picard_RS_output2.sam REFERENCE=/path/to/phiX/picard_index/phiX.fa ALLOW_INCOMPLETE_DICT_CONCORDANCE=false ALLOW_CONTIG_LENGTH_DISCORDANCE=false
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
74 /path/to/phiX/srma_index/phiX.fa is path to phiX.fa, phiX.fa.fai, and phiX.dict
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
75 -->
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
76 <param name="inputFile" value="picard_RS_input2.sam" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
77 <param name="indexSource" value="built-in" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
78 <param name="ref" value="phiX" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
79 <param name="allowIncDictConcord" value="false" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
80 <param name="allowContigLenDiscord" value="false" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
81 <param name="outputFormat" value="False" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
82 <output name="outFile" file="picard_RS_output2.sam" ftype="sam" lines_diff="4" sort="True" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
83 </test>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
84 <test>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
85 <!-- Commands:
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
86 cp test-data/picard_RS_input4.fasta .
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
87 samtools faidx picard_RS_input4.fasta
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
88 java -jar CreateSequenceDictionary.jar R=picard_RS_input4.fasta O=picard_RS_input4.dict URI=picard_RS_input4.fasta TRUNCATE_NAMES_AT_WHITESPACE=true SPECIES=phiX174 GENOME_ASSEMBLY=phiX_buildBlah1.1
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
89 java -jar ReorderSam.jar VALIDATION_STRINGENCY=LENIENT I=test-data/picard_RS_input3.bam O=picard_RS_output3.sam REFERENCE=picard_RS_input4.fasta ALLOW_INCOMPLETE_DICT_CONCORDANCE=true ALLOW_CONTIG_LENGTH_DISCORDANCE=false
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
90 picard_RS_input3.bam can be made from picard_RS_input3.sam
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
91 -->
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
92 <param name="inputFile" value="picard_RS_input3.bam" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
93 <param name="indexSource" value="history" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
94 <param name="refFile" value="picard_RS_input4.fasta" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
95 <param name="speciesName" value="phiX174" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
96 <param name="buildName" value="phiX_buildBlah1.1" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
97 <param name="truncateSeqNames" value="true" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
98 <param name="allowIncDictConcord" value="true" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
99 <param name="allowContigLenDiscord" value="false" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
100 <param name="outputFormat" value="False" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
101 <output name="outFile" file="picard_RS_output3.sam" ftype="sam" lines_diff="12" sort="True" />
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
102 </test>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
103 </tests>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
104 <help>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
105
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
106 .. class:: infomark
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
107
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
108 **Purpose**
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
109
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
110 Reorder SAM/BAM to match contig ordering in a particular reference file. Note that this is
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
111 not the same as sorting as done by the SortSam tool, which sorts by either coordinate
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
112 values or query name. The ordering in ReorderSam is based on exact name matching of
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
113 contigs/chromosomes. Reads that are mapped to a contig that is not in the new reference file are
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
114 not included in the output.
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
115
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
116 **Picard documentation**
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
117
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
118 This is a Galaxy wrapper for ReorderSam, a part of the external package Picard-tools_.
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
119
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
120 .. _Picard-tools: http://www.google.com/search?q=picard+samtools
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
121
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
122 ------
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
123
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
124 .. class:: infomark
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
125
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
126 **Inputs, outputs, and parameters**
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
127
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
128 For the file that needs to be reordered, either a sam file or a bam file must be supplied.
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
129 If a bam file is used, it must be coordinate-sorted. A reference file is also required,
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
130 so either a fasta file should be supplied or a built-in reference can be selected.
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
131
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
132 The output contains the same reads as the input file but the reads have been rearranged so
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
133 they appear in the same order as the provided reference file. The tool will output either
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
134 bam (the default) or sam, according to user selection. Bam is recommended since it is smaller.
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
135
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
136 The only extra parameters that can be set are flags for allowing incomplete dict concordance
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
137 and allowing contig length discordance. If incomplete dict concordance is allowed, only a
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
138 partial overlap of the bam contigs with the new reference sequence contigs is required. By
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
139 default it is off, requiring a corresponding contig in the new reference for each read contig.
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
140 If contig length discordance is allowed, contig names that are the same between a read and the
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
141 new reference contig are allowed even if they have different lengths. This is usually not a
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
142 good idea, unless you know exactly what you're doing. It's off by default.
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
143
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
144 .. class:: warningmark
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
145
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
146 **Warning on SAM/BAM quality**
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
147
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
148 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**
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
149 flag when it runs Picard, which allows reads to be discarded if they're empty or don't map. This appears
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
150 to be the only way to deal with SAM/BAM that cannot be parsed.
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
151
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
152
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
153 </help>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
154 </tool>
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
155
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
156
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
157
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
158
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
159
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
160
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
161
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
162
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
163
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
164
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
165
ff4ec13e496e Uploaded tarball to repository
devteam
parents:
diff changeset
166