annotate tools/samtools/sam_pileup.xml @ 2:c2a356708570

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:42 -0500
parents 9071e359b9a3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
1 <tool id="sam_pileup" name="Generate pileup" version="1.1.1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <description>from BAM dataset</description>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <requirement type="package">samtools</requirement>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 </requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 <command interpreter="python">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 sam_pileup.py
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 --input1=$input1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 --output=$output1
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 --ref=$refOrHistory.reference
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 #if $refOrHistory.reference == "history":
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 --ownFile=$refOrHistory.ownFile
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 #else:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 --ownFile="None"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 --dbkey=${input1.metadata.dbkey}
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 --indexDir=${GALAXY_DATA_INDEX_DIR}
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 --bamIndex=${input1.metadata.bam_index}
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 --lastCol=$lastCol
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 --indels=$indels
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 --mapCap=$mapCap
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 --consensus=$c.consensus
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 #if $c.consensus == "yes":
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 --theta=$c.theta
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 --hapNum=$c.hapNum
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 --fraction=$c.fraction
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 --phredProb=$c.phredProb
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 #else:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 --theta="None"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 --hapNum="None"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 --fraction="None"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 --phredProb="None"
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <conditional name="refOrHistory">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 <param name="reference" type="select" label="Will you select a reference genome from your history or use a built-in index?">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <option value="indexed">Use a built-in index</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <option value="history">Use one from the history</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <when value="indexed">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <param name="input1" type="data" format="bam" label="Select the BAM file to generate the pileup file for">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 <validator type="unspecified_build" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 <validator type="dataset_metadata_in_file" filename="sam_fa_indices.loc" metadata_name="dbkey" metadata_column="1" message="Sequences are not currently available for the specified build." line_startswith="index" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <when value="history">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 <param name="input1" type="data" format="bam" label="Select the BAM file to generate the pileup file for" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <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">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 <option value="no">Do not print the mapping quality as the last column</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 <option value="yes">Print the mapping quality as the last column</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <param name="indels" type="select" label="Whether or not to print only output pileup lines containing indels">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <option value="no">Print all lines</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <option value="yes">Print only lines containing indels</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 <param name="mapCap" type="integer" value="60" label="Where to cap mapping quality" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 <conditional name="c">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <param name="consensus" type="select" label="Call consensus according to MAQ model?">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <option selected="true" value="no">No</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <option value="yes">Yes</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 <when value="no" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 <when value="yes">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 <param name="theta" type="float" value="0.85" label="Theta parameter (error dependency coefficient) in the MAQ consensus calling model" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 <param name="hapNum" type="integer" value="2" label="Number of haplotypes in the sample" help="Greater than or equal to 2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 <param name="fraction" type="float" value="0.001" label="Expected fraction of differences between a pair of haplotypes" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 <param name="phredProb" type="integer" value="40" label="Phred probability of an indel in sequencing/prep" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 <data format="tabular" name="output1" label="${tool.name} on ${on_string}: converted pileup" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 Bam to pileup command:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 samtools faidx chr_m.fasta
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 samtools pileup -M 60 -f chr_m.fasta test-data/sam_pileup_in1.bam > sam_pileup_out1.pileup
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 chr_m.fasta is the prefix of the index
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 <param name="reference" value="history" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 <param name="input1" value="sam_pileup_in1.bam" ftype="bam" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 <param name="ownFile" value="chr_m.fasta" ftype="fasta" dbkey="equCab2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 <param name="lastCol" value="no" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 <param name="indels" value="no" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 <param name="mapCap" value="60" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 <param name="consensus" value="no" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 <output name="output1" file="sam_pileup_out1.pileup" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 <!--
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 Bam to pileup command:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 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
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 chr_m.fasta is the prefix of the index
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 -->
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 <param name="reference" value="indexed" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 <param name="input1" value="sam_pileup_in1.bam" ftype="bam" dbkey="equCab2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 <param name="lastCol" value="no" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 <param name="indels" value="no" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 <param name="mapCap" value="60" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 <param name="consensus" value="yes" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 <param name="theta" value="0.85" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 <param name="hapNum" value="2" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109 <param name="fraction" value="0.001" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 <param name="phredProb" value="40" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111 <output name="output1" file="sam_pileup_out2.pileup" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 **What it does**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 .. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
121
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
122 ------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
123
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
124 **Types of pileup datasets**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
125
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
126 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.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
127
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
128 .. _Pileup: http://samtools.sourceforge.net/pileup.shtml
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
129
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
130 **Six column pileup**::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
131
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
132 1 2 3 4 5 6
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
133 ---------------------------------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
134 chrM 412 A 2 ., II
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
135 chrM 413 G 4 ..t, IIIH
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
136 chrM 414 C 4 ...a III2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
137 chrM 415 C 4 TTTt III7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
138
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
139 where::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
140
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
141 Column Definition
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
142 ------- ----------------------------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
143 1 Chromosome
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
144 2 Position (1-based)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
145 3 Reference base at that position
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
146 4 Coverage (# reads aligning over that position)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
147 5 Bases within reads where (see Galaxy wiki for more info)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
148 6 Quality values (phred33 scale, see Galaxy wiki for more)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
149
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
150 **Ten column pileup**
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
151
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
152 The `ten-column` (consensus_) pileup incorporates additional consensus information generated with *-c* option of *samtools pileup* command::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
153
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
154
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
155 1 2 3 4 5 6 7 8 9 10
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
156 ------------------------------------------------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
157 chrM 412 A A 75 0 25 2 ., II
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
158 chrM 413 G G 72 0 25 4 ..t, IIIH
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
159 chrM 414 C C 75 0 25 4 ...a III2
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
160 chrM 415 C T 75 75 25 4 TTTt III7
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
161
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
162 where::
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
163
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
164 Column Definition
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
165 ------- --------------------------------------------------------
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
166 1 Chromosome
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
167 2 Position (1-based)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
168 3 Reference base at that position
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
169 4 Consensus bases
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
170 5 Consensus quality
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
171 6 SNP quality
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
172 7 Maximum mapping quality
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
173 8 Coverage (# reads aligning over that position)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
174 9 Bases within reads where (see Galaxy wiki for more info)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
175 10 Quality values (phred33 scale, see Galaxy wiki for more)
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
176
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
177
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
178 .. _consensus: http://samtools.sourceforge.net/cns0.shtml
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
179
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
180
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
181 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
182 </tool>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
183
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
184