PageRenderTime 26ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/tools/sr_mapping/PerM.xml

https://bitbucket.org/cistrome/cistrome-harvard/
XML | 369 lines | 315 code | 33 blank | 21 comment | 0 complexity | 061cf1d2222c359270b1bd825762e55f MD5 | raw file
  1<tool id="PerM" name="Map with PerM" version="1.1.2">
  2  <description>for SOLiD and Illumina</description>
  3  <!-- works with PerM version 0.2.6 -->
  4  <requirements>
  5      <requirement type="package">perm</requirement>
  6  </requirements>
  7  <command>
  8    echo -n "PerM "; PerM 2>&amp;1 | grep "Version";
  9    PerM
 10      #if $s.sourceOfRef.refSource == "history"
 11        $s.sourceOfRef.ref
 12      #else
 13        #if $s.space == "color"
 14          "${s.sourceOfRef.index.fields.path}"
 15        #elif $s.space == "base"
 16          "${s.sourceOfRef.index.fields.path}"
 17        #end if
 18      #end if
 19      #if $s.mate.singleOrPairs == "single":
 20        $s.mate.reads
 21      #else:
 22        -1 $s.mate.reads1 -2 $s.mate.reads2
 23        -U $s.mate.upperbound
 24        -L $s.mate.lowerbound
 25        $s.mate.excludeAmbiguousPairs
 26      #end if
 27      #if $s.space == "color":
 28        --readFormat "csfastq"
 29      #else:
 30        --readFormat "fastq"
 31      #end if
 32      #if $int($str($valAlign)) &gt;= 0
 33        -v $valAlign
 34      #end if
 35      #if $align.options == "full":
 36        --seed $align.seed
 37        -$align.alignments
 38        #if $str($align.delimiter) != "None"
 39          --delimiter $align.delimiter
 40        #end if
 41        -T $align.sTrimL
 42        $align.includeReadsWN
 43        $align.statsOnly
 44        $align.ignoreQS
 45      #end if
 46      #if $str($bUnmappedRead) == "true" and $s.space == "color"
 47        -u $unmappedReadOutCS
 48      #elif $str($bUnmappedRead) == "true" and $s.space == "base"
 49        -u $unmappedReadOut
 50      #end if
 51      -o $output
 52      --outputFormat sam
 53      --noSamHeader | tr '\r' '\n' | tr -cd "[:print:]\t\n " | grep "Reads\|Sub0\|Pairs\|single" | sed 's/.*Reads:,//' | sed 's/\/.*dat,_ Sub0/Sub0/'
 54  </command>
 55  <inputs>
 56    <conditional name="s">
 57      <param name="space" label="Is your data color space (SOLiD) or base space (Illumina)?" type="select">
 58        <option value="color">Color space</option>
 59        <option value="base">Base space</option>
 60      </param>
 61      <when value="color">
 62        <conditional name="sourceOfRef">
 63          <param name="refSource" label="Will you provide your own reference file from the history or use a built-in index?" type="select">
 64            <option value="indexed">Built-in index</option>
 65            <option value="history">Fasta file from history</option>
 66          </param>
 67          <when value="indexed">
 68            <param name="index" type="select" label="Select a reference genome (with seed and read length)" help="if your genome of interest is not listed - contact Galaxy team">
 69              <options from_data_table="perm_color_indexes"/>
 70            </param>
 71          </when>
 72          <when value="history">
 73            <param name="ref" format="fasta" type="data" label="Reference" />
 74          </when>
 75        </conditional>
 76        <conditional name="mate">
 77          <param name="singleOrPairs" label="Mate-paired?" type="select">
 78            <option value="single">Single-end</option>
 79            <option value="paired">Mate pairs</option>
 80          </param>
 81          <when value="single">
 82            <param format="fastqcssanger" name="reads" type="data" label="Reads" />
 83          </when>
 84          <when value="paired">
 85            <param name="reads1" format="fastqcssanger" label="Forward FASTQ file" type="data" />
 86            <param name="reads2" format="fastqcssanger" label="Reverse FASTQ file" type="data" />
 87            <param label="Upperbound of pairs separation (-U)" name="upperbound" type="integer" size="8" value="100000" />
 88            <param label="Lowerbound of pairs separation (-L)" name="lowerbound" type="integer" size="8" value="0" />
 89            <param label="Exclude ambiguous pairs (-e)" name="excludeAmbiguousPairs" type="boolean" checked="false" truevalue="-e" falsevalue="" />
 90          </when>
 91        </conditional>
 92      </when>
 93      <when value="base">
 94        <conditional name="sourceOfRef">
 95          <param name="refSource" label="Will you provide your own reference file from the history or use a built-in index?" type="select">
 96            <option value="indexed">Built-in index</option>
 97            <option value="history">Fasta file from history</option>
 98          </param>
 99          <when value="indexed">
100            <param name="index" type="select" label="Select a reference genome with seed and read length" help="if your genome of interest is not listed - contact Galaxy team">
101              <options from_data_table="perm_base_indexes"/>
102            </param>
103          </when>
104          <when value="history">
105            <param name="ref" format="fasta" type="data" label="Reference" />
106          </when>
107        </conditional>
108        <conditional name="mate">
109          <param name="singleOrPairs" label="Mate-paired?" type="select">
110            <option value="single">Single-end</option>
111            <option value="paired">Mate pairs</option>
112          </param>
113          <when value="single">
114            <param format="fastqsanger" name="reads" type="data" label="Reads" />
115          </when>
116          <when value="paired">
117            <param name="reads1" format="fastqsanger" label="Forward FASTQ file" type="data" />
118            <param name="reads2" format="fastqsanger" label="Reverse FASTQ file" type="data" />
119            <param label="Upperbound of pairs separation (-U)" name="upperbound" type="integer" size="8" value="100000" />
120            <param label="Lowerbound of pairs separation (-L)" name="lowerbound" type="integer" size="8" value="0" />
121            <param label="Exclude ambiguous pairs (-e)" name="excludeAmbiguousPairs" type="boolean" checked="false" truevalue="-e" falsevalue="" />
122          </when>
123        </conditional>
124      </when>
125    </conditional>
126    <param label="Maximum number of mismatches permitted in one end of full read (-v)" name="valAlign" type="integer" size="5" value="2" />
127    <conditional name="align">
128      <param help="Use default setting or specify full parameters list" label="PerM settings to use" name="options" type="select">
129        <option value="preSet">Commonly used</option>
130        <option value="full">Full parameter list</option>
131      </param>
132      <when value="preSet"/>
133      <when value="full">
134        <param label="Whether or not to report all valid alignments per read (-A/-B/-E)" name="alignments" type="select">
135          <option value="A">Report all valid alignments</option>
136          <option value="B">Report the best alignments in terms of number of mismatches</option>
137          <option value="E">Report only uniquely mapped reads</option>
138        </param>
139        <param label="Choose the seed full sensitive to different number of mismatches (--seed)" name="seed" type="select" >
140          <option value="F2">2 mismatches</option>
141          <option value="S11">1 SNP + 1 color error</option>
142          <option value="F3">3 mismatches</option>
143          <option value="F4">4 mismatches</option>
144        </param>
145        <param label="Choose the delimiter to identify read name (--delimiter)" name="delimiter" type="select">
146          <option value="None">Tab/Space/Comma</option>
147          <option value=":">Colon</option>
148          <option value="_">Underscore</option>
149        </param>
150        <param label="Use the first n bases of each read for alignment (-T)" name="sTrimL" type="integer" size="5" value="50" />
151        <param name="includeReadsWN" type="boolean" checked="true" truevalue="--includeReadsWN" falsevalue="" label="Include reads with 'N' or '.' by encoding '.' as 3, 'N' as 'A' (--includeReadsWN)" /> 
152        <param name="statsOnly" type="boolean" checked="false" truevalue="--statsOnly" falsevalue="" label="Output mapping stats only. Don't output alignments (--statsOnly)" />
153        <param name="ignoreQS" type="boolean" checked="false" truevalue="--ignoreQS" falsevalue="" label="Ignore quality scores (--ignoreQS)" />
154      </when>
155    </conditional> <!-- options -->
156    <param name="bUnmappedRead" type="select" label="Output the unmapped reads (-u)">
157      <option value="true">Yes</option>
158      <option value="false">No</option>
159    </param>
160  </inputs>
161  <outputs>
162    <data format="sam" name="output" label="${tool.name} on ${on_string}: mapped reads" />
163    <data format="fastqsanger" name="unmappedReadOut" label="${tool.name} on ${on_string}: unmapped reads">
164      <filter>bUnmappedRead == "true" and s["space"] == "base"</filter>
165    </data>
166    <data format="fastqcssanger" name="unmappedReadOutCS" label="${tool.name} on ${on_string}: unmapped reads">
167      <filter>bUnmappedRead == "true" and s["space"] == "color"</filter>
168    </data>
169  </outputs>
170  <tests>
171    <test>
172      <!--
173      PerM command:
174      PerM /afs/bx.psu.edu/depot/data/genome/phiX/perm_index/phiX_base_F3_50.index -1 test-data/perm_in1.fastqsanger -2 test-data/perm_in2.fastqsanger -U 100000 -L 0 -e +readFormat fastq -v 0 +seed F3 -A -T 50 +includeReadsWN -o perm_out1.sam +outputFormat sam +noSamHeader | tr '\r' '\n' | tr -cd "[:print:]\t\n " | grep "Reads\|Sub0\|Pairs\|single" | sed 's/.*Reads:,//' | sed 's/\/.*dat,_ Sub0/Sub0/'
175      You need to replace the + with 2 dashes.
176      -->
177      <param name="space" value="base" />
178      <param name="refSource" value="indexed" />
179      <param name="index" value="phiX_F3_50" />
180      <param name="singleOrPairs" value="paired" />
181      <param name="reads1" value="perm_in1.fastqsanger" ftype="fastqsanger" />
182      <param name="reads2" value="perm_in2.fastqsanger" ftype="fastqsanger" />
183      <param name="upperbound" value="100000" />
184      <param name="lowerbound" value="0" />
185      <param name="excludeAmbiguousPairs" value="true" />
186      <param name="valAlign" value="0" />
187      <param name="options" value="full" />
188      <param name="alignments" value="A" />
189      <param name="seed" value="F3" />
190      <param name="delimiter" value="None" />
191      <param name="sTrimL" value="50" />
192      <param name="includeReadsWN" value="true" />
193      <param name="statsOnly" value="false" />
194      <param name="ignoreQS" value="false" />
195      <param name="bUnmappedRead" value="false" />
196      <output name="output" file="perm_out1.sam" ftype="sam" />
197    </test>
198    <test>
199      <!--
200      PerM command:
201      PerM test-data/chr_m.fasta test-data/perm_in3.fastqsanger +readFormat fastq -v 2 -u perm_out3.fastqsanger -o perm_out2.sam +outputFormat sam +noSamHeader | tr '\r' '\n' | tr -cd "[:print:]\t\n " | grep "Reads\|Sub0\|Pairs\|single" | sed 's/.*Reads:,//' | sed 's/\/.*dat,_ Sub0/Sub0/'
202      You need to replace the + with 2 dashes.
203      -->
204      <param name="space" value="base" />
205      <param name="refSource" value="history" />
206      <param name="ref" value="chr_m.fasta" ftype="fasta" />
207      <param name="singleOrPairs" value="single" />
208      <param name="reads" value="perm_in3.fastqsanger" ftype="fastqsanger" />
209      <param name="valAlign" value="2" />
210      <param name="options" value="preSet" />
211      <param name="bUnmappedRead" value="true" />
212      <output name="output" file="perm_out2.sam" ftype="sam" />
213      <output name="unmappedReadOut" file="perm_out3.fastqsanger" ftype="fastqsanger" />
214    </test>
215    <test>
216      <!--
217      PerM command:
218      PerM test-data/phiX.fasta test-data/perm_in4.fastqcssanger +readFormat csfastq -v 1 -o perm_out4.sam +outputFormat sam +noSamHeader | tr '\r' '\n' | tr -cd "[:print:]\t\n " | grep "Reads\|Sub0\|Pairs\|single" | sed 's/.*Reads:,//' | sed 's/\/.*dat,_ Sub0/Sub0/'
219      You need to replace the + with 2 dashes.
220      -->
221      <param name="space" value="color" />
222      <param name="refSource" value="history" />
223      <param name="ref" value="phiX.fasta" ftype="fasta" />
224      <param name="singleOrPairs" value="single" />
225      <param name="reads" value="perm_in4.fastqcssanger" ftype="fastqcssanger" />
226      <param name="valAlign" value="1" />
227      <param name="options" value="preSet" />
228      <param name="bUnmappedRead" value="false" />
229      <output name="output" file="perm_out4.sam" ftype="sam" />
230    </test>
231    <test>
232      <!--
233      PerM command:
234      PerM /afs/bx.psu.edu/depot/data/genome/equCab2/perm_index/equCab2_chrM_color_F2_50.index -1 test-data/perm_in5.fastqcssanger -2 test-data/perm_in6.fastqcssanger -U 90000 -L 10000 +readFormat csfastq -v 3 +seed F2-o perm_out5.sam +outputFormat sam +noSamHeader | tr '\r' '\n' | tr -cd "[:print:]\t\n " | grep "Reads\|Sub0\|Pairs\|single" | sed 's/.*Reads:,//' | sed 's/\/.*dat,_ Sub0/Sub0/'
235      You need to replace the + with 2 dashes.
236      -->
237      <param name="space" value="color" />
238      <param name="refSource" value="indexed" />
239      <param name="index" value="equCab2_chrM_F2_50" />
240      <param name="singleOrPairs" value="paired" />
241      <param name="reads1" value="perm_in5.fastqcssanger" ftype="fastqcssanger" />
242      <param name="reads2" value="perm_in6.fastqcssanger" ftype="fastqcssanger" />
243      <param name="upperbound" value="90000" />
244      <param name="lowerbound" value="10000" />
245      <param name="excludeAmbiguousPairs" value="false" />
246      <param name="valAlign" value="3" />
247      <param name="options" value="preSet" />
248      <param name="bUnmappedRead" value="false" />
249      <output name="output" file="perm_out5.sam" ftype="sam" />
250    </test>
251  </tests>
252  <help>
253**What it does**
254
255PerM is a short read aligner designed to be ultrafast with long SOLiD reads to the whole genome or transcriptions. PerM can be fully sensitive to alignments with up to four mismatches and highly sensitive to a higher number of mismatches.
256
257**Development team**
258
259PerM is developed by Ting Chen's group, Center of Excellence in Genomic Sciences at the University of Southern California. If you have any questions, please email yanghoch at usc.edu or check the `project page`__.
260
261 .. __: http://code.google.com/p/perm/
262
263**Citation**
264
265PerM: Efficient mapping of short sequencing reads with periodic full sensitive spaced seeds. Bioinformatics, 2009, 25 (19): 2514-2521.
266
267**Input**
268
269The input files are read files and a reference. Users can use the pre-indexed reference in Galaxy or upload their own reference.
270
271The uploaded reference file should be in the fasta format. Multiple sequences like transcriptions should be concatenated together separated by a header line that starts with the ">" character.
272
273Reads files must be in either fastqsanger or fastqcssanger format to use in PerM. However, there are several possible starting formats that can be converted to one of those two: fastq (any type), color-space fastq, fasta, csfasta, or csfasta+qualsolid. 
274
275An uploaded base-space fastq file MUST be checked/transformed with FASTQGroomer tools in Galaxy to be converted to the fastqsanger format (this is true even if the original file is in Sanger format).
276
277Uploaded fasta and csfasta without quality score files can be transformed to fastqsanger by the FASTQGroomer, with pseudo quality scores added.
278
279An uploaded csfasta + qual pair can also be transformed into fastqcssanger by solid2fastq.
280
281**Outputs**
282
283The output mapping result is in SAM format, and has the following columns::
284
285    Column  Description
286  --------  --------------------------------------------------------
287   1 QNAME  Query (pair) NAME
288   2 FLAG   bitwise FLAG
289   3 RNAME  Reference sequence NAME
290   4 POS    1-based leftmost POSition/coordinate of clipped sequence
291   5 MAPQ   MAPping Quality (Phred-scaled)
292   6 CIGAR  extended CIGAR string
293   7 MRNM   Mate Reference sequence NaMe ('=' if same as RNAME)
294   8 MPOS   1-based Mate POSition
295   9 ISIZE  Inferred insert SIZE
296  10 SEQ    query SEQuence on the same strand as the reference
297  11 QUAL   query QUALity (ASCII-33 gives the Phred base quality)
298  12 OPT    variable OPTional fields in the format TAG:VTYPE:VALUE
299  12.1 NM   Number of mismatches (SOLiD-specific)
300  12.2 CS   Reads in color space (SOLiD-specific)
301  12.3 CQ   Bases quality in color spacehidden="true" (SOLiD-specific)
302
303The flags are as follows::
304
305    Flag  Description
306  ------  -------------------------------------
307  0x0001  the read is paired in sequencing
308  0x0002  the read is mapped in a proper pair
309  0x0004  the query sequence itself is unmapped
310  0x0008  the mate is unmapped
311  0x0010  strand of the query (1 for reverse)
312  0x0020  strand of the mate
313  0x0040  the read is the first read in a pair
314  0x0080  the read is the second read in a pair
315  0x0100  the alignment is not primary
316
317Here is some sample output::
318
319  Qname	FLAG	Rname	POS	MAPQ	CIAGR	MRNM	MPOS	ISIZE	SEQ	QUAL	NM	CS	CQ
320  491_28_332_F3   16      ref-1   282734  255     35M     *       0       0       AGTCAAACTCCGAATGCCAATGACTTATCCTTAGG    #%%%%%%%!!%%%!!%%%%%%%%!!%%%%%%%%%%      NM:i:3  CS:Z:C0230202330012130103100230121001212        CQ:Z:###################################
321  491_28_332_F3   16      ref-1   269436  255     35M     *       0       0       AGTCAAACTCCGAATGCCAATGACTTATCCTTAGG    #%%%%%%%!!%%%!!%%%%%%%%!!%%%%%%%%%%      NM:i:3  CS:Z:C0230202330012130103100230121001212        CQ:Z:###################################
322
323The user can check a checkbox for optional output containing the unmmaped reads in fastqsanger or fastqcssanger. The default is to produce it.
324
325**PerM parameter list**
326
327Below is a list of PerM command line options for PerM. Not all of these are relevant to Galaxy's implementation, but are included for completeness.
328
329The command for single-end::
330
331  PerM [ref_or_index] [read] [options]
332
333The command for paired-end::
334
335  PerM [ref_or_index] -1 [read1] -2 [read1] [options]
336
337The command-line options::
338
339  -A                Output all alignments within the given mismatch threshold, end-to-end.
340  -B                Output best alignments in terms of mismatches in the given mismatch threshold. [Default]
341  -E                Output only the uniquely mapped reads in the given mismatch threshold.
342  -m                Create the reference index, without reusing the saved index.
343  -s PATH           Save the reference index to accelerate the mapping in the future. If PATH is not specified, the default path will be used.
344  -v INT            Where INT is the number of mismatches allowed in one end. [Default=2]
345  -T INT            Where INT is the length to truncate read length to, so 30 means use only first 30 bases (signals). Leave blank if the full read is meant to be used.
346  -o PATH           Where PATH is for output the mapping of one read set. PerM's output are in .mapping or .sam format, determined by the ext name of PATH. Ex: -o out.sam will output in SAM format; -o out.mapping will output in .mapping format.
347  -d PATH           Where PATH is the directory for multiple read sets.
348  -u PATH           Print the fastq file of those unmapped reads to the file in PATH.
349  --noSamHeader     Print no SAM header so it is convenient to concatenate multiple SAM output files.
350  --includeReadsWN  Encodes N or "." with A or 3, respectively.
351  --statsOnly       Output the mapping statistics in stdout only, without saving alignments to files.
352  --ignoreQS        Ignore the quality scores in fastq or QUAL files.
353  --seed {F2 | S11 | F3 | F4}    Specify the seed pattern, which has a specific full sensitivity. Check the algorithm page (link below) for seed patterns to balance the sensitivity and running time.
354  --readFormat {fasta | fastq | csfasta | csfastq}    Read in reads in the specified format, instead of guessing according to the extension name.
355  --delimiter CHAR  Which is a character used as the delimiter to separate the the read id, and the additional info in the line with ">" in fasta or csfasta.
356
357Paired reads options::
358
359  -e        Exclude ambiguous paired.
360  -L INT    Mate-paired separate lower bound.
361  -U INT    Mate-paired separate upper bound.
362  -1 PATH   The forward reads file path.
363  -2 PATH   The reversed reads file path.
364
365See the PerM `algorithm page`__ for information on algorithms and seeds.
366
367 .. __: http://code.google.com/p/perm/wiki/Algorithms
368  </help>
369</tool>