root/galaxy-central/tools/sr_mapping/srma_wrapper.xml

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

import galaxy-central

行番号 
1<tool id="srma_wrapper" name="Re-align with SRMA" version="0.1.5">
2  <description></description>
3  <command interpreter="python">srma_wrapper.py
4    #if $refGenomeSource.refGenomeSource_type == "history":
5        --ref=$refGenomeSource.ownFile
6    #else:
7        --refUID=$refGenomeSource.ref
8        --refLocations=${GALAXY_DATA_INDEX_DIR}/srma_index.loc
9    #end if
10    --input=$input --inputIndex=${input.metadata.bam_index} --output=$output
11    --params=$params.source_select --fileSource=$refGenomeSource.refGenomeSource_type
12    --jarBin="${GALAXY_DATA_INDEX_DIR}/shared/jars"
13    #if $params.source_select == "full":
14        --offset=$params.offset --minMappingQuality=$params.minMappingQuality --minAlleleProbability=$params.minAlleleProbability --minAlleleCoverage=$params.minAlleleCoverage --range=$params.range --correctBases=$params.correctBases --useSequenceQualities=$params.useSequenceQualities --maxHeapSize=$params.maxHeapSize
15    #end if
16    --jarFile="srma.jar"
17  </command>
18  <inputs>
19    <conditional name="refGenomeSource">
20      <param name="refGenomeSource_type" type="select" label="Will you select a reference genome from your history or use a built-in reference?">
21        <option value="built-in">Use a built-in reference</option>
22        <option value="history">Use one from the history</option>
23      </param>
24      <when value="built-in">
25        <param name="ref" type="select" label="Select a reference genome">
26          <options from_file="srma_index.loc">
27            <column name="value" index="0" />
28            <column name="name" index="0" />
29          </options>
30        </param>
31      </when>
32      <when value="history">
33        <param name="ownFile" type="data" format="fasta" metadata_name="dbkey" label="Select a reference from history" />
34      </when>
35    </conditional>
36    <param name="input" type="data" format="bam" label="Input BAM file" help="The input BAM file to re-align"/>
37    <conditional name="params">
38      <param name="source_select" type="select" label="SRMA settings to use" help="For most re-alignment needs, use Commonly Used settings. If you want full control use Full Parameter List">
39        <option value="pre_set">Commonly Used</option>
40        <option value="full">Full Parameter List</option>
41      </param>
42      <when value="pre_set" />
43      <when value="full">
44        <param name="offset" type="integer" value="20" label="Offset" help="The alignment offset" />
45        <param name="minMappingQuality" type="integer" value="0" label="Minimum mapping quality" help="The minimum mapping quality" />
46        <param name="minAlleleProbability" type="float" value="0.1" label="Minimum allele probability" help="The minimum allele probability conditioned on coverage (for the binomial quantile)." />
47        <param name="minAlleleCoverage" type="integer" value="2" label="Minimum allele coverage" help="The minimum haploid coverage for the consensus. Default value: 3. This option can be set " />
48        <param name="range" type="text" value="null" label="Range" help="A range to examine" />
49        <param name="correctBases" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Correct bases" help="Correct bases " />
50        <param name="useSequenceQualities" type="boolean" truevalue="true" falsevalue="false" checked="no" label="Use sequence qualities" help="Use sequence qualities " />
51        <param name="maxHeapSize" type="integer" value="8192" label="Maximum heap size" help="The maximum number of nodes on the heap before re-alignment is ignored" />
52      </when>
53    </conditional>
54  </inputs>
55  <outputs>
56    <data format="bam" name="output">
57      <actions>
58        <conditional name="refGenomeSource.refGenomeSource_type">
59          <when value="built-in">
60            <action type="metadata" name="dbkey">
61              <option type="from_file" name="srma_index.loc" column="0" offset="0">
62                <filter type="param_value" column="0" value="#" compare="startswith" keep="False" />
63                <filter type="param_value" ref="refGenomeSource.ref" column="1" />
64              </option>
65            </action>
66          </when>
67        </conditional>
68      </actions>
69    </data>
70  </outputs>
71  <tests>
72      <test>
73          <!-- Commands to run to prepare test files (uses built-in index)
74            Prepare bam index file:
75            samtools index srma_in1.bam
76            Run SRMA:
77            java -jar "srma.jar" I=srma_in1.bam O=srma_out1.bam R=/afs/bx.psu.edu/depot/data/genome/hg18/srma_index/chr21.fa
78            To create the bam file first, start with a sam file (srma_in1.sam) generated with a run using the chr21 fasta file and which contains the header. Run before samtools index:
79            samtools view -bt /afs/bx.psu.edu/depot/data/genome/hg18/sam_index/chr21.fa -o srma_in1.u.bam srma_in1.sam
80            samtools sort srma_in1.u.bam srma_in1
81          -->
82          <param name="refGenomeSource_type" value="built-in" />
83          <param name="ref" value="hg18chr21" />
84          <param name="input" value="srma_in1.bam" type="bam" />
85          <param name="source_select" value="pre_set" />
86          <output name="output" file="srma_out1.bam"/>
87      </test>
88      <test>
89          <!-- Commands to run to prepare test files (uses custom genome):
90            Prepare custom dict/index files:
91            samtools faidx srma_in2.fa
92            java -cp "srma.jar" net.sf.picard.sam.CreateSequenceDictionary R=srma_in2.fa O=srma_in2.dict
93            Prepare bam index file:
94            samtools index srma_in3.bam
95            Run SRMA:
96            java -jar "srma.jar" I=srma_in3.bam O=srma_out2.bam R=srma_in2.fa OFFSET=20 MIN_MAPQ=0 MINIMUM_ALLELE_PROBABILITY=0.1 MINIMUM_ALLELE_COVERAGE=2 RANGES=null RANGE=null CORRECT_BASES=true USE_SEQUENCE_QUALITIES=true MAX_HEAP_SIZE=8192
97            To create the bam file first, the sam file needs to have been run with the same reference file (srma_in2.fa) and have the header present. Run these commands before samtools index:
98            samtools view -bt srma_in2.fa -o srma_in3.u.bam srma_in1.sam
99            samtools sort srma_in3.u.bam srma_in3
100          -->
101          <param name="refGenomeSource_type" value="history" />
102          <param name="ownFile" value="srma_in2.fa" />
103          <param name="input" value="srma_in3.bam" type="bam" />
104          <param name="source_select" value="full" />
105          <param name="offset" value="20" />
106          <param name="minMappingQuality" value="0" />
107          <param name="minAlleleProbability" value="0.1" />
108          <param name="minAlleleCoverage" value="2" />
109          <param name="range" value="null" />
110          <param name="correctBases" value="true" />
111          <param name="useSequenceQualities" value="true" />
112          <param name="maxHeapSize" value="8192" />
113          <output name="output" file="srma_out2.bam"/>
114      </test>
115  </tests>
116  <help>
117**What it does**
118
119SRMA is a short read micro re-aligner for next-generation high throughput sequencing data.
120
121Sequence alignment algorithms examine each read independently. When indels occur towards the ends of reads, the alignment can lead to false SNPs as well as improperly placed indels. This tool aims to perform a re-alignment of each read to a graphical representation of all alignments within a local region to provide a better overall base-resolution consensus.
122
123Currently this tool works well with and has been tested on 30x diploid coverage genome sequencing data from Illumina and ABI SOLiD technology. This tool may not work well with 454 data, as indels are a significant error mode for 454 data.
124
125------
126
127Please cite the website "http://srma.sourceforge.net" as well as:
128
129Homer N, and Nelson SF.  SRMA: short read micro re-aligner. 2010.
130
131------
132
133**Know what you are doing**
134
135.. class:: warningmark
136
137There is no such thing (yet) as an automated gearshift in short read mapping. It is all like stick-shift driving in San Francisco. In other words = running this tool with default parameters will probably not give you meaningful results. A way to deal with this is to **understand** the parameters by carefully reading the `documentation`__ and experimenting. Fortunately, Galaxy makes experimenting easy.
138
139.. __: http://srma.sourceforge.net/
140
141------
142
143**Input formats**
144
145SRMA accepts a BAM input file. Note that this file should have been generated from a SAM file which contains the header.
146
147------
148
149**Outputs**
150
151The output is in BAM format, see http://samtools.sourceforge.net for more details.
152
153-------
154
155**SRMA settings**
156
157All of the options have a default value. You can change any of them. Most of the options in SRMA have been implemented here.
158
159------
160
161**SRMA parameter list**
162
163This is an exhaustive list of SRMA options:
164
165For **SRMA**::
166
167  INPUT=File
168  I=File                        The input SAM or BAM file. Required.
169 
170  OUTPUT=File
171  O=File                        The output SAM or BAM file. Default value: null.
172 
173  REFERENCE=File
174  R=File                        The reference FASTA file. Required.
175 
176  OFFSET=Integer                The alignment offset. Default value: 20. This option can be set to 'null' to clear the
177                                default value.
178 
179  MIN_MAPQ=Integer              The minimum mapping quality. Default value: 0. This option can be set to 'null' to clear
180                                the default value.
181 
182  MINIMUM_ALLELE_PROBABILITY=Double
183                                The minimum allele probability conditioned on coverage (for the binomial quantile).
184                                Default value: 0.1. This option can be set to 'null' to clear the default value.
185 
186  MINIMUM_ALLELE_COVERAGE=Integer
187                                The minimum haploid coverage for the consensus. Default value: 3. This option can be set
188                                to 'null' to clear the default value.
189 
190  RANGE=String                  A range to examine. Default value: null.
191 
192  CORRECT_BASES=Boolean         Correct bases. Default value: false. This option can be set to 'null' to clear the
193                                default value. Possible values: {true, false}
194 
195  USE_SEQUENCE_QUALITIES=BooleanUse sequence qualities Default value: true. This option can be set to 'null' to clear the
196                                default value. Possible values: {true, false}
197 
198  MAX_HEAP_SIZE=Integer         The maximum number of nodes on the heap before re-alignment is ignored Default value:
199                                8192. This option can be set to 'null' to clear the default value.
200
201  </help>
202</tool>
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。