Repository 'coverm_genome'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/coverm_genome

Changeset 3:bb3f59096c8e (2023-07-26)
Previous changeset 2:5bf5792b0996 (2023-03-28) Next changeset 4:0ff4b0e5a3bc (2023-08-18)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tools/coverm commit 2d02165f40a9f8206a69716b2302bc58f5364982
modified:
coverm_genome.xml
macros.xml
b
diff -r 5bf5792b0996 -r bb3f59096c8e coverm_genome.xml
--- a/coverm_genome.xml Tue Mar 28 08:36:25 2023 +0000
+++ b/coverm_genome.xml Wed Jul 26 07:35:03 2023 +0000
[
b'@@ -3,555 +3,668 @@\n     <macros>\n         <import>macros.xml</import>\n     </macros>\n+    <expand macro="bio_tools"/>\n     <expand macro="requirements"/>\n     <command><![CDATA[\n-         #if $reads.read_type == "single" or $reads.read_type == "interleaved"\n-            mkdir -p reads1 &&\n-            #set file_paths1 = []\n-            #for $input_file in $reads.single\n-                \n-                #set $fname = $input_file.element_identifier.replace(" ","_")\n-                #set $file_path = \'reads1/\' + $fname\n-                ln -s \'$input_file\' \'$file_path\' &&\n-                $file_paths1.append($file_path)\n-            #end for\n-        #else if $reads.read_type == "bam"\n-            mkdir -p bam &&\n-            #set bam_files = []\n-            #for $input_file in $reads.bam\n-                \n-                #set $fname = $input_file.element_identifier.replace(" ","_")\n-                #set $file_path = \'bam/\' + $fname\n-                ln -s \'$input_file\' \'$file_path\' &&\n-                $bam_files.append($file_path)\n+#import re\n+\n+#set $single_fp = []\n+#set $fw_fp = []\n+#set $rv_fp = []\n+#set $interl_fp = []\n+#set $ref_fp = []\n+#set $bam_fp = []\n+#set $genome_fp = []\n+\n+mkdir \'single/\' && \n+mkdir \'fw/\' &&\n+mkdir \'rv/\' && \n+mkdir \'interl/\' && \n+mkdir \'ref/\' && \n+mkdir \'bam/\' &&\n+\n+#if $mapped.mapped == \'mapped\'\n+    @BAMS@\n+    #if $mapped.genome.ref_or_genome == \'genomic\'\n+        #if $mapped.genome.genomic.source == \'history\'\n+            #for $i, $genome in enumerate($mapped.genome.genomic.genome_fasta_files)\n+                #set $fn = re.sub(\'[^\\s\\w\\-\\\\.]\', \'_\', str($genome.element_identifier))\n+                #silent $genome_fp.append( $fn )\n+ln -s \'$genome\' \'$fn\' &&\n             #end for\n-        #else if $reads.read_type == "paired"\n-            mkdir -p paired_reads1 &&\n-            #set fw_reads1 = []\n-            #for $input_file in $reads.read1\n-                \n-                #set $fname = $input_file.element_identifier.replace(" ","_")\n-                #set $file_path = \'paired_reads1/\' + str($fname)\n-                ln -s \'$input_file\' \'$file_path\' &&\n-                $fw_reads1.append($file_path)\n-            #end for\n-            #set rv_reads1 = []\n-            #for $input_file in $reads.read2\n-                \n-                #set $fname = $input_file.element_identifier.replace(" ","_")\n-                #set $file_path = \'paired_reads1/\' + str($fname)\n-                ln -s \'$input_file\' \'$file_path\' &&\n-                $rv_reads1.append($file_path)\n-            #end for\n-            #silent $fw_reads1.sort()\n-            #silent $rv_reads1.sort()\n         #else\n-            mkdir -p paired_reads &&\n-            #set paired_reads1 = []\n-            #for $i, $input_file in enumerate($reads.paired_reads)\n-                #set $file_path = \'paired_reads/fw\' + str($i)\n-                ln -s \'$input_file.forward\' \'$file_path\' &&\n-                $paired_reads1.append($file_path)\n-                #set $file_path = \'paired_reads/rv\' + str($i)\n-                ln -s \'$input_file.reverse\' \'$file_path\' &&\n-                $paired_reads1.append($file_path)\n-            #end for\n-        #end if           \n-        #if $add_reads.extra_read.read_type == "single" or $add_reads.extra_read.read_type == "interleaved"\n-            mkdir -p add_reads1 &&\n-            #set add_file_paths1 = []\n-            #for $input_file in $add_reads.extra_read.single\n-                #set $fname = $input_file.element_identifier.replace(" ","_")\n-                #set $file_path = \'add_reads1/\' + $fname\n-                ln -s \'$input_file\' \'$file_path\' &&\n-                $add_file_paths1.append($file_path)\n-            #end for\n-        #else if $add_reads.extra_read.read_type == "bam"\n-            mkdir -p add_bam &&\n-            #set add_bam_files = []\n-            #for $input_file in $reads.bam\n-                #set $fname = $input_file.element_identifier.replace(" ","_")\n-                #set $file_path = \'add_bam/\' + '..b'length_500_1"/>\n+                        <has_text text=">random_sequence_length_500_2"/>\n+                    </assert_contents>\n+                </element>\n+                <element name="genome3" ftype="fasta">\n+                    <assert_contents>\n+                        <has_text text=">random_sequence_length_500_1"/>\n+                        <has_text text=">random_sequence_length_500_2"/>\n+                    </assert_contents>\n+                </element>\n             </output_collection>\n         </test>\n         <test expect_num_outputs="1">\n-            <conditional name="reads">\n-                <param name="read_type" value="bam"/>\n-                <param name="bam" value="2seqs.bad_read.1.with_supplementary.bam"/>\n-                <conditional name="genome">\n-                    <param name="ref_or_genome" value="none"/>\n-                    <param name="single_genome" value="true"/>\n+            <conditional name="mapped">\n+                <param name="mapped" value="mapped" />\n+                <conditional name="mode">\n+                    <param name="mode" value="co"/>\n+                    <param name="bam_files" value="2seqs.bad_read.1.with_supplementary.bam"/>\n+                    <param name="sharded" value="" />\n+                    <conditional name="genome">\n+                        <param name="ref_or_genome" value="contigs"/>\n+                        <conditional name="cond_single_genome">\n+                            <param name="single_genome" value="true"/>\n+                            <conditional name="genome_contig_definition">\n+                                <param name="choice" value="default"/>\n+                            </conditional>\n+                        </conditional>\n+                    </conditional>\n+                    <param name="sharded" value="" />\n                 </conditional>\n             </conditional>\n+            <param name="exclude_genomes_from_deshard" value="false"/>\n+            <section name="alignment">\n+                <param name="min_read_aligned_length" value="0" />\n+                <param name="min_read_percent_identity" value="0" />\n+                <param name="min_read_aligned_percent" value="0" />\n+                <conditional name="proper_pairs_only">\n+                    <param name="proper_pairs_only" value=""/>\n+                </conditional>\n+                <param name="exclude_supplementary" value=""/>\n+            </section>\n             <section name="cov">\n-                <param name="count" value="true"/>\n+                <param name="methods" value="count"/>\n+                <param name="trim_min" value="5"/>\n+                <param name="trim_max" value="95"/>\n                 <param name="min_covered_fraction" value="0"/>\n+                <param name="contig_end_exclusion" value="75"/>\n             </section>\n-            <output name="output1" file="test5.tsv" ftype="tsv" sort="true"/>\n+            <section name="derep" >\n+                <conditional name="dereplicate">\n+                    <param name="dereplicate" value=""/>\n+                </conditional>\n+            </section>\n+            <section name="out">\n+                <param name="output_format" value="sparse"/>\n+                <param name="no_zeros" value=""/>\n+                <param name="dereplication_output_cluster_definition" value="" />\n+                <param name="dereplication_output_representative_fasta_directory_copy"  value="" />\n+            </section>\n+            <output name="output" ftype="tabular">\n+                <assert_contents>\n+                    <has_text text="Sample"/>\n+                    <has_text text="Genome"/>\n+                    <has_text text="Read Count"/>\n+                    <has_text text="2seqs.bad_read.1.with_supplementary"/>\n+                    <has_text text="genome1"/>\n+                </assert_contents>\n+            </output>\n         </test>\n-        </tests>\n+    </tests>\n     <help><![CDATA[\n .. class:: infomark\n     \n'
b
diff -r 5bf5792b0996 -r bb3f59096c8e macros.xml
--- a/macros.xml Tue Mar 28 08:36:25 2023 +0000
+++ b/macros.xml Wed Jul 26 07:35:03 2023 +0000
b
b'@@ -1,13 +1,17 @@\n <macros>\n+    <token name="@TOOL_VERSION@">0.6.1</token>\n+    <token name="@VERSION_SUFFIX@">1</token>\n+    <token name="@PROFILE@">22.01</token>\n     <xml name="requirements">\n         <requirements>\n             <requirement type="package" version="@TOOL_VERSION@">coverm</requirement>\n         </requirements>\n     </xml>\n-    <token name="@INPUT_FORMATS@">fasta,fastq,fastq.gz,fasta.gz</token>\n-    <token name="@TOOL_VERSION@">0.6.1</token>\n-    <token name="@VERSION_SUFFIX@">0</token>\n-    <token name="@PROFILE@">22.01</token>\n+    <xml name="bio_tools">\n+        <xrefs>\n+            <xref type="bio.tools">coverm</xref>\n+        </xrefs>\n+    </xml>\n     <xml name="citation">\n         <citations>\n             <citation type="bibtex">\n@@ -22,275 +26,315 @@\n             </citation>\n         </citations>\n     </xml>\n-    <xml name="genome_opt">\n-        <conditional name="genome">\n-            <param name="ref_or_genome" type="select" label="Select if you want to specify additional genome files.">\n-                <option value="genomic">yes</option>\n-                <option value="none" selected="true">No (Only when BAM files are provided)</option>\n-            </param>\n-            <when value="none">\n-                <param argument="--single-genome" type="boolean" truevalue="--single-genome" falsevalue="" checked="false" label="All contigs are from the same genome."/>\n-                <param type="text" name="separator" optional="true" label="Character, that separates genome names from contig names in the reference file." >\n-                    <sanitizer>\n-                        <valid initial="string.punctuation">\n-                        </valid>\n-                    </sanitizer>\n-                </param>\n+    <xml name="mapped">\n+        <param name="mapped" type="select" label="Have the reads already been mapped to contigs?">\n+            <option value="mapped">Yes (no read mapping algorithm will be undertaken)</option>\n+            <option value="not-mapped" selected="true">No</option>\n+        </param>\n+    </xml>\n+    <xml name="assembly_mode">\n+        <param name="mode" type="select" label="Assembly mode?" help="Useful to know if contigs have been generated all samples together (co-assembly) or on each sample individually (individual assembly)">\n+            <option value="individual">Individual assembly (1 contig file per sample)</option>\n+            <option value="co" selected="true">Co-assembly (1 contig file for several samples)</option>\n+        </param>\n+    </xml>\n+    <xml name="mapped_params">\n+        <conditional name="mode">\n+            <expand macro="assembly_mode"/>\n+            <when value="individual">\n+                <param argument="--bam-files" type="data" format="bam" label="BAM file(s)" help="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)."/>\n+            </when>\n+            <when value="co">\n+                <param argument="--bam-files" type="data" format="bam" multiple="true" label="BAM file(s)" help="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)."/>\n             </when>\n-            <when value="genomic">\n-                <conditional name="genomic">\n-                    <param type="select" label="Reference genome source" name="source">\n-                        <option value="history" selected="true">History</option>\n-                        <option value="builtin">Built-in</option>\n-                    </param>\n-                    <when value="history">\n-                        <param type="data" name="fasta_history" multiple="true" label="FASTA files of each genome" format="fasta" />\n-                    </when>\n-                    <when value="builtin">\n-                        <param type="select" name="fasta_builtin" multiple="true" lab'..b'       label="Min covered fraction" help="Genomes with less coverage than this reported as having zero coverage. Default: 10"/>\n-            <param name="contig_end_exclusion" type="integer" min="0" optional="true"\n-                label="Contig end exclusion" help="Exclude bases at the ends of reference sequences from calculation. Default: 75"/>\n+            <param argument="--exclude-supplementary" type="boolean" truevalue="--exclude-supplementary" falsevalue="" checked="false"\n+                label="Exclude supplementary alignments"/>\n         </section>\n     </xml>\n-    <xml name="out">\n-        <section name="out" title="Output options" expanded="false">\n-            <param name="output_format" type="select" label="Shape of output" help="\'Sparse\' for long format, \'dense\' for species-by-site. Default: dense]">\n-                <option value="dense" selected="true">Dense</option>\n-                <option value="sparse">Sparse</option>\n-            </param>\n-            <param name="no_zeros" type="boolean" truevalue="--no-zeros" falsevalue="" optional="true" label="Omit printing of genomes that have zero coverage" />\n-            <param argument="--dereplication-output-cluster-definition" type="boolean" truevalue="--dereplication-output-cluster-definition" falsevalue="" label="Output a file of representative TAB member lines." />\n-            <param argument="--dereplication-output-representative-fasta-directory-copy" type="boolean" truevalue="--dereplication-output-representative-fasta-directory-copy" falsevalue="" label="Output representative genomes" />\n-        </section>\n+    <xml name="cov_method_options">\n+        <option value="trimmed_mean">trimmed_mean: Average number of aligned reads overlapping each position after removing the most deeply and shallow-ly covered positions. </option>\n+        <option value="coverage_histogram">coverage_histogram: Histogram of coverage depths</option>\n+        <option value="covered_bases">covered_bases: Number of bases covered by 1 or more reads</option>\n+        <option value="variance">variance: Variance of coverage depths</option>\n+        <option value="length">length: Length of each contig in base pairs</option>\n+        <option value="count">count: Number of reads aligned toq each contig. Note that a single read may be aligned to multiple contigs with supplementary alignments</option>\n+        <option value="metabat">metabat: ("MetaBAT adjusted coverage") Coverage as defined in Kang et al 2015</option>\n+        <option value="reads_per_base">reads_per_base: Number of reads aligned divided by the length of the contig</option>\n+        <option value="rpkm">rpkm: Reads mapped per kilobase of contig, per million mapped reads</option>\n+        <option value="tpm">tpm: Transcripts Per Million as described in Li et al 2010</option>\n+    </xml>\n+    <xml name="coverage_params">\n+        <param argument="--trim-min" type="integer" min="0" value="5" label="Smallest fraction of positions to remove when calculating" help="Only used with trimmed_mean method"/>\n+        <param argument="--trim-max" type="integer" min="0" value="95" label="Maximum fraction of positions to remove when calculating" help="Only used with trimmed_mean method"/>\n+        <param argument="--min-covered-fraction" type="integer" min="0" value="10" label="Minimum covered fraction" help="Genomes with less coverage than this reported as having zero coverage"/>\n+        <param argument="--contig-end-exclusion" type="integer" min="0" value="75" label="Base to exclude at contig ends" help="Bases at the ends of reference sequences will be excluded from calculation"/>\n+    </xml>\n+    <xml name="output_format">\n+        <param argument="--output-format" type="select" label="Shape of output">\n+            <option value="dense" selected="true">Dense for species-by-site</option>\n+            <option value="sparse">Sparse for long format</option>\n+        </param>\n     </xml>\n     <xml name="citations">\n         <citations>\n'