comparison metawrapmg_binning.xml @ 2:2a8bc1d26d06 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/metawrapmg commit 26fe7d23c5c3981c9b737109e5db799cc5d23932
author iuc
date Thu, 11 Apr 2024 21:56:14 +0000
parents 024ea3c4c29f
children
comparison
equal deleted inserted replaced
1:e3a64a1d2a6e 2:2a8bc1d26d06
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="xrefs"/> 6 <expand macro="xrefs"/>
7 <expand macro="requirements"/> 7 <expand macro="requirements"/>
8 <command detect_errors="exit_code"><![CDATA[ 8 <command detect_errors="exit_code"><![CDATA[
9 ## set memory usage 9 ## set memory usage
10 if [ -n "\$GALAXY_MEMORY_MB" ] ; then 10 if [ -n "\${GALAXY_MEMORY_MB}" ] ; then
11 GALAXY_MEMORY_GB=\$((GALAXY_MEMORY_MB / 1024)) ; 11 export GALAXY_MEMORY_GB="\$((GALAXY_MEMORY_MB / 1024))" ;
12 fi ; 12 fi ;
13 13
14 ################## 14 ##################
15 ## SET UP FILES ## 15 ## SET UP FILES ##
16 ################## 16 ##################
17 17
18 ## should always be FASTA 18 ## only plain FASTA and FASTQ
19 #set mg_fn = 'metagenome.' + str($metagenome.ext) 19 ln -s '$metagenome' metagenome.fasta
20 ln -s '$metagenome' $mg_fn 20 &&
21 && 21 ## Metawrap checks for files named _1.fastq and _2.fastq.
22 ln -s '$input_1' reads_1.fastq
23 &&
24 ln -s '$input_2' reads_2.fastq
25 &&
22 26
23 ## Only FASTQ. Separate files for each sample. Metawrap checks for 27 #####################
24 ## files named _1.fastq and _2.fastq. 28 ## INITIAL BINNING ##
25 #set input1_fn = 'reads_1.fastq' 29 #####################
26 ln -s '$input_1' $input1_fn
27 &&
28 30
29 #set input2_fn = 'reads_2.fastq' 31 metawrap binning
30 ln -s '$input_2' $input2_fn 32 --metabat2 --maxbin2 --concoct
31 && 33 -a metagenome.fasta
34 -m "\${GALAXY_MEMORY_GB:-16}"
35 -o INITIAL_BINNING
36 -t "\${GALAXY_SLOTS:-4}"
37 reads_1.fastq
38 reads_2.fastq
39 &&
32 40
33 ##################### 41 ## Check which binning programs produced bins
34 ## INITIAL BINNING ## 42 bin_dirs=(INITIAL_BINNING/concoct_bins INITIAL_BINNING/maxbin2_bins INITIAL_BINNING/metabat2_bins) &&
35 ##################### 43 switches=('-A' '-B' '-C') &&
36 44
37 metawrap binning 45 i=0 &&
38 --metabat2 --maxbin2 --concoct 46 bin_string="" &&
39 -a '$mg_fn'
40 -m \${GALAXY_MEMORY_GB:-16}
41 -o INITIAL_BINNING
42 -t \${GALAXY_SLOTS:-4}
43 '$input1_fn'
44 '$input2_fn'
45 &&
46 47
47 ## Check which binning programs produced bins 48 for dir in "\${bin_dirs[@]}" ; do
48 bin_dirs=(INITIAL_BINNING/concoct_bins INITIAL_BINNING/maxbin2_bins INITIAL_BINNING/metabat2_bins) && 49 if [ "\$(find "\$dir" -mindepth 1 -maxdepth 1 -exec echo found \;)" ]; then
49 switches=('-A' '-B' '-C') && 50 bin_string+=" \${switches[\$i]} \$dir" ;
51 ((i++)) ;
52 fi
53 done &&
50 54
51 i=0 && 55 ####################
52 bin_string="" && 56 ## BIN REFINEMENT ##
57 ####################
53 58
54 for dir in "\${bin_dirs[@]}" ; do 59 ## The checkm database is in the conda package, see
55 if find "\${dir}" -mindepth 1 -maxdepth 1 | read; then 60 ## https://github.com/bioconda/bioconda-recipes/pull/38299.
56 bin_string="\${bin_string} \${switches[\$i]} \${dir}" ;
57 i+=1 ;
58 fi
59 done &&
60 61
61 #################### 62 metawrap bin_refinement
62 ## BIN REFINEMENT ## 63 -t "\${GALAXY_SLOTS:-4}"
63 #################### 64 -m "\${GALAXY_MEMORY_GB:-16}"
64 65 '$hidden_quick'
65 ## The checkm database is included in the conda package. 66 -c '${binning.c}'
66 ## Requires metawrap-mg_1.3.0--hdfd78af_1 or later. See 67 -x '${binning.x}'
67 ## https://github.com/bioconda/bioconda-recipes/pull/38299. 68 -o BIN_REFINEMENT
68 69 ## Only run bin_refinement on bins with contigs
69 metawrap bin_refinement 70 "\${bin_string}"
70 -t \${GALAXY_SLOTS:-4}
71 -m \${GALAXY_MEMORY_GB:-16}
72 -c $binning.c
73 -x $binning.x
74 -o BIN_REFINEMENT
75 ## Only run bin_refinement on bins with contigs
76 \${bin_string}
77 ]]></command> 71 ]]></command>
78 <inputs> 72 <inputs>
79 <param name="metagenome" format="fasta" type="data" label="Metagenome" help="Metagenome co-assembly for binning" /> 73 <param name="metagenome" format="fasta" type="data" label="Metagenome" help="Metagenome co-assembly for binning"/>
80 <param name="input_1" format="fastqsanger" type="data" label="Read 1" help="Original reads that were used for the assembly: read 1." /> 74 <param name="input_1" format="fastqsanger" type="data" label="Read 1" help="Original reads that were used for the assembly: read 1."/>
81 <param name="input_2" format="fastqsanger" type="data" label="Read 2" help="Original reads that were used for the assembly: read 2." /> 75 <param name="input_2" format="fastqsanger" type="data" label="Read 2" help="Original reads that were used for the assembly: read 2."/>
82 <section name="binning" title="Binning parameters" expanded="false"> 76 <section name="binning" title="Binning parameters" expanded="false">
83 <param argument='-c' type="integer" value="70" min="50" max="100" label="Percent completion" help="Minimum % completion of bins" /> 77 <param argument="-c" type="integer" value="70" min="50" max="100" label="Percent completion" help="Minimum % completion of bins"/>
84 <param argument='-x' type="integer" value="10" min="0" max="100" label="Percent contamination" help="Maximum % contamination of bins that is acceptable" /> 78 <param argument="-x" type="integer" value="10" min="0" max="100" label="Percent contamination" help="Maximum % contamination of bins that is acceptable"/>
85 </section> 79 </section>
80 <!-- the pplacer component requires 40 GB per thread. Skip pplacer for
81 testing by setting this to "quick" -->
82 <param name="hidden_quick" type="hidden" value=""/>
86 </inputs> 83 </inputs>
87 <outputs> 84 <outputs>
88 <!-- contigs binned into fasta files --> 85 <!-- contigs binned into fasta files -->
89 <collection name="metawrap_bins" type="list" label="MetaWRAP on ${on_string}: bins"> 86 <collection name="metawrap_bins" type="list" label="MetaWRAP on ${on_string}: bins">
90 <discover_datasets pattern="metawrap_\d+_\d+_bins/(?P&lt;designation&gt;.+)\.fa" format="fasta" directory="BIN_REFINEMENT" recurse="true" match_relative_path="true" visible="false" /> 87 <discover_datasets pattern="metawrap_\d+_\d+_bins/(?P&lt;designation&gt;.+)\.fa" format="fasta" directory="BIN_REFINEMENT" recurse="true" match_relative_path="true"/>
91 </collection> 88 </collection>
92 <!-- summary figures --> 89 <!-- summary figures -->
93 <collection name="metawrap_figures" type="list" label="MetaWRAP on ${on_string}: summary figures"> 90 <collection name="metawrap_figures" type="list" label="MetaWRAP on ${on_string}: summary figures">
94 <discover_datasets pattern="__designation_and_ext__" directory="BIN_REFINEMENT/figures" visible="false" /> 91 <discover_datasets pattern="__designation_and_ext__" directory="BIN_REFINEMENT/figures"/>
95 </collection> 92 </collection>
96 <!-- statistics on binning --> 93 <!-- statistics on binning -->
97 <collection name="metawrap_stats" type="list" label="MetaWRAP on ${on_string}: stat files"> 94 <collection name="metawrap_stats" type="list" label="MetaWRAP on ${on_string}: stat files">
98 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.stats" format="tabular" directory="BIN_REFINEMENT" visible="false" /> 95 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.stats" format="tabular" directory="BIN_REFINEMENT"/>
99 </collection> 96 </collection>
100 <!-- which contig went into which bin --> 97 <!-- which contig went into which bin -->
101 <collection name="metawrap_contigs" type="list" label="MetaWRAP on ${on_string}: contig assignments"> 98 <collection name="metawrap_contigs" type="list" label="MetaWRAP on ${on_string}: contig assignments">
102 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.contigs" format="tabular" directory="BIN_REFINEMENT" visible="false" /> 99 <discover_datasets pattern="(?P&lt;designation&gt;.+)\.contigs" format="tabular" directory="BIN_REFINEMENT"/>
103 </collection> 100 </collection>
104 </outputs> 101 </outputs>
105 <tests> 102 <tests>
106 <!-- 01: basic function --> 103 <!-- 01: basic function -->
107 <test> 104 <test>
108 <param name="metagenome" value="subset.fasta.gz"/> 105 <param name="metagenome" value="subset.fasta.gz"/>
109 <param name="input_1" value="mapped_reads.r1.fastq.gz"/> 106 <param name="input_1" value="mapped_reads.r1.fastq.gz"/>
110 <param name="input_2" value="mapped_reads.r2.fastq.gz"/> 107 <param name="input_2" value="mapped_reads.r2.fastq.gz"/>
111 <param name="c" value="60"/> 108 <param name="c" value="60"/>
112 <param name="x" value="15"/> 109 <param name="x" value="15"/>
113 <!-- this is the main output, but it's too large to test --> 110 <param name="hidden_quick" value="--quick"/>
114 <!-- <output_collection name="metawrap_bins" type="list"> 111 <output_collection name="metawrap_bins" type="list">
115 <element name="bin.1" file="test02.fa" ftype="fasta"/> 112 <element name="bin.1" ftype="fasta">
116 </output_collection> --> 113 <assert_contents>
114 <has_text text="NODE_2_length_"/>
115 </assert_contents>
116 </element>
117 </output_collection>
117 <output_collection name="metawrap_stats" type="list"> 118 <output_collection name="metawrap_stats" type="list">
118 <element name="metawrap_60_15_bins" file="test02.stats" ftype="tabular"/> 119 <element name="metawrap_60_15_bins" file="test02.stats" ftype="tabular"/>
119 </output_collection> 120 </output_collection>
120 <output_collection name="metawrap_contigs" type="list"> 121 <output_collection name="metawrap_contigs" type="list">
121 <element name="metawrap_60_15_bins" file="test02.contigs" ftype="tabular"/> 122 <element name="metawrap_60_15_bins" file="test02.contigs" ftype="tabular"/>
122 </output_collection> 123 </output_collection>
123 </test> 124 </test>
124 </tests> 125 </tests>
125 <help><![CDATA[ 126 <help><![CDATA[
126 MetaWRAP 127 MetaWRAP
127 -------- 128 --------
128 129
129 MetaWRAP aims to be an easy-to-use metagenomic wrapper suite that 130 MetaWRAP aims to be an easy-to-use metagenomic wrapper suite that
130 accomplishes the core tasks of metagenomic analysis. Additionally, 131 accomplishes the core tasks of metagenomic analysis. Additionally,