root/galaxy-central/tools/samtools/sam_pileup.xml @ 3

リビジョン 2, 7.4 KB (コミッタ: hatakeyama, 14 年 前)

import galaxy-central

行番号 
1<tool id="sam_pileup" name="Generate pileup" version="1.1.0">
2  <description>from BAM dataset</description>
3  <requirements>
4    <requirement type="package">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:
14         --ownFile="None"
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" />
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" />
45        </param>
46      </when>
47      <when value="history">
48        <param name="input1" type="data" format="bam" label="Select the BAM file to generate the pileup file for" />
49        <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference genome" />
50      </when>
51    </conditional>
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">
53      <option value="no">Do not print the mapping quality as the last column</option>
54      <option value="yes">Print the mapping quality as the last column</option>
55    </param>
56    <param name="indels" type="select" label="Whether or not to print only output pileup lines containing indels">
57      <option value="no">Print all lines</option>
58      <option value="yes">Print only lines containing indels</option>
59    </param>
60    <param name="mapCap" type="integer" value="60" label="Where to cap mapping quality" />
61    <conditional name="c">
62      <param name="consensus" type="select" label="Call consensus according to MAQ model?">
63        <option selected="true" value="no">No</option>
64        <option value="yes">Yes</option>
65      </param>
66      <when value="no" />
67      <when value="yes">
68        <param name="theta" type="float" value="0.85" label="Theta parameter (error dependency coefficient) in the MAQ consensus calling model" />
69        <param name="hapNum" type="integer" value="2" label="Number of haplotypes in the sample" help="Greater than or equal to 2" />
70        <param name="fraction" type="float" value="0.001" label="Expected fraction of differences between a pair of haplotypes" />
71        <param name="phredProb" type="integer" value="40" label="Phred probability of an indel in sequencing/prep" />
72      </when>
73    </conditional>
74  </inputs>
75  <outputs>
76    <data format="tabular" name="output1" />
77  </outputs>
78  <tests>
79    <test>
80      <!--
81      Bam to pileup command:
82      samtools faidx chr_m.fasta
83      samtools pileup -M 60 -f chr_m.fasta test-data/sam_pileup_in1.bam > test-data/sam_pileup_out1.pileup
84      chr_m.fasta is the prefix of the index
85      -->
86      <param name="reference" value="history" />
87      <param name="input1" value="sam_pileup_in1.bam" ftype="bam" />
88      <param name="ownFile" value="chr_m.fasta" ftype="fasta" dbkey="equCab2" />
89      <param name="lastCol" value="no" />
90      <param name="indels" value="no" />
91      <param name="mapCap" value="60" />
92      <param name="consensus" value="no" />
93      <output name="output1" file="sam_pileup_out1.pileup" />
94    </test>
95    <test>
96      <!--
97      Bam to pileup command:
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 > test-data/sam_pileup_out2.pileup
99      chr_m.fasta is the prefix of the index
100      -->
101      <param name="reference" value="indexed" />
102      <param name="input1" value="sam_pileup_in1.bam" ftype="bam" dbkey="equCab2" />
103      <param name="lastCol" value="no" />
104      <param name="indels" value="no" />
105      <param name="mapCap" value="60" />
106      <param name="consensus" value="yes" />
107      <param name="theta" value="0.85" />
108      <param name="hapNum" value="2" />
109      <param name="fraction" value="0.001" />
110      <param name="phredProb" value="40" />
111      <output name="output1" file="sam_pileup_out2.pileup" />
112    </test>
113  </tests>
114  <help>
115
116**What it does**
117
118Uses 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.
119
120.. _SAMTools: http://samtools.sourceforge.net/samtools.shtml
121
122------
123
124**Types of pileup datasets**
125
126The 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.
127
128.. _Pileup: http://samtools.sourceforge.net/pileup.shtml
129
130**Six column pileup**::
131
132    1    2  3  4        5        6
133 ---------------------------------
134 chrM  412  A  2       .,       II
135 chrM  413  G  4     ..t,     IIIH
136 chrM  414  C  4     ...a     III2
137 chrM  415  C  4     TTTt     III7
138   
139where::
140
141  Column Definition
142 ------- ----------------------------
143       1 Chromosome
144       2 Position (1-based)
145       3 Reference base at that position
146       4 Coverage (# reads aligning over that position)
147       5 Bases within reads where (see Galaxy wiki for more info)
148       6 Quality values (phred33 scale, see Galaxy wiki for more)
149       
150**Ten column pileup**
151
152The `ten-column` (consensus_) pileup incorporates additional consensus information generated with *-c* option of *samtools pileup* command::
153
154
155    1    2  3  4   5   6   7   8       9       10
156 ------------------------------------------------
157 chrM  412  A  A  75   0  25  2       .,       II
158 chrM  413  G  G  72   0  25  4     ..t,     IIIH
159 chrM  414  C  C  75   0  25  4     ...a     III2
160 chrM  415  C  T  75  75  25  4     TTTt     III7
161
162where::
163
164  Column Definition
165 ------- --------------------------------------------------------
166       1 Chromosome
167       2 Position (1-based)
168       3 Reference base at that position
169       4 Consensus bases
170       5 Consensus quality
171       6 SNP quality
172       7 Maximum mapping quality
173       8 Coverage (# reads aligning over that position)
174       9 Bases within reads where (see Galaxy wiki for more info)
175      10 Quality values (phred33 scale, see Galaxy wiki for more)
176
177
178.. _consensus: http://samtools.sourceforge.net/cns0.shtml
179
180
181  </help>
182</tool>
183
184
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。