diff macros.xml @ 0:6941d0d453ba draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tools/coverm commit 5a4ee5e5f8eee3a08a1cd2dfd9edf15aacea0a94"
author iuc
date Tue, 26 Apr 2022 15:27:37 +0000
parents
children 688a777e1b19
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Apr 26 15:27:37 2022 +0000
@@ -0,0 +1,293 @@
+<macros>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package">coverm</requirement>
+        </requirements>
+    </xml>
+    <token name="@INPUT_FORMATS@">fasta,fastq,fastq.gz,fasta.gz</token>
+    <token name="@TOOL_VERSION@">0.2.1</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <xml name="citation">
+        <citations>
+            <citation type="bibtex">
+            @misc{githubCoverm,
+            author = {B J. Woodcroft},
+            year = {2021},
+            title = {CoverM},
+            publisher = {GitHub},
+            journal = {GitHub repository},
+            url = {https://github.com/wwood/CoverM}
+            }
+            </citation>
+        </citations>
+    </xml>
+    <xml name="genome_opt">
+        <conditional name="genome">
+            <param name="ref_or_genome" type="select" label="Select if you want to specify additional genome files.">
+                <option value="genomic">yes</option>
+                <option value="none" selected="true">No (Only when BAM files are provided)</option>
+            </param>
+            <when value="none">
+                <param argument="--single-genome" type="boolean" truevalue="--single-genome" falsevalue="" checked="false" label="All contigs are from the same genome."/>
+                <param type="text" name="separator" optional="true" label="Character, that separates genome names from contig names in the reference file." >
+                    <sanitizer>
+                        <valid initial="string.punctuation">
+                        </valid>
+                    </sanitizer>
+                </param>
+            </when>
+            <when value="genomic">
+                <conditional name="genomic">
+                    <param type="select" label="Reference genome source" name="source">
+                        <option value="history" selected="true">History</option>
+                        <option value="builtin">Built-in</option>
+                    </param>
+                    <when value="history">
+                        <param type="data" name="fasta_history" multiple="true" label="FASTA files of each genome" format="fasta" />
+                    </when>
+                    <when value="builtin">
+                        <param type="select" name="fasta_builtin" multiple="true" label="Reference genome(s)">
+                            <options from_data_table="all_fasta" />
+                        </param>
+                    </when>
+                </conditional>
+            </when>
+        </conditional>
+    </xml>
+    <xml name="genome">
+        <conditional name="genome">
+            <param name="ref_or_genome" type="select" label="Reference sequence mode" help="Select if you want to specify genome file(s) or a FASTA reference file or both. NOTE: If genomic FASTA files are specified, then reference is not needed as a reference FASTA file can be derived by concatenating input genomes. However, while not necessary, reference can be specified if an alternate reference sequence set is desired.">
+                <option value="genomic" selected="true">Reference genome</option>
+                <option value="reference">Contigs (e.g. concatenated genomes or metagenome assembly)</option>
+            </param>
+            <when value="genomic">
+                <conditional name="genomic">
+                    <param type="select" label="Reference genome source" name="source">
+                        <option value="history" selected="true">History</option>
+                        <option value="builtin">Built-in</option>
+                    </param>
+                    <when value="history">
+                        <param type="data" name="fasta_history" multiple="true" label="FASTA files of each genome" format="fasta" />
+                    </when>
+                    <when value="builtin">
+                        <param type="select" name="fasta_builtin" multiple="true" label="Reference genome(s)">
+                            <options from_data_table="all_fasta" />
+                        </param>
+                    </when>
+                </conditional>
+            </when>
+            <when value="reference">
+                <param type="data" name="ref_source" multiple="true" label="Contigs file(s)" format="fasta" help="If multiple references FASTA files are provided and 'sharded' is specified, then reads will be mapped to references separately as sharded BAMs."/>
+                <conditional name="cond_single_genome">
+                    <param name="single_genome" type="select" label="All contigs are from a single genome">
+                        <option value="--single-genome">True</option>
+                        <option value="false">False</option>
+                    </param>
+                    <when value="--single-genome">
+                        <param type="data" name="genome_definition" format="tsv" optional="true" label="File containing newline-separated list of genome_name and contig, separated by tab, to define the genome of each contig." />
+                    </when>
+                    <when value="false">
+                        <param type="text" argument="--separator" optional="true" label="Character, that separates genome names from contig names in the reference file." >
+                            <sanitizer>
+                                <valid initial="string.punctuation">
+                                </valid>
+                            </sanitizer>
+                        </param>
+                    </when>
+                </conditional>                    
+                <conditional name="add_genome">
+                    <param name="add_genome" type="boolean" label="Add additional Genome Files"/>
+                    <when value="true">
+                        <conditional name="add_genomic">
+                            <param type="select" label="Reference genome source" name="source">
+                                <option value="history" selected="true">History</option>
+                                <option value="builtin">Built-in</option>
+                            </param>
+                            <when value="history">
+                                <param type="data" name="fasta_history" multiple="true" label="Single FASTA file of contigs" format="fasta" />
+                            </when>
+                            <when value="builtin">
+                                <param type="select" name="fasta_builtin" multiple="true" label="Reference genome">
+                                    <options from_data_table="all_fasta" />
+                                </param>
+                            </when>
+                        </conditional>                           
+                    </when>
+                    <when value="false">
+                    </when>
+                </conditional>
+            </when>
+        </conditional>
+    </xml>
+    <xml name="reads_for_contig">
+        <conditional name="reads">
+            <param type="select" label="Read type" name="read_type">
+                <option value="paired">Paired end</option>
+                <option value="paired_collection" selected="true">Paired collection</option>
+                <option value="single">Single ended</option>
+                <option value="interleaved">Interleaved</option>
+                <option value="bam">BAM file(s)</option>
+            </param>
+            <when value="paired">
+                <param type="data" format="@INPUT_FORMATS@" name="read1" multiple="true" label="Read1" />
+                <param type="data" format="@INPUT_FORMATS@" name="read2" multiple="true" label="Read2" />
+                <param type="data" name="ref_fasta_history" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
+            </when>
+            <when value="paired_collection">
+                <param type="data_collection" collection_type="list:paired" format="@INPUT_FORMATS@" name="paired_reads" label="One or more pairs of forward and reverse possibly gzipped FASTA/Q files for mapping in order" />
+                <param type="data" name="ref_fasta_history" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
+            </when>
+            <when value="single">
+                <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Single Read" />
+                <param type="data" name="ref_fasta_history" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
+            </when>
+            <when value="interleaved">
+                <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Interleaved" />
+                <param type="data" name="ref_fasta_history" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
+            </when>
+            <when value="bam">
+                 <param type="data" format="bam" name="bam" multiple="true" label="BAM file(s)" help="BAM file(s). These must be reference sorted (e.g. with samtools sort) unless sharded is specified, in which case they must be read name sorted (e.g. with samtools sort -n). When specified, no read mapping algorithm is undertaken."/>
+                <param type="data" name="ref_fasta_history" optional="true" multiple="true" label="FASTA file(s) of contigs" format="fasta" />
+            </when>
+        </conditional>
+    </xml>     
+    <xml name="reads">
+        <conditional name="reads">
+            <param type="select" label="Read type" name="read_type">
+                <option value="single">Single ended</option>
+                <option value="paired">Paired end</option>
+                <option value="paired_collection" selected="true">Paired collection</option>
+                <option value="interleaved">Interleaved</option>
+                <option value="bam">BAM file(s)</option>
+            </param>
+            <when value="paired">
+                <param type="data" format="@INPUT_FORMATS@" name="read1" multiple="true" label="Read1" />
+                <param type="data" format="@INPUT_FORMATS@" name="read2" multiple="true" label="Read2" />
+                <expand macro="genome"/>
+            </when>
+            <when value="paired_collection">
+                <param type="data_collection" collection_type="list:paired" format="@INPUT_FORMATS@" name="paired_reads" label="Collection of paired-reads" help="One or more pairs of forward and reverse possibly gzipped FASTA/Q files for mapping in order." />
+                <expand macro="genome"/>
+            </when>
+            <when value="single">
+                <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Single Read" />
+                <expand macro="genome"/>
+            </when>
+            <when value="interleaved">
+                <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Interleaved" />
+                <expand macro="genome"/>
+            </when>
+            <when value="bam">
+                <param type="data" format="bam" name="bam" multiple="true" label="BAM file(s)" help="BAM file(s). These must be reference sorted (e.g. with samtools sort) unless sharded is specified, in which case they must be read name sorted (e.g. with samtools sort -n). When specified, no read mapping algorithm is undertaken."/>
+                <expand macro="genome_opt"/>
+            </when>
+        </conditional>
+    </xml>
+    <xml name="add_reads">
+        <section name="add_reads" title="Add an additional read">
+            <conditional name="extra_read">
+                <param type="select" label="Read type" optional="true" name="read_type">
+                    <option value="none" selected="true">None</option>
+                    <option value="paired">Paired end</option>
+                    <option value="paired_collection">Paired collection</option>
+                    <option value="single">Single ended</option>
+                    <option value="interleaved">Interleaved</option>
+                    <option value="bam">BAM file(s)</option>
+                </param>
+                <when value="none">
+                </when>
+                <when value="paired">
+                    <param type="data" format="@INPUT_FORMATS@" name="read1" multiple="true" label="Read1" />
+                    <param type="data" format="@INPUT_FORMATS@" name="read2" multiple="true" label="Read2" />
+                </when>
+                <when value="paired_collection">
+                    <param type="data_collection" collection_type="list:paired" format="@INPUT_FORMATS@" name="paired_reads" label="One or more pairs of forward and reverse possibly gzipped FASTA/Q files for mapping in order" />
+                </when>
+                <when value="single">
+                    <param type="data" format="@INPUT_FORMATS@" name="single" multiple="true" label="Single read" />
+                </when>
+                <when value="interleaved">
+                    <param type="data" format="@INPUT_FORMATS@" multiple="true" name="single" label="Interleaved" />
+                </when>
+                <when value="bam">
+                    <param type="data" format="bam" name="bam" multiple="true" label="BAM file(s)" />
+                </when>
+            </conditional>
+        </section>
+    </xml>
+    <xml name="mapping">
+        <section name="mapping" title="Mapping options" expanded="false">
+            <param argument="--mapper" optional="true" type="select" label="Mapper" help="Underlying mapping software used. Default: minimap2-sr" >
+                <option value="minimap2-sr">minimap2 with '-x sr' option</option>
+                <option value="minimap2-ont">minimap2 with '-x map-ont' option</option>
+                <option value="minimap2-pb">minimap2 with '-x map-pb' option</option>
+                <option value="minimap2-no-preset">minimap2 with no '-x' option</option>
+                <option value="bwa-mem">BWA-MEM using default parameters</option>
+            </param>
+            <param argument="--min_read-aligned-length" type="integer" min="0" value="0" 
+                label="Min read aligned length" help="Exclude reads with smaller numbers of aligned bases. Default: 0" />
+            <param argument="--min_read-percent-identity" type="float" min="0" max="100" value="0" 
+                label="Min read percent identity" help="Exclude reads by overall percent identity e.g. 95 for 95%. Default: 0" />
+            <param argument="--min_read-aligned-percent" type="float" min="0" max="100" value="0" 
+                label="Min read aligned percentage" help="Exclude reads by percent aligned bases e.g. 95 means 95% 
+                    of the read's bases must be aligned. Default: 0" />
+            <param argument="--min_read-aligned-length-pair" type="integer" min="0" value="0" 
+                label="Min read aligned length pair" help="Exclude pairs with smaller numbers of aligned bases. 
+                    Implies --proper-pairs-only. Default: 0" />
+            <param argument="--min_read-percent-identity-pair" type="float" min="0" max="100" value="0" 
+                label="Min read percent identity pair" help="Exclude pairs by overall percent identity e.g. 95 for 95%. 
+                    Implies --proper-pairs-only. Default: 0" />
+            <param argument="--min_read-aligned-percent-pair" type="float" min="0" max="100" value="0" 
+                label="Min read aligned percentage pair" help="Exclude reads by percent aligned bases e.g. 95 means 95% of 
+                    the read's bases must be aligned. Implies --proper-pairs-only. Default: 0" />
+            <param argument="--proper-pairs-only" type="boolean" truevalue="--proper-pairs-only" falsevalue="" 
+                label="Require reads to be mapped as proper pairs" help="Default: not set"/>
+            <param argument="--exclude-supplementary" type="boolean" truevalue="--exclude-supplementary" falsevalue="" 
+                label="Exclude supplementary alignments" help="Default: not set"/>
+        </section>
+    </xml>
+    <xml name="coverage">
+        <section name="cov" title="Coverage calculation options" expanded="false">
+            <param name="relative_abundance" type="boolean" falsevalue="" truevalue="relative_abundance" label="Relative abundance (default)"/>
+            <param name="mean" type="boolean" falsevalue="" truevalue="mean" label="Mean"/>
+            <conditional name="cond_methods">
+                <param name="trimmed_mean" type="boolean" falsevalue="" truevalue="trimmed_mean" label="Trimmed mean"/>
+                <when value="trimmed_mean">
+                    <param name="trim_min" type="integer" min="0" value="5" label="Trim min" help="Remove this smallest fraction of positions when calculating trimmed_mean default: 5"/>
+                    <param name="trim_max" type="integer" min="0" value="95" label="Trim max" help="Maximum fraction for trimmed_mean calculations default: 95"/>
+                </when>
+                <when value=""/>
+            </conditional>
+            <param name="covered_bases" type="boolean" falsevalue="" truevalue="covered_bases" label="Covered bases"/>
+            <param name="covered_fraction" type="boolean" falsevalue="" truevalue="covered_fraction" label="Covered fraction"/>
+            <param name="variance" type="boolean" falsevalue="" truevalue="variance" label="Variance"/>
+            <param name="length" type="boolean" falsevalue="" truevalue="length" label="Length"/>
+            <param name="count" type="boolean" falsevalue="" truevalue="count" label="Count"/>
+            <param name="metabat" type="boolean" falsevalue="" truevalue="metabat" label="MetaBAT"/>
+            <param name="coverage_histogram" type="boolean" falsevalue="" truevalue="coverage_histogram" label="Coverage histogram"/>
+            <param name="reads_per_base" type="boolean" falsevalue="" truevalue="reads_per_base" label="Reads per base"/>
+            <param name="rpkm" type="boolean" falsevalue="" truevalue="rpkm" label="RPKM"/>
+            <param name="tpm" type="boolean" falsevalue="" truevalue="tpm" label="TPKM"/>
+            <param name="min_covered_fraction" type="integer" min="0" optional="true"
+                label="Min covered fraction" help="Genomes with less coverage than this reported as having zero coverage. Default: 10"/>
+            <param name="contig_end_exclusion" type="integer" min="0" optional="true"
+                label="Contig end exclusion" help="Exclude bases at the ends of reference sequences from calculation. Default: 75"/>
+        </section>
+    </xml>
+    <xml name="out">
+        <section name="out" title="Output options" expanded="false">
+            <param name="output_format" type="select" label="Shape of output" help="'Sparse' for long format, 'dense' for species-by-site. Default: dense]">
+                <option value="dense" selected="true">Dense</option>
+                <option value="sparse">Sparse</option>
+            </param>
+            <param name="no_zeros" type="boolean" truevalue="--no-zeros" falsevalue="" optional="true" label="Omit printing of genomes that have zero coverage" />
+            <param argument="--dereplication-output-cluster-definition" type="boolean" truevalue="--dereplication-output-cluster-definition" falsevalue="" label="Output a file of representative TAB member lines." />
+            <param argument="--dereplication-output-representative-fasta-directory-copy" type="boolean" truevalue="--dereplication-output-representative-fasta-directory-copy" falsevalue="" label="Output representative genomes" />
+        </section>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <yield />
+        </citations>
+    </xml>
+</macros>
\ No newline at end of file