annotate tools/sr_mapping/mosaik.xml @ 1:cdcb0ce84a1b

Uploaded
author xuebing
date Fri, 09 Mar 2012 19:45:15 -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 <?xml version="1.0"?>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
2 <tool id="mosaik_wrapper" name="Map with Mosaik" version="1.1.1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
3 <description/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
4 <requirements><requirement type="package">mosaik</requirement></requirements>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
5 <command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
6 #set $processors = '-p 4'
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
7 #set $lm = ''
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
8 #if $paired.kind == 'single':
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
9 #set $mfl = ''
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
10 #set $ls = ''
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
11 #else:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
12 #set $ls = '-ls $mfl'
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
13 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
14 MosaikBuild -fr
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
15 #if $genomeSource.refGenomeSource == 'indexed':
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
16 ${ filter( lambda x: str( x[0] ) == str( $genomeSource.indexReference ), $__app__.tool_data_tables[ 'mosaik_indexes' ].get_fields() )[0][-1] }
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
17 #else:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
18 $genomeSource.historyReference
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
19 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
20 -oa mosaik_ref_file;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
21 MosaikBuild -q $reads $mfl -st $st -out mosaik_reads_file;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
22 MosaikAligner -ia mosaik_ref_file -in mosaik_reads_file -out mosaik_aligned_file $ls -mm $mm -mhp $mhp -act $act -bw $bw $processors $lm -hs 15;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
23 MosaikText -in mosaik_aligned_file -$outFormat sam_bam_file;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
24 #if str($outFormat) == 'bam':
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
25 samtools sort sam_bam_file sorted_bam;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
26 mv sorted_bam.bam $output
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
27 #else:
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
28 gunzip sam_bam_file.gz;
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
29 mv sam_bam_file $output
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
30 #end if
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
31 </command>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
32 <inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
33 <conditional name="genomeSource">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
34 <param name="refGenomeSource" type="select" label="Will you select a reference genome from your history or use a built-in index?">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
35 <option value="indexed">Use a built-in index</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
36 <option value="history">Use one from the history</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
37 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
38 <when value="indexed">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
39 <param name="indexReference" type="select" label="Select a reference genome">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
40 <options from_data_table="mosaik_indexes">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
41 <filter type="sort_by" column="2"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
42 <validator type="no_options" message="No indexes are available" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
43 </options>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
44 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
45 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
46 <when value="history">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
47 <param format="fasta" name="historyReference" type="data" metadata_name="dbkey" label="Select a reference from history"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
48 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
49 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
50 <param format="fastq" name="reads" type="data" label="Fastq Reads File"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
51 <param name="outFormat" type="select" label="Output Format">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
52 <option value="sam">Sam</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
53 <option value="bam">Bam</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
54 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
55 <param name="st" type="select" label="Sequencing Technology Used">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
56 <option value="454">454</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
57 <option value="illumina">Illumina</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
58 <option value="solid">Solid</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
59 <option value="sanger">Sanger</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
60 <option value="helicos">Helicos</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
61 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
62 <conditional name="paired">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
63 <param name="kind" type="select" label="Is this library mate-paired?">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
64 <option value="single">Single-end</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
65 <option value="paired">Paired-end</option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
66 </param>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
67 <when value="single"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
68 <when value="paired">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
69 <param name="mfl" type="integer" value="200" label="Insert Size" help="the length between the paired reads"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
70 <param name="ls" type="integer" value="50" label="Realignment Window" help="Window size to realign mate pairs that are out of position. Large values slow down performance"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
71 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
72 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
73 <param name="mm" size="5" type="integer" value="6" label="Mismatches allowed" help="mismatches allowed per sequence"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
74 <param name="act" size="5" type="integer" value="35" label="Alignment Candidate Threshold" help="determines which hash regions will be aligned with Smith Waterman"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
75 <param name="bw" size="5" type="integer" value="19" label="Smith-Waterman band width"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
76 <param name="mhp" size="5" type="integer" value="100" label="Maximum # Of Positions Stored Per Seed" help="number of places in the reference the aligner will try to place a particular hash"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
77 </inputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
78 <outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
79 <data format="sam" name="output">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
80 <change_format>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
81 <when input="outFormat" value="bam" format="bam" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
82 </change_format>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
83 <actions>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
84 <conditional name="genomeSource.refGenomeSource">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
85 <when value="indexed">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
86 <action type="metadata" name="dbkey">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
87 <option type="from_data_table" name="mosaik_indexes" column="1">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
88 <filter type="param_value" column="0" value="#" compare="startswith" keep="False" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
89 <filter type="param_value" ref="genomeSource.indexReference" column="0" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
90 </option>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
91 </action>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
92 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
93 <when value="history">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
94 <action type="metadata" name="dbkey">
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
95 <option type="from_param" name="genomeSource.historyReference" param_attribute="dbkey" />
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
96 </action>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
97 </when>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
98 </conditional>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
99 </actions>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
100 </data>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
101 </outputs>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
102 <tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
103 <test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
104 <param name="refGenomeSource" value="history"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
105 <param name="historyReference" ftype="fasta" value="mosaik_test_ref.fasta"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
106 <param name="reads" ftype="fastq" value="mosaik_test_input.fastq"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
107 <param name="outFormat" value="sam"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
108 <param name="st" value="454"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
109 <param name="kind" value="single"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
110 <param name="mm" value="6"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
111 <param name="act" value="35"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
112 <param name="bw" value="19"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
113 <param name="mhp" value="100"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
114 <output name="output" file="mosaik_test_out.sam" compare="sim_size" delta="0"/>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
115 </test>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
116 </tests>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
117 <help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
118 This tool uses Mosaik to align reads to a reference sequence.
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
119 </help>
9071e359b9a3 Uploaded
xuebing
parents:
diff changeset
120 </tool>