Mercurial > repos > peterjc > clc_assembly_cell
annotate tools/clc_assembly_cell/clc_mapper.xml @ 5:31a9169b6222 draft default tip
"Update all the pico_galaxy tools on main Tool Shed"
author | peterjc |
---|---|
date | Fri, 16 Apr 2021 22:32:53 +0000 |
parents | 46a667b5e19e |
children |
rev | line source |
---|---|
5 | 1 <tool id="clc_mapper" name="CLC Mapper" version="0.0.7"> |
0 | 2 <description>Maps reads giving a SAM/BAM file</description> |
3 <requirements> | |
4 <requirement type="package" version="0.1.19">samtools</requirement> | |
5 </requirements> | |
5 | 6 <version_command> |
7 ${CLC_ASSEMBLY_CELL:-/mnt/apps/clcBio/clc-assembly-cell-4.1.0-linux_64/}clc_mapper | grep -i version | |
8 </version_command> | |
9 <command detect_errors="aggressive"> | |
10 echo Mapping reads with clc_mapper... | |
0 | 11 && \${CLC_ASSEMBLY_CELL:-/mnt/apps/clcBio/clc-assembly-cell-4.1.0-linux_64/}clc_mapper |
12 #for $ref in $references | |
13 #if str($ref.ref_type)=="circular" | |
5 | 14 -d -z '$ref.ref_file' |
0 | 15 #else |
5 | 16 -d '$ref.ref_file' |
0 | 17 #end if |
18 #end for | |
19 #for $rg in $read_group | |
20 ##-------------------------------------- | |
21 #if str($rg.segments.type) == "paired" | |
5 | 22 -p $rg.segments.placement $rg.segments.dist_mode $rg.segments.min_size $rg.segments.max_size -q -i '$rg.segments.filename1' '$rg.segments.filename2' |
0 | 23 #end if |
24 ##-------------------------------------- | |
25 #if str($rg.segments.type) == "interleaved" | |
5 | 26 -p $rg.segments.placement $rg.segments.dist_mode $rg.segments.min_size $rg.segments.max_size -q '$rg.segments.filename' |
0 | 27 #end if |
28 ##-------------------------------------- | |
29 #if str($rg.segments.type) == "none" | |
30 -p no -q | |
31 #for $f in $rg.segments.filenames | |
5 | 32 '$f' |
0 | 33 #end for |
34 #end if | |
35 ##-------------------------------------- | |
36 #end for | |
37 -o "temp_job.cas" | |
5 | 38 --cpus "\${GALAXY_SLOTS:-4}" |
0 | 39 ## TODO - filtering out the progress lines seems to mess up the multiple commands |
40 ## | grep -v "^Progress: " | |
41 ##=========================================== | |
42 ## TODO - I've required all the input in Sanger FASTQ format (or FASTA) so can | |
43 ## use the offset 33, rather then the CLCbio default of 64 which is only for | |
44 ## obsolete Illumina FASTQ files. Really need this option per input file... | |
45 && echo Converting CAS file to BAM with clc_cas_to_sam... | |
5 | 46 && \${CLC_ASSEMBLY_CELL:-/mnt/apps/clcBio/clc-assembly-cell-4.1.0-linux_64/}clc_cas_to_sam --cas 'temp_job.cas' -o 'temp_job.bam' --no-progress --qualityoffset 33 |
3
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
47 #if $discard_unmapped: |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
48 ## -u / --discardunmapped: Discard the unmapped reads |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
49 -u |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
50 #end if |
5 | 51 && rm 'temp_job.cas' |
0 | 52 ##=========================================== |
53 && echo Sorting BAM file with samtools... | |
54 && samtools sort "temp_job.bam" "temp_sorted" | |
55 && mv "temp_sorted.bam" "$out_bam" | |
56 && echo Indexing BAM file with samtools... | |
57 && samtools index "$out_bam"</command> | |
58 <!-- Job splitting with merge via clc_join_mappings? --> | |
59 <inputs> | |
60 <!-- Support linear and circular references (-z) --> | |
61 <repeat name="references" title="Reference Sequence" min="1"> | |
4
46a667b5e19e
v0.0.6 update optional/required parameters and URLS in docs
peterjc
parents:
3
diff
changeset
|
62 <param name="ref_file" type="data" format="fasta" label="Reference sequence(s) (FASTA)" /> |
0 | 63 <param name="ref_type" type="select" label="Reference type"> |
64 <option value="linear">Linear (e.g. most chromosomes)</option> | |
65 <option value="circular">Circular (e.g. bacterial chromosomes, mitochondria)</option> | |
66 </param> | |
67 </repeat> | |
68 <repeat name="read_group" title="Read Group" min="1"> | |
69 <conditional name="segments"> | |
70 <param name="type" type="select" label="Are these paired reads?"> | |
71 <option value="paired">Paired reads (as two files)</option> | |
72 <option value="interleaved">Paired reads (as one interleaved file)</option> | |
73 <option value="none">Unpaired reads (single or orphan reads)</option> | |
74 </param> | |
75 <when value="paired"> | |
76 <param name="placement" type="select" label="Pairing type (segment placing)"> | |
77 <option value="fb">---> <--- (e.g. Sanger capillary or Solexa/Illumina paired-end library)</option> | |
78 <option value="bf"><--- ---> (e.g. Solexa/Illumina mate-pair library)</option> | |
79 <option value="ff">---> ---></option> | |
80 <option value="bb"><--- <---</option> | |
81 </param> | |
82 <param name="dist_mode" type="select" label="How is the fragment distance measured?"> | |
83 <option value="ss">Start to start (e.g. Sanger capillary or Solexa/Illumina libraries)</option> | |
84 <option value="se">Start to end</option> | |
85 <option value="es">End to start</option> | |
86 <option value="ee">End to end</option> | |
87 </param> | |
88 <!-- TODO - min/max validation done via the <code> tag? --> | |
89 <param name="min_size" type="integer" optional="false" min="0" value="" | |
90 label="Minimum size of 'good' DNA templates in the library preparation" /> | |
91 <param name="max_size" type="integer" optional="false" min="0" value="" | |
92 label="Maximum size of 'good' DNA templates in the library preparation" /> | |
4
46a667b5e19e
v0.0.6 update optional/required parameters and URLS in docs
peterjc
parents:
3
diff
changeset
|
93 <param name="filename1" type="data" format="fastqsanger,fasta" label="Read file one" |
0 | 94 help="FASTA or Sanger FASTQ accepted." /> |
4
46a667b5e19e
v0.0.6 update optional/required parameters and URLS in docs
peterjc
parents:
3
diff
changeset
|
95 <param name="filename2" type="data" format="fastqsanger,fasta" label="Read file two" |
0 | 96 help="FASTA or Sanger FASTQ accepted." /> |
97 </when> | |
98 <when value="interleaved"> | |
99 <param name="placement" type="select" label="Pairing type (segment placing)"> | |
100 <option value="fb">---> <--- (e.g. Sanger capillary or Solexa/Illumina paired-end library)</option> | |
101 <option value="bf"><--- ---> (e.g. Solexa/Illumina mate-pair library)</option> | |
102 <option value="ff">---> ---></option> | |
103 <option value="bb"><-- <--</option> | |
104 </param> | |
105 <param name="dist_mode" type="select" label="How is the fragment distance measured?"> | |
106 <option value="ss">Start to start (e.g. Sanger capillary or Solexa/Illumina libraries)</option> | |
107 <option value="se">Start to end</option> | |
108 <option value="es">End to start</option> | |
109 <option value="ee">End to end</option> | |
110 </param> | |
111 <!-- TODO - min/max validation done via the <code> tag? --> | |
112 <param name="min_size" type="integer" optional="false" min="0" value="" | |
113 label="Minimum size of 'good' DNA templates in the library preparation" /> | |
114 <param name="max_size" type="integer" optional="false" min="0" value="" | |
115 label="Maximum size of 'good' DNA templates in the library preparation" /> | |
4
46a667b5e19e
v0.0.6 update optional/required parameters and URLS in docs
peterjc
parents:
3
diff
changeset
|
116 <param name="filename" type="data" format="fastqsanger,fasta" label="Interleaved read file" |
0 | 117 help="FASTA or Sanger FASTQ accepted."/> |
118 </when> | |
119 <when value="none"> | |
4
46a667b5e19e
v0.0.6 update optional/required parameters and URLS in docs
peterjc
parents:
3
diff
changeset
|
120 <param name="filenames" type="data" format="fastqsanger,fasta" multiple="true" optional="false" label="Read file(s)" |
0 | 121 help="Multiple files allowed, for example several files of orphan reads. FASTA or Sanger FASTQ accepted." /> |
122 </when> | |
123 </conditional> | |
124 </repeat> | |
125 <!-- Length fraction (-l), default 0.5 --> | |
126 <!-- Similarity (-s), default 0.8 --> | |
3
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
127 <param name="discard_unmapped" type="boolean" label="Discard unmappped reads" /> |
0 | 128 </inputs> |
129 <outputs> | |
130 <data name="out_bam" format="bam" label="CLCbio mapping (BAM)" /> | |
131 </outputs> | |
132 <tests> | |
133 <!-- CLC's SAM header @PG and @RG lines include filenames so will change --> | |
134 <test> | |
135 <param name="ref_file" value="NC_010642.fna" ftype="fasta" /> | |
136 <param name="ref_type" value="circular" /> | |
137 <param name="read_group_0|segments|type" value="interleaved" /> | |
138 <param name="read_group_0|segments|placement" value="fb" /> | |
139 <param name="read_group_0|segments|dist_mode" value="ss" /> | |
140 <param name="read_group_0|segments|min_size" value="1" /> | |
141 <param name="read_group_0|segments|max_size" value="1000" /> | |
142 <param name="read_group_0|segments|dist_mode" value="ss" /> | |
143 <param name="read_group_0|segments|filename" value="SRR639755_mito_pairs.fastq.gz" ftype="fastqsanger" /> | |
3
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
144 <param name="discard_unmapped" value="false" /> |
5 | 145 <output name="out_bam" file="SRR639755_mito_pairs_vs_NC_010642_clc.bam" ftype="bam" lines_diff="4"/> |
0 | 146 </test> |
3
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
147 <test> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
148 <param name="ref_file" value="NC_010642.fna" ftype="fasta" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
149 <param name="ref_type" value="circular" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
150 <param name="read_group_0|segments|type" value="interleaved" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
151 <param name="read_group_0|segments|placement" value="fb" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
152 <param name="read_group_0|segments|dist_mode" value="ss" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
153 <param name="read_group_0|segments|min_size" value="1" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
154 <param name="read_group_0|segments|max_size" value="1000" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
155 <param name="read_group_0|segments|dist_mode" value="ss" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
156 <param name="read_group_0|segments|filename" value="SRR639755_mito_pairs.fastq.gz" ftype="fastqsanger" /> |
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
157 <param name="discard_unmapped" value="true" /> |
5 | 158 <output name="out_bam" file="SRR639755_mito_pairs_vs_NC_010642_clc_u.bam" ftype="bam" lines_diff="4"/> |
3
9fe1a922353b
v0.0.5 option to discard unmapped read; env var bugfix
peterjc
parents:
2
diff
changeset
|
159 </test> |
0 | 160 </tests> |
161 <help> | |
162 | |
163 **What it does** | |
164 | |
165 Runs the CLCbio tool ``clc_mapper`` which produces a proprietary binary | |
166 CAS format file, which is immediately processed using ``clc_cas_to_sam`` | |
167 to generate a self-contained standard BAM file, which is then sorted | |
168 and indexed using ``samtools``. | |
169 | |
170 | |
171 **Citation** | |
172 | |
173 If you use this Galaxy tool in work leading to a scientific publication please | |
174 cite this wrapper as: | |
175 | |
176 Peter J.A. Cock (2013), Galaxy wrapper for the CLC Assembly Cell suite from CLCbio | |
177 http://toolshed.g2.bx.psu.edu/view/peterjc/clc_assembly_cell | |
178 | |
1 | 179 CLC Assembly Cell, CLC bio (2008--2015) |
4
46a667b5e19e
v0.0.6 update optional/required parameters and URLS in docs
peterjc
parents:
3
diff
changeset
|
180 https://www.qiagenbioinformatics.com/products/clc-assembly-cell/ |
1 | 181 |
0 | 182 This wrapper is available to install into other Galaxy Instances via the Galaxy |
183 Tool Shed at http://toolshed.g2.bx.psu.edu/view/peterjc/clc_assembly_cell | |
184 </help> | |
1 | 185 <citations> |
186 <citation type="bibtex"> | |
187 @MISC{clcbio, | |
5 | 188 AUTHOR = {CLC Bio} |
1 | 189 title = {{CLC Assembly Cell}}, |
4
46a667b5e19e
v0.0.6 update optional/required parameters and URLS in docs
peterjc
parents:
3
diff
changeset
|
190 url = {https://www.qiagenbioinformatics.com/products/clc-assembly-cell/}, |
1 | 191 year = {2008--2015} |
192 } | |
193 </citation> | |
194 </citations> | |
0 | 195 </tool> |