annotate crest.xml @ 0:acc8d8bfeb9a

Uploaded
author jjohnson
date Wed, 08 Feb 2012 16:59:24 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
1 <tool id="crest" name="CREST" version="1.0">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
2 <description>Clipping reveals structural variations</description>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
3 <requirements>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
4 <requirement type="package">bioperl</requirement>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
5 <requirement type="binary">gfServer</requirement>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
6 <requirement type="binary">gfClient</requirement>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
7 <requirement type="binary">cap</requirement>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
8 </requirements>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
9 <command> mkdir $crest_log.extra_files_path; cat $shscript > $crest_log.extra_files_path/crest.sh; /bin/bash $shscript &#38;> $crest_log</command>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
10 <inputs>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
11 <param name="tumor_bam" type="data" format="bam" label="Tumor Sample"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
12 help="BAM files must contain soft-clipping signatures at the breakpoints. If they do not, you will not get any results."/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
13 <param name="germline_bam" type="data" format="bam" optional="true" label="Germline Sample" help=""/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
14 <conditional name="refGenomeSource">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
15 <param name="genomeSource" type="select" label="&lt;HR&gt;Will you select a reference genome from your history or use a built-in index" help="">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
16 <option value="indexed">Use a built-in index</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
17 <option value="history">Use one from the history</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
18 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
19 <when value="indexed">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
20 <param name="genome_fasta" type="select" label="Select a Reference Dataset" help="if your genome of interest is not listed - contact Galaxy team">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
21 <options from_file="crest.loc">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
22 <column name="dbkey" index="0"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
23 <column name="name" index="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
24 <column name="value" index="2"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
25 <filter type="data_meta" ref="tumor_bam" key="dbkey" column="0" />
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
26 <validator type="no_options" message="No indexes are available" />
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
27 </options>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
28 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
29 <param name="genome_2bit" type="select" optional="true" label="The 2bit index" help="">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
30 <options from_file="crest.loc">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
31 <column name="dbkey" index="0"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
32 <column name="name" index="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
33 <column name="value" index="3"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
34 <filter type="data_meta" ref="tumor_bam" key="dbkey" column="0" />
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
35 </options>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
36 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
37 </when>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
38 <when value="history">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
39 <param name="genome_fasta" type="data" format="fasta" label="Genome Reference Sequence" help="Should match your input Tumor Sample BAM fie database">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
40 <validator type="unspecified_build" message="Must assign a build"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
41 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
42 <param name="genome_2bit" type="data" format="twobit" label="Genome Reference 2bit index (Choose same as Genome Reference Sequence)" help="">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
43 <validator type="unspecified_build" message="Must assign a build"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
44 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
45 </when> <!-- history -->
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
46 </conditional> <!-- refGenomeSource -->
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
47 <!-- Input Datasets -->
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
48 <conditional name="rnaseq">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
49 <param name="mode" type="boolean" checked="false" truevalue="yes" falsevalue="no" label="&lt;HR&gt;RNAseq mode"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
50 help="Requires a gene model file"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
51 <when value="no">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
52 </when>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
53 <when value="yes">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
54 <param name="gene_model" type="data" format="bed" label="Gene model file" help="currently only refFlat format (BED) is supported"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
55 <param name="cluster_size" type="integer" value="" optional="true" label="Cluster Size"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
56 help="The soft-clipped reads within cluster_size will be considered together, default is 3">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
57 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
58 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
59 </when>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
60 </conditional>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
61 <!-- options -->
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
62 <param name="paired" type="boolean" checked="true" truevalue="" falsevalue="--nopaired" label="&lt;HR&gt;Paired Reads?"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
63 <param name="read_len" type="integer" value="" optional="true" label="Read length of the sequencing data"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
64 help="The read length of the sequencing data, defaut 100">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
65 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
66 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
67 <param name="sensitive" type="boolean" checked="false" truevalue="--sensitive" falsevalue="" label="&lt;HR&gt;Sensitive"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
68 help="The program will generate more SVs with higher false positive rate."/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
69 <param name="range" type="text" value="" optional="true" label="Limit Genome range where SV will be detected,"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
70 help="The range where SV will be detected, using chr1:100-200 format">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
71 <validator type="regex" message="format: chr1:100-200">^\w+(:\d+-\d+)?$</validator>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
72 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
73 <conditional name="hit">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
74 <param name="mode" type="select" label="&lt;HR&gt;Adjust Hit Detection">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
75 <option value="no">Use defaults</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
76 <option value="yes">Adjust Settings</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
77 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
78 <when value="yes">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
79 <param name="max_score_diff" type="integer" value="" optional="true" label="maximum score difference"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
80 help="The maximum score difference when stopping select hit, default 10.">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
81 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
82 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
83 <param name="min_sclip_reads" type="integer" value="" optional="true" label="Minimum number of soft clipping reads"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
84 help="Minimum number of soft clipping read to triger the procedure, default 3 (10 for RNASeq)">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
85 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
86 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
87 <param name="max_rep_cover" type="integer" value="" optional="true" label="Repetitive coverage threshold"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
88 help="The min number of coverage to be called as repetitive and don't triger the procedure, default 500 (5000 for RNASeq)">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
89 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
90 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
91 <param name="min_sclip_len" type="integer" value="" optional="true" label="Soft clipping detection"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
92 help="The min length of soft clipping part at a position to triger the detection, default 20.">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
93 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
94 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
95 <param name="min_hit_len" type="integer" value="" optional="true" label="Minimum length of a hit for genome mapping"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
96 help="">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
97 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
98 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
99 <param name="min_hit_reads" type="integer" value="" optional="true" label="Minimum read hits"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
100 help="Minimum number of reads in a hit. default 3 (10 for RNASeq)">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
101 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
102 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
103 <param name="min_dist_diff" type="integer" value="" optional="true" label="Min distance between the mapped position and the soft clipping position"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
104 help="Min distance between the mapped position and the soft clipping position, default 20.">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
105 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
106 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
107 </when>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
108 <when value="no"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
109 </conditional>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
110
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
111 <conditional name="softclip">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
112 <param name="mode" type="select" label="&lt;HR&gt;Adjust Soft Clipping">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
113 <option value="no">Use defaults</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
114 <option value="yes">Adjust Settings</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
115 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
116 <when value="yes">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
117 <param name="min_percent_id" type="integer" value="" optional="true" label="Identity threshold for soft clipping read mapping"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
118 help="Min percentage of identity of soft clipping read mapping, default 90">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
119 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
120 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
121 <param name="min_percent_hq" type="integer" value="" optional="true" label="High quality bases threshold for soft clipping"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
122 help="Min percentage of high quality base in soft clipping reads, default 80">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
123 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
124 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
125 <param name="lowqual_cutoff" type="integer" value="" optional="true" label="Low quality cutoff"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
126 help="Low quality cutoff value, default 20.">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
127 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
128 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
129 </when>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
130 <when value="no"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
131 </conditional>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
132
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
133 <conditional name="sv_filter">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
134 <param name="mode" type="select" label="&lt;HR&gt;Adjust Structural Variant Filtering">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
135 <option value="no">Use defaults</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
136 <option value="yes">Adjust Settings</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
137 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
138 <when value="yes">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
139 <param name="min_percent_cons_of_read" type="float" value="" optional="true" label="Relative consensus length threshold"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
140 help="Minimum percent of consensus length of read length, default 0.75">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
141 <validator type="in_range" message="Must be greater than 0" min="0" max="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
142 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
143 <param name="max_bp_dist" type="integer" value="" optional="true" label="Maximum distance between break points"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
144 help="Maximum distance in base pairs between two idenfitifed break points, default 15">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
145 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
146 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
147 <param name="germline_seq_width" type="integer" value="" optional="true" label="Germline SV filtering window"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
148 help="Half window width of genomic sequence around break point for germline SV filtering, default 100">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
149 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
150 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
151 <param name="germline_search_width" type="integer" value="" optional="true" label="Soft Clip Germline SV filtering window"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
152 help="Half window width for seaching soft-clipped reads around breakpoint for germline SV iltering, default 50">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
153 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
154 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
155 </when>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
156 <when value="no"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
157 </conditional>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
158
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
159 <conditional name="rescue">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
160 <param name="mode" type="select" label="&lt;HR&gt;Rescue mode"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
161 help="a SV with only 1 side with enough soft-clipped reads is considered as a valid one, default is ON.">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
162 <option value="no">Rescue mode Off</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
163 <option value="default" selected="true">Rescue On with default Setting</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
164 <option value="yes">Adjust Rescue Settings</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
165 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
166 <when value="yes">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
167 <param name="min_one_side_reads" type="integer" value="" optional="true" label="Minimum number of soft-clipped reads on one side"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
168 help="the minimum number of soft-clipped reads on one side, default 5">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
169 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
170 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
171 </when>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
172 <when value="no"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
173 <when value="default"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
174 </conditional>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
175
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
176 <conditional name="tandem_repeat">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
177 <param name="mode" type="select" label="&lt;HR&gt;Tandem Repeats"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
178 help="Remove tandem repeat caused SV events, default is ON.">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
179 <option value="default" selected="true">Remove Tandem Repeats using default Setting</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
180 <option value="yes">Remove Tandem Repeats with Adjusted Settings</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
181 <option value="no">Keep Tandem Repeats</option>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
182 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
183 <when value="yes">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
184 <param name="tr_max_indel_size" type="integer" value="" optional="true" label="Maximum INDEL events"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
185 help="Maximum tandem repeat mediated INDEL events, default 100">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
186 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
187 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
188 <param name="tr_min_size" type="integer" value="" optional="true" label="Minimum tandem reapet size"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
189 help="Minimum tandem reapet size, default 2">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
190 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
191 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
192 <param name="tr_max_size" type="integer" value="" optional="true" label="Maximum tandem reapet size"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
193 help="Maximum tandem reapet size, default 8">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
194 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
195 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
196 <param name="tr_min_num" type="integer" value="" optional="true" label="Minimum tandem reapet number"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
197 help="Minimum tandem repeat number, defaut 4">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
198 <validator type="in_range" message="Must be greater than 0" min="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
199 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
200 <param name="hetero_factor" type="float" value="" optional="true" label="heterogenirity and heterozygosity factor"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
201 help="The factor about the SV's heterogenirity and heterozygosity, default 0.4">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
202 <validator type="in_range" message="Must be greater than 0" min="0" max="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
203 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
204 <param name="triger_p_value" type="float" value="" optional="true" label="heterogenirity and heterozygosity factor"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
205 help="The p-value that will triger the SV detection when number of soft-clipped reads is small, default 0.05">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
206 <validator type="in_range" message="Must be greater than 0" min="0" max="1"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
207 </param>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
208 </when>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
209 <when value="default"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
210 <when value="no"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
211 </conditional>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
212 </inputs>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
213 <outputs>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
214 <data format="txt" name="crest_log" label="${tool.name} on ${on_string}: crest.log" />
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
215 <data format="tabular" name="tumor_cover" label="${tool.name} on ${on_string}: tumor.cover" from_work_dir="tumor.bam.cover"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
216 <data format="tabular" name="tumor_sclip" label="${tool.name} on ${on_string}: tumor.sclip.txt" from_work_dir="tumor.bam.sclip.txt"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
217 <data format="tabular" name="germline_cover" label="${tool.name} on ${on_string}: germline.cover" from_work_dir="germline.bam.cover">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
218 <filter>germline_bam != None</filter>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
219 </data>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
220 <data format="tabular" name="germline_sclip" label="${tool.name} on ${on_string}: germline.sclip.txt" from_work_dir="germline.bam.sclip.txt">
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
221 <filter>germline_bam != None</filter>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
222 </data>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
223 <data format="tabular" name="predSV" label="${tool.name} on ${on_string}: tumor.predSV.txt" from_work_dir="tumor.bam.predSV.txt"/>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
224 <data format="html" name="predSV_html" label="${tool.name} on ${on_string}: tumor.bam.predSV.html" />
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
225 </outputs>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
226 <configfiles>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
227 <configfile name="shscript"> #slurp
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
228 #!/bin/bash
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
229 ## define some things for cheetah proccessing and to avoid problems with xml parsing of this tool_config
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
230 #set $amp = chr(38)
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
231 #set $ds = chr(36)
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
232 #set $gt = chr(62)
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
233 #set $lt = chr(60)
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
234 #set $echo_cmd = 'echo'
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
235 ## Find the CREST.pl in the galaxy tool path
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
236 #import Cheetah.FileUtils
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
237 #set $toolpath = '/'.join([$__root_dir__,'tools','crest'])
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
238 #set $crest = $Cheetah.FileUtils.findFiles($toolpath,['CREST.pl'],[],['example','Tree'])[0]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
239 #set $extractSClip = $Cheetah.FileUtils.findFiles($toolpath,['extractSClip.pl'],[],['example','Tree'])[0]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
240 #set $countDiff = $Cheetah.FileUtils.findFiles($toolpath,['countDiff.pl'],[],['example','Tree'])[0]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
241 #set $bam2html = $Cheetah.FileUtils.findFiles($toolpath,['bam2html.pl'],[],['example','Tree'])[0]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
242 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
243 ## Need ptrfinder on path
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
244 export PATH=${ds}PATH:$toolpath
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
245 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
246 ## Set temp directory
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
247 export TMPDIR=`pwd`/tmp
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
248 mkdir -p $TMPDIR
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
249 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
250 ## check for the genome reference 2bit
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
251 if [ ! -f $refGenomeSource.genome_2bit ]; then exit 1; fi
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
252 ## get the dbkey and use that in link name
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
253 #set $dbkey = $tumor_bam.metadata.dbkey
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
254 #set $ref_fa = '.'.join([$dbkey,'fa'])
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
255 #set $ref_2bit = '.'.join([$dbkey,'2bit'])
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
256 ref_fa=$ref_fa
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
257 ref_2bit=$ref_2bit
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
258 ln -s $refGenomeSource.genome_fasta $ref_fa
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
259 ln -s $refGenomeSource.genome_2bit $ref_2bit
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
260 target_genome=`pwd`/$ref_2bit
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
261 ## Problem - gfServer doesn't reserve the port until it's done reading genome, so another might try to open the same port
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
262 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
263 ## start a local gfServer with the selected genome reference
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
264 ## find an open port on which to start a blat server via gfServer
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
265 for (( bp = 50000 + $$ % 1000; bp &lt; 60000; bp += 7 ))
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
266 do
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
267 if ! netstat -an | grep $bp > /dev/null; then blatport=$bp; break; fi
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
268 done
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
269 ## exit if can't open a port
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
270 echo "Starting gfServer on port " $blatport
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
271 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
272 ( gfServer -canStop -log=gfServer.log start localhost ${ds}blatport ${ds}target_genome 2${gt} /dev/null ) ${amp}
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
273 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
274 (
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
275 ## symbolic link the tumor input bam annd bai files in our working directory
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
276 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
277 ln -s $tumor_bam tumor.bam
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
278 ln -s $tumor_bam.metadata.bam_index tumor.bam.bai
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
279 ## String value of an Optional DataToolParameter input is 'None' when not set
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
280 #if $germline_bam.__str__ != 'None':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
281 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
282 ## symbolic link the germline input bam annd bai files in our working directory
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
283 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
284 ln -s $germline_bam germline.bam
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
285 ln -s $germline_bam.metadata.bam_index germline.bam.bai
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
286 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
287 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
288 ## Get soft-clipping positions.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
289 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
290 $echo_cmd perl -I $toolpath $extractSClip -i tumor.bam --ref_genome $ref_fa
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
291 perl -I $toolpath $extractSClip -i tumor.bam --ref_genome $ref_fa
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
292 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
293 ## If there is a germline input
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
294 #if $germline_bam.__str__ != 'None':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
295 $echo_cmd perl -I $toolpath $extractSClip -i tumor.bam --ref_genome $ref_fa
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
296 perl -I $toolpath $extractSClip -i tumor.bam --ref_genome $ref_fa
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
297 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
298 ## Remove germline events (optional)
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
299 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
300 $echo_cmd perl -I $toolpath $countDiff -d tumor.bam.cover -g germline.bam.cover to soft_clip.dist.txt
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
301 perl -I $toolpath $countDiff -d tumor.bam.cover -g germline.bam.cover $gt soft_clip.dist.txt
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
302 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
303 )
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
304 ## Running the SV detection script.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
305 ## Determine the CREST options
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
306 #set $crest_args = ["-f tumor.bam.cover -d tumor.bam"]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
307 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
308 #if $germline_bam.__str__ != 'None':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
309 #set $crest_args = $crest_args + ["-g germline.bam"]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
310 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
311 #set $crest_args = $crest_args + ["--ref_genome",$ref_fa]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
312 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
313 #if $rnaseq.mode
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
314 #set $crest_args = $crest_args + ["--RNASeq","--genemodel",$rnaseq.gene_model.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
315 #if $rnaseq.cluster_size.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
316 #set $crest_args = $crest_args + ["--cluster_size",$rnaseq.cluster_size.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
317 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
318 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
319 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
320 #if $paired.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
321 #set $crest_args = $crest_args + [$paired.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
322 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
323 #if $sensitive.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
324 #set $crest_args = $crest_args + [$sensitive.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
325 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
326 #if $range.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
327 #set $crest_args = $crest_args + ["-r",$range.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
328 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
329 #if $read_len.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
330 #set $crest_args = $crest_args + ["-l",$read_len.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
331 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
332 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
333 #if $hit.mode.__str__ == 'yes':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
334 #if $hit.max_score_diff.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
335 #set $crest_args = $crest_args + ["--max_score_diff", $hit.max_score_diff.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
336 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
337 #if $hit.min_sclip_reads.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
338 #set $crest_args = $crest_args + ["--min_sclip_reads",$hit.min_sclip_reads.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
339 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
340 #if $hit.max_rep_cover.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
341 #set $crest_args = $crest_args + ["--max_rep_cover",$hit.max_rep_cover.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
342 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
343 #if $hit.min_sclip_len.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
344 #set $crest_args = $crest_args + ["--min_sclip_len",$hit.min_sclip_len.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
345 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
346 #if $hit.min_hit_len.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
347 #set $crest_args = $crest_args + ["--min_hit_len",$hit.min_hit_len.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
348 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
349 #if $hit.min_hit_reads.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
350 #set $crest_args = $crest_args + ["--min_hit_reads",$hit.min_hit_reads.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
351 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
352 #if $hit.min_dist_diff.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
353 #set $crest_args = $crest_args + ["--min_dist_diff",$hit.min_dist_diff.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
354 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
355 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
356 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
357 #if $softclip.mode.__str__ == 'yes':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
358 #if $softclip.min_percent_id.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
359 #set $crest_args = $crest_args + ["--min_percent_id",$softclip.min_percent_id.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
360 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
361 #if $softclip.min_percent_hq.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
362 #set $crest_args = $crest_args + ["--min_percent_hq",$softclip.min_percent_hq.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
363 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
364 #if $softclip.lowqual_cutoff.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
365 #set $crest_args = $crest_args + ["--lowqual_cutoff",$softclip.lowqual_cutoff.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
366 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
367 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
368 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
369 #if $sv_filter.mode.__str__ == 'yes':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
370 #if $sv_filter.min_percent_cons_of_read.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
371 #set $crest_args = $crest_args + ["--min_percent_cons_of_read",$sv_filter.min_percent_cons_of_read.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
372 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
373 #if $sv_filter.max_bp_dist.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
374 #set $crest_args = $crest_args + ["--max_bp_dist",$sv_filter.max_bp_dist.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
375 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
376 #if $sv_filter.germline_seq_width.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
377 #set $crest_args = $crest_args + ["--germline_seq_width",$sv_filter.germline_seq_width.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
378 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
379 #if $sv_filter.germline_search_width.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
380 #set $crest_args = $crest_args + ["--germline_search_width",$sv_filter.germline_search_width.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
381 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
382 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
383 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
384 #if $rescue.mode.__str__ == 'yes':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
385 #if $rescue.min_one_side_reads.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
386 #set $crest_args = $crest_args + ["--min_one_side_reads",$rescue.min_one_side_reads.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
387 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
388 #elif $rescue.mode.__str__ == 'no':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
389 #set $crest_args = $crest_args + ["--norescue"]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
390 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
391 ##
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
392 #if $tandem_repeat.mode.__str__ == 'yes':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
393 #if $tandem_repeat.tr_max_indel_size.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
394 #set $crest_args = $crest_args + ["--tr_max_indel_size",$tandem_repeat.tr_max_indel_size.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
395 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
396 #if $tandem_repeat.tr_min_size.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
397 #set $crest_args = $crest_args + ["--tr_min_size",$tandem_repeat.tr_min_size.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
398 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
399 #if $tandem_repeat.tr_max_size.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
400 #set $crest_args = $crest_args + ["--tr_max_size",$tandem_repeat.tr_max_size.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
401 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
402 #if $tandem_repeat.tr_min_num.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
403 #set $crest_args = $crest_args + ["--tr_min_num",$tandem_repeat.tr_min_num.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
404 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
405 #if $tandem_repeat.hetero_factor.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
406 #set $crest_args = $crest_args + ["--hetero_factor",$tandem_repeat.hetero_factor.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
407 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
408 #if $tandem_repeat.triger_p_value.__str__ != '':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
409 #set $crest_args = $crest_args + ["--triger_p_value",$tandem_repeat.triger_p_value.__str__]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
410 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
411 #elif $tandem_repeat.mode.__str__ == 'no':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
412 #set $crest_args = $crest_args + ["--norm_tandem_repeat"]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
413 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
414 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
415 ## check if gfServer is ready
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
416 echo "Waiting for gfServer"
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
417 for (( tries = 0; tries &lt; 30; tries += 1 ))
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
418 do
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
419 if ! netstat -an | grep $blatport > /dev/null &#38;&#38; ps -f | grep gfServer | grep $blatport > /dev/null; then sleep 60; else break; fi
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
420 done
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
421 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
422 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
423 ## Run CREST
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
424 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
425 (
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
426 ## perl -I ~/src/crest ../CREST.pl -f tumor.bam.cover -d tumor.bam -g germline.bam --ref_genome hg18.fa --2bitdir=/home/msi/jj/src/crest/example --target_genome=hg18.2bit --blatserver localhost --blatport 50000
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
427 $echo_cmd perl -I $toolpath $crest #echo ' '.join($crest_args)# --target_genome ${ds}target_genome --blatserver localhost --blatport ${ds}blatport
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
428 perl -I $toolpath $crest #echo ' '.join($crest_args)# --target_genome ${ds}target_genome --blatserver localhost --blatport ${ds}blatport
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
429 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
430 ## Visulization of the detailed alignment at breakpoint (optional)
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
431 ## The bam2html.pl script builds an html view of the multiple alignment for the breakpoint, so you can manually check the soft-clipping and other things.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
432 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
433 ## bam2html.pl -r hg18.fa -d tumor.bam -g germline.bam -o predSV.html -f predSV.txt
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
434 if [ -e tumor.bam.predSV.txt ]
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
435 then
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
436 #if $germline_bam.__str__ != 'None':
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
437 perl -I $toolpath $bam2html -d tumor.bam -g germline.bam -f tumor.bam.predSV.txt --ref_genome $ref_fa -o $predSV_html
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
438 #else
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
439 perl -I $toolpath $bam2html -d tumor.bam -f tumor.bam.predSV.txt --ref_genome $ref_fa -o $predSV_html
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
440 #end if
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
441 fi
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
442 )
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
443 #raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
444 ## shut down the blat server
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
445 echo "shutting down gfServer on port " $blatport
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
446 gfServer stop localhost $blatport
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
447 #end raw
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
448 </configfile>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
449 </configfiles>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
450 <tests>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
451 </tests>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
452 <help>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
453 **CREST**
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
454
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
455 CREST_ is an algorithm for detecting genomic structural variations at base-pair resolution using next-generation sequencing data. '
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
456
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
457 CREST uses pieces of DNA called soft clips to find structural variations. Soft clips are the DNA segments produced during sequencing that fail to properly align to the reference genome as the sample genome is reassembled. CREST uses the soft clips to precisely identify sites of chromosomal rearrangement or where pieces of DNA are inserted or deleted.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
458
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
459 Please cite the following article:
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
460
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
461 Wang J, Mullighan CG, Easton J, Roberts S, Heatley SL, Ma J, Rusch MC, Chen K, Harris CC, Ding L, Holmfeldt L, Payne-Turner D, Fan X, Wei L, Zhao D, Obenauer JC, Naeve C, Mardis ER, Wilson RK, Downing JR and Zhang J. CREST maps somatic structural variation in cancer genomes with base-pair resolution (2011). Nature_Methods_.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
462
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
463 .. _Nature_Methods: http://www.nature.com/nmeth/journal/v8/n8/pdf/nmeth.1628.pdf
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
464 .. _CREST: http://www.stjuderesearch.org/site/lab/zhang
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
465
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
466
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
467 ----
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
468
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
469 **Input formats**
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
470
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
471 BAM files that must contain soft-clipping signatures at the breakpoints. If
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
472 they do not, you will not get any results.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
473
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
474 CREST uses soft-clipping signatures to identify breakpoints. Soft-clipping is
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
475 indicated by "S" elements in the CIGAR for SAM/BAM records. Soft-clipping may
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
476 not occur, depending on the mapping algorithm and parameters and sometimes even
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
477 the library preparation.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
478
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
479 With bwa sampe:
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
480
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
481 One mapping method that will soft-clip reads is bwa sampe (BWA for paired-end
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
482 reads). When BWA successfully maps one read in a pair but is not able to map
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
483 the other, it will attempt a more permissive Smith-Waterman alignment of the
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
484 unmapped read in the neighborhood of the mapped mate. If it is only able to
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
485 align part of the read, then it will soft-clip the portion on the end that it
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
486 could not align. Often this occurs at the breakpoints of structural
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
487 variations.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
488
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
489 In some cases when the insert sizes approach the read length, BWA will not
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
490 perform Smith-Waterman alignment. Reads from inserts smaller than the read
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
491 length will contain primer and/or adapter and will often not map. When the
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
492 insert size is close to the read length, this creates a skewed distribution
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
493 of inferred insert sizes which may cause BWA to not attempt Smith-Waterman
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
494 realignment. This is indicated by the error message "weird pairing". Often
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
495 in these cases there are also unusually low mapping rates.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
496
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
497 One way to fix this problem is to remap unmapped reads bwasw. To do this,
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
498 extract the unmapped reads as FASTQ files (this may be done with a combination
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
499 of samtools view -f 4 and Picard's SamToFastq). Realign using bwa bwasw and
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
500 build a BAM file. Then, re-run CREST on this new BAM file, and you may pick
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
501 up events that would have been missed otherwise.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
502
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
503
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
504
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
505
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
506 ------
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
507
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
508 **Outputs**
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
509
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
510 The output
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
511 file *.predSV.txt has the following tab-delimited columns: left_chr, left_pos,
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
512 left_strand, # of left soft-clipped reads, right_chr, right_pos, right_strand,
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
513 # right soft-clipped reads, SV type, coverage at left_pos, coverage at
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
514 right_pos, assembled length at left_pos, assembled length at right_pos,
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
515 average percent identity at left_pos, percent of non-unique mapping reads at
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
516 left_pos, average percent identity at right_pos, percent of non-unique mapping
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
517 reads at right_pos, start position of consensus mapping to genome,
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
518 starting chromosome of consensus mapping, position of the genomic mapping of
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
519 consensus starting position, end position of consensus mapping to genome,
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
520 ending chromsome of consnesus mapping, position of genomic mapping of
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
521 consensus ending posiiton, and consensus sequences. For inversion(INV), the
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
522 last 7 fields will be repeated to reflect the fact two different breakpoints
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
523 are needed to identify an INV event.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
524
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
525 Example of the tumor.predSV.txt file:
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
526
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
527 4 125893227 + 5 10 66301858 - 4 CTX 29 14 83 71 0.895173453996983 0.230769230769231 0.735384615384615 0.5 1 4 125893135 176 10 66301773 TTATGAATTTTGAAATATATATCATATTTTGAAATATATATCATATTCTAAATTATGAAAAGAGAATATGATTCTCTTTTCAGTAGCTGTCACCTCCTGGGTTCAAGTGATTCTCCTGCCTCTACCTCCCGAGTAGCTGGGATTACAGGTGCCCACCACCATGCCTGGCTAATTTT
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
528 5 7052198 - 0 10 66301865 + 8 CTX 0 22 0 81 0.761379310344828 0.482758620689655 0 0 1 5 7052278 164 10 66301947 AGCCATGGACCTTGTGGTGGGTTCTTAACAATGGTGAGTCCGGAGTTCTTAACGATGGTGAGTCCGTAGTTTGTTCCTTCAGGAGTGAGCCAAGATCATGCCACTGCACTCTAGCCTGGGCAACAGAGGAAGACTCCACCTCAAAAAAAAAAAGTGGGAAGAGG
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
529 10 66301858 + 4 4 125893225 - 1 CTX 15 28 71 81 0.735384615384615 0.5 0.889507154213037 0.243243243243243 1 10 66301777 153 4 125893154 TTAGCCAGGCATGGTGGTGGGCACCTGTAATCCCAGCTACTCGGGAGGTAGAGGCAGGAGAATCACTTGAACCCAGGAGGTGACAGCTACTGAAAAGAGAATCATATTCTCTTTTCATAATTTAGAATATGATATATATTTCAAAATATGATA
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
530
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
531 If there are no or very few results, there may be a lack of soft-clipping.
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
532
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
533
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
534
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
535 </help>
acc8d8bfeb9a Uploaded
jjohnson
parents:
diff changeset
536 </tool>