Mercurial > repos > devteam > sam_pileup
annotate sam_pileup.xml @ 1:e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
author | Dave Bouvier <dave@bx.psu.edu> |
---|---|
date | Wed, 11 Dec 2013 12:54:32 -0500 |
parents | 95612c159681 |
children | 3ff8935743a9 |
rev | line source |
---|---|
1
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
1 <tool id="sam_pileup" name="Generate pileup" version="1.1.2"> |
0 | 2 <description>from BAM dataset</description> |
3 <requirements> | |
4 <requirement type="package" version="0.1.16">samtools</requirement> | |
5 </requirements> | |
6 <command interpreter="python"> | |
7 sam_pileup.py | |
8 --input1=$input1 | |
9 --output=$output1 | |
10 --ref=$refOrHistory.reference | |
11 #if $refOrHistory.reference == "history": | |
12 --ownFile=$refOrHistory.ownFile | |
13 #else: | |
1
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
14 --index=${refOrHistory.index.fields.path} |
0 | 15 #end if |
16 --dbkey=${input1.metadata.dbkey} | |
17 --indexDir=${GALAXY_DATA_INDEX_DIR} | |
18 --bamIndex=${input1.metadata.bam_index} | |
19 --lastCol=$lastCol | |
20 --indels=$indels | |
21 --mapCap=$mapCap | |
22 --consensus=$c.consensus | |
23 #if $c.consensus == "yes": | |
24 --theta=$c.theta | |
25 --hapNum=$c.hapNum | |
26 --fraction=$c.fraction | |
27 --phredProb=$c.phredProb | |
28 #else: | |
29 --theta="None" | |
30 --hapNum="None" | |
31 --fraction="None" | |
32 --phredProb="None" | |
33 #end if | |
34 </command> | |
35 <inputs> | |
36 <conditional name="refOrHistory"> | |
37 <param name="reference" type="select" label="Will you select a reference genome from your history or use a built-in index?"> | |
38 <option value="indexed">Use a built-in index</option> | |
39 <option value="history">Use one from the history</option> | |
40 </param> | |
41 <when value="indexed"> | |
42 <param name="input1" type="data" format="bam" label="Select the BAM file to generate the pileup file for"> | |
43 <validator type="unspecified_build" /> | |
1
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
44 <validator type="dataset_metadata_in_data_table" table_name="fasta_indexes" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." /> |
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
45 |
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
46 </param> |
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
47 <param name="index" type="select" label="Using reference genome"> |
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
48 <options from_data_table="fasta_indexes"> |
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
49 <filter type="data_meta" ref="input1" key="dbkey" column="1" /> |
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
50 <validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset" /> |
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
51 </options> |
0 | 52 </param> |
53 </when> | |
54 <when value="history"> | |
55 <param name="input1" type="data" format="bam" label="Select the BAM file to generate the pileup file for" /> | |
56 <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome" /> | |
57 </when> | |
58 </conditional> | |
59 <param name="lastCol" type="select" label="Whether or not to print the mapping quality as the last column" help="Makes the output easier to parse, but is space inefficient"> | |
60 <option value="no">Do not print the mapping quality as the last column</option> | |
61 <option value="yes">Print the mapping quality as the last column</option> | |
62 </param> | |
63 <param name="indels" type="select" label="Whether or not to print only output pileup lines containing indels"> | |
64 <option value="no">Print all lines</option> | |
65 <option value="yes">Print only lines containing indels</option> | |
66 </param> | |
67 <param name="mapCap" type="integer" value="60" label="Where to cap mapping quality" /> | |
68 <conditional name="c"> | |
69 <param name="consensus" type="select" label="Call consensus according to MAQ model?"> | |
70 <option selected="true" value="no">No</option> | |
71 <option value="yes">Yes</option> | |
72 </param> | |
73 <when value="no" /> | |
74 <when value="yes"> | |
75 <param name="theta" type="float" value="0.85" label="Theta parameter (error dependency coefficient) in the MAQ consensus calling model" /> | |
76 <param name="hapNum" type="integer" value="2" label="Number of haplotypes in the sample" help="Greater than or equal to 2" /> | |
77 <param name="fraction" type="float" value="0.001" label="Expected fraction of differences between a pair of haplotypes" /> | |
78 <param name="phredProb" type="integer" value="40" label="Phred probability of an indel in sequencing/prep" /> | |
79 </when> | |
80 </conditional> | |
81 </inputs> | |
82 <outputs> | |
83 <data format="tabular" name="output1" label="${tool.name} on ${on_string}: converted pileup" /> | |
84 </outputs> | |
85 <tests> | |
86 <test> | |
87 <!-- | |
88 Bam to pileup command: | |
89 samtools faidx chr_m.fasta | |
90 samtools pileup -M 60 -f chr_m.fasta test-data/sam_pileup_in1.bam > sam_pileup_out1.pileup | |
91 chr_m.fasta is the prefix of the index | |
92 --> | |
93 <param name="reference" value="history" /> | |
94 <param name="input1" value="sam_pileup_in1.bam" ftype="bam" /> | |
95 <param name="ownFile" value="chr_m.fasta" ftype="fasta" dbkey="equCab2" /> | |
96 <param name="lastCol" value="no" /> | |
97 <param name="indels" value="no" /> | |
98 <param name="mapCap" value="60" /> | |
99 <param name="consensus" value="no" /> | |
100 <output name="output1" file="sam_pileup_out1.pileup" /> | |
101 </test> | |
102 <test> | |
103 <!-- | |
104 Bam to pileup command: | |
105 samtools pileup -M 60 -c -T 0.85 -N 2 -r 0.001 -I 40 -f chr_m.fasta test-data/sam_pileup_in1.bam > sam_pileup_out2.pileup | |
106 chr_m.fasta is the prefix of the index | |
107 --> | |
108 <param name="reference" value="indexed" /> | |
109 <param name="input1" value="sam_pileup_in1.bam" ftype="bam" dbkey="equCab2" /> | |
1
e7d863c5c5d6
Update sam_pileup to use the fasta_indexes data table.
Dave Bouvier <dave@bx.psu.edu>
parents:
0
diff
changeset
|
110 <param name="index" value="chr_m" /> |
0 | 111 <param name="lastCol" value="no" /> |
112 <param name="indels" value="no" /> | |
113 <param name="mapCap" value="60" /> | |
114 <param name="consensus" value="yes" /> | |
115 <param name="theta" value="0.85" /> | |
116 <param name="hapNum" value="2" /> | |
117 <param name="fraction" value="0.001" /> | |
118 <param name="phredProb" value="40" /> | |
119 <output name="output1" file="sam_pileup_out2.pileup" /> | |
120 </test> | |
121 </tests> | |
122 <help> | |
123 | |
124 **What it does** | |
125 | |
126 Uses SAMTools_' pileup command to produce a pileup dataset from a provided BAM dataset. It generates two types of pileup datasets depending on the specified options. If *Call consensus according to MAQ model?* option is set to **No**, the tool produces simple pileup. If the option is set to **Yes**, a ten column pileup dataset with consensus is generated. Both types of datasets are briefly summarized below. | |
127 | |
128 .. _SAMTools: http://samtools.sourceforge.net/samtools.shtml | |
129 | |
130 ------ | |
131 | |
132 **Types of pileup datasets** | |
133 | |
134 The description of pileup format below is largely based on information that can be found on SAMTools Pileup_ documentation page. The 6- and 10-column variants are described below. | |
135 | |
136 .. _Pileup: http://samtools.sourceforge.net/pileup.shtml | |
137 | |
138 **Six column pileup**:: | |
139 | |
140 1 2 3 4 5 6 | |
141 --------------------------------- | |
142 chrM 412 A 2 ., II | |
143 chrM 413 G 4 ..t, IIIH | |
144 chrM 414 C 4 ...a III2 | |
145 chrM 415 C 4 TTTt III7 | |
146 | |
147 where:: | |
148 | |
149 Column Definition | |
150 ------- ---------------------------- | |
151 1 Chromosome | |
152 2 Position (1-based) | |
153 3 Reference base at that position | |
154 4 Coverage (# reads aligning over that position) | |
155 5 Bases within reads where (see Galaxy wiki for more info) | |
156 6 Quality values (phred33 scale, see Galaxy wiki for more) | |
157 | |
158 **Ten column pileup** | |
159 | |
160 The `ten-column` (consensus_) pileup incorporates additional consensus information generated with *-c* option of *samtools pileup* command:: | |
161 | |
162 | |
163 1 2 3 4 5 6 7 8 9 10 | |
164 ------------------------------------------------ | |
165 chrM 412 A A 75 0 25 2 ., II | |
166 chrM 413 G G 72 0 25 4 ..t, IIIH | |
167 chrM 414 C C 75 0 25 4 ...a III2 | |
168 chrM 415 C T 75 75 25 4 TTTt III7 | |
169 | |
170 where:: | |
171 | |
172 Column Definition | |
173 ------- -------------------------------------------------------- | |
174 1 Chromosome | |
175 2 Position (1-based) | |
176 3 Reference base at that position | |
177 4 Consensus bases | |
178 5 Consensus quality | |
179 6 SNP quality | |
180 7 Maximum mapping quality | |
181 8 Coverage (# reads aligning over that position) | |
182 9 Bases within reads where (see Galaxy wiki for more info) | |
183 10 Quality values (phred33 scale, see Galaxy wiki for more) | |
184 | |
185 | |
186 .. _consensus: http://samtools.sourceforge.net/cns0.shtml | |
187 | |
188 ------ | |
189 | |
190 **Citation** | |
191 | |
192 For the underlying tool, please cite `Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R; 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools. Bioinformatics. 2009 Aug 15;25(16):2078-9. <http://www.ncbi.nlm.nih.gov/pubmed/19505943>`_ | |
193 | |
194 | |
195 </help> | |
196 </tool> | |
197 | |
198 |