comparison comebin_bam.xml @ 0:58e81911db44 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/comebin_bam/ commit ac8533700fff90dbc9cfc2af66c2a721e4b52f2c
author iuc
date Fri, 07 Nov 2025 16:14:07 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:58e81911db44
1 <tool id="comebin_bam" name="Generate BAM file for COMEBin" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>COMEBin utility script to generate BAM files using modified MetaWRAP</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <command detect_errors="exit_code">
8 <![CDATA[
9
10 mkdir 'outputs' &&
11
12 #if $assembly.ext.endswith('.gz'):
13 ln -s '$assembly' 'assembly.fasta.gz' &&
14 gunzip 'assembly.fasta.gz' &&
15 #else:
16 ln -s '$assembly' 'assembly.fasta' &&
17 #end if
18
19 #if $read_typ.is_select == "normal":
20 #if $input_typ.is_select == "paired":
21 #if $paired_reads.forward.ext.endswith('.gz'):
22 ln -s '$paired_reads.forward' 'read_1.fastq.gz' &&
23 ln -s '$paired_reads.reverse' 'read_2.fastq.gz' &&
24 gunzip 'read_1.fastq.gz' &&
25 gunzip 'read_2.fastq.gz' &&
26 #else:
27 ln -s '$paired_reads.forward' 'read_1.fastq' &&
28 ln -s '$paired_reads.reverse' 'read_2.fastq' &&
29 #end if
30 #else:
31 #if $forward.ext.endswith('.gz'):
32 ln -s '$forward' 'read_1.fastq.gz' &&
33 ln -s '$reverse' 'read_2.fastq.gz' &&
34 gunzip 'read_1.fastq.gz' &&
35 gunzip 'read_2.fastq.gz' &&
36 #else:
37 ln -s '$forward' 'read_1.fastq' &&
38 ln -s '$reverse' 'read_2.fastq' &&
39 #end if
40 #end if
41 #else:
42 #if $single_reads.ext.endswith('.gz'):
43 ln -s '$single_reads' 'read.fastq.gz' &&
44 gunzip 'read.fastq.gz' &&
45 #else:
46 ln -s '$single_reads' 'read.fastq' &&
47 #end if
48 #end if
49
50 gen_cov_file.sh
51 -a 'assembly.fasta'
52 -o 'outputs'
53 -t \${GALAXY_SLOTS:-1}
54 -l ${length}
55 #if $read_typ.is_select == "normal":
56 'read_1.fastq'
57 'read_2.fastq'
58 #else:
59 --single-end 'read.fastq'
60 #end if
61 && mv 'outputs/work_files/read.bam' '$bam_file'
62
63 ]]>
64 </command>
65 <inputs>
66 <param name="assembly" type="data" format="fasta,fasta.gz" label="Input assembly file"/>
67 <conditional name="read_typ">
68 <param name="is_select" type="select" label="Type of reads">
69 <option value="normal" selected="true">Paired-end non-interleaved</option>
70 <option value="single">Single-end</option>
71 </param>
72 <when value="normal">
73 <conditional name="input_typ">
74 <param name="is_select" type="select" label="Input type">
75 <option value="paired">Paired collection</option>
76 <option value="single">No collection</option>
77 </param>
78 <when value="paired">
79 <param name="paired_reads" type="data_collection" collection_type="paired" format="fastq,fastq.gz" label="Input paired reads collection"/>
80 </when>
81 <when value="single">
82 <param name="forward" type="data" format="fastq,fastq.gz" label="Input forward reads"/>
83 <param name="reverse" type="data" format="fastq,fastq.gz" label="Input reverse reads"/>
84 </when>
85 </conditional>
86 </when>
87 <when value="single">
88 <param name="single_reads" type="data" format="fastq,fastq.gz" label="Input single-end reads"/>
89 </when>
90 </conditional>
91 <param name="length" type="integer" value="1000" label="Set minimum contig length"/>
92 </inputs>
93 <outputs>
94 <data name="bam_file" format="bam" label="COMEBin bam file"/>
95 </outputs>
96 <tests>
97 <test expect_num_outputs="1">
98 <param name="assembly" value="bowtie2-ref.fasta" ftype="fasta"/>
99 <conditional name="read_typ">
100 <param name="is_select" value="normal"/>
101 <conditional name="input_typ">
102 <param name="is_select" value="paired"/>
103 <param name="paired_reads">
104 <collection type="paired">
105 <element name="forward" value="bowtie2-fq_1.fastq" ftype="fastq"/>
106 <element name="reverse" value="bowtie2-fq_2.fastq" ftype="fastq"/>
107 </collection>
108 </param>
109 </conditional>
110 </conditional>
111 <output name="bam_file">
112 <assert_contents>
113 <has_size size="17000" delta="1000"/>
114 </assert_contents>
115 </output>
116 </test>
117 <test expect_num_outputs="1">
118 <param name="assembly" value="bowtie2-ref.fasta" ftype="fasta"/>
119 <conditional name="read_typ">
120 <param name="is_select" value="normal"/>
121 <conditional name="input_typ">
122 <param name="is_select" value="single"/>
123 <param name="forward" value="bowtie2-fq_1.fastq" ftype="fastq"/>
124 <param name="reverse" value="bowtie2-fq_2.fastq" ftype="fastq"/>
125 </conditional>
126 </conditional>
127 <output name="bam_file">
128 <assert_contents>
129 <has_size size="17000" delta="1000"/>
130 </assert_contents>
131 </output>
132 </test>
133 <test expect_num_outputs="1">
134 <param name="assembly" value="bowtie2-ref.fasta" ftype="fasta"/>
135 <conditional name="read_typ">
136 <param name="is_select" value="normal"/>
137 <conditional name="input_typ">
138 <param name="is_select" value="single"/>
139 <param name="forward" value="bowtie2-fq_1.fastq.gz" ftype="fastq.gz"/>
140 <param name="reverse" value="bowtie2-fq_2.fastq.gz" ftype="fastq.gz"/>
141 </conditional>
142 </conditional>
143 <output name="bam_file">
144 <assert_contents>
145 <has_size size="17000" delta="1000"/>
146 </assert_contents>
147 </output>
148 </test>
149 </tests>
150 <help>
151 <![CDATA[
152
153 **Why using this tool instead of Bowtie2**
154
155 COMEBin used modified from the "binning.sh" of MetaWRAP which means a complete pipeline is running to generate BAM files fit for COMEBin to use.
156
157 Other BAM file tools might also work but it is recommended to use this utility script because some test showed that using Bowtie2 COMEBin always failed since certain IDs are not contain in COMEBins data.
158
159 This tool only serve one use case which is when using COMEBin as binner other binner can use and it is recommended to use Bowtie2 in this case. Only use this script when the binner is COMEBin!
160
161 **Input**
162
163 - Single-end reads or Paired-end (non-)interleaved reads
164
165 **Output**
166
167 - One BAM file build for use for COMEBin (no other binner can use this file so please run Bowtie2 for other binner!)
168 ]]>
169 </help>
170 <expand macro="citations"/>
171 </tool>