diff dnadiff.xml @ 0:491b007eec5d draft default tip

Uploaded
author greg
date Mon, 27 Feb 2023 20:02:43 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dnadiff.xml	Mon Feb 27 20:02:43 2023 +0000
@@ -0,0 +1,133 @@
+<tool id="mummer_dnadiff" name="DNAdiff" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>Evaluate similarities/differences between two sequences</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="bio_tools"/>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code">
+<![CDATA[
+    #if $reference_source.reference_source_selector == 'history':
+        ln -f -s '$reference_source.reference_sequence' reference.fa &&
+    #else:
+        ln -f -s '$reference_source.reference_sequence.fields.path' reference.fa &&
+    #end if
+    ln -s $query_sequence query.fa &&
+    dnadiff 'reference.fa' 'query.fa'
+]]>  
+    </command>
+    <inputs>
+        <conditional name="reference_source">
+            <param name="reference_source_selector" type="select" label="Select a reference genome from your history or select a cached reference genome?">
+                <option value="cached">Select a cached reference genome</option>
+                <option value="history">Select a reference genome from the history and build the index</option>
+            </param>
+            <when value="cached">
+                <param name="reference_sequence" type="select" label="Using reference genome" help="Select genome from the list">
+                    <options from_data_table="all_fasta">
+                        <filter type="sort_by" column="2"/>
+                        <validator type="no_options" message="No reference genomes are available"/>
+                    </options>
+                    <validator type="no_options" message="A cached reference genome is not available for the build associated with the selected input file"/>
+                </param>
+            </when>
+            <when value="history">
+                <param name="reference_sequence" type="data" format="fasta" label="Use the following dataset as the reference genome" help="You can upload a FASTA or multi-Fasta file to your history and use it as reference"/>
+            </when>
+        </conditional>
+        <param name="query_sequence" type="data" format="fasta" label="Query Sequence(s)" help="FastA or multi-FastA"/>
+        <param name="report_only" type="select" label="Output only the general report file?" help="Select no to output all output files">
+            <option value="yes">YES</option>
+            <option value="no">NO</option>
+        </param>
+    </inputs>
+    <outputs>
+        <data name="report" format="txt" from_work_dir="out.report" label="${tool.name} on ${on_string}: report"/>
+        <data name="delta" format="tabular" from_work_dir="out.delta" label="${tool.name} on ${on_string}: delta">
+            <filter> report_only == 'no'</filter>
+        </data>
+        <data name="delta1" format="tabular" from_work_dir="out.1delta" label="${tool.name} on ${on_string}: 1delta" >
+            <filter> report_only == 'no' </filter>
+        </data>
+        <data name="mdelta" format="tabular" from_work_dir="out.mdelta" label="${tool.name} on ${on_string}: mdelta" >
+            <filter> report_only == 'no' </filter>
+        </data>
+        <data name="coords1" format="tabular" from_work_dir="out.1coords" label="${tool.name} on ${on_string}: 1coords" >
+            <filter> report_only == 'no' </filter>
+            <actions>
+                    <action name="column_names" type="metadata" default="[S1], [E1], [S2], [E2], [LEN 1], [LEN 2], [% IDY], [LEN R], [LEN Q], [COV R], [COV Q], [REF TAG], [QUERY TAG]"/>
+            </actions>
+        </data>
+        <data name="mcoords" format="tabular" from_work_dir="out.mcoords" label="${tool.name} on ${on_string}: mcoords" >
+            <filter> report_only == 'no' </filter>
+            <actions>
+                    <action name="column_names" type="metadata" default="[S1], [E1], [S2], [E2], [LEN 1], [LEN 2], [% IDY], [LEN R], [LEN Q], [COV R], [COV Q], [REF TAG], [QUERY TAG]"/>
+            </actions>
+        </data>
+        <data name="snps" format="tabular" from_work_dir="out.snps" label="${tool.name} on ${on_string}: snps" >
+            <filter> report_only == 'no' </filter>
+            <actions>
+            	<action name="column_names" type="metadata" default="[P1], [REF SUB], [QUERY SUB], [P2], [BUFF], [DIST], [LEN REF], [LEN QUERY], [REF FRAME], [QUERY FRAME], [REF TAG], [QUERY TAG]"/>
+            </actions>
+        </data>
+        <data name="rdiff" format="tabular" from_work_dir="out.rdiff" label="${tool.name} on ${on_string}: rdiff" >
+            <filter> report_only == 'no' </filter>
+            <actions>
+                <action name="column_names" type="metadata" default="Seq ID, Feature Type, Feature Start, Feature End, Feature Length"/>
+            </actions>
+        </data>
+        <data name="qdiff" format="tabular" from_work_dir="out.qdiff" label="${tool.name} on ${on_string}: qdiff" >
+            <filter> report_only == 'no' </filter>
+            <actions>
+                <action name="column_names" type="metadata" default="Seq ID, Feature Type, Feature Start, Feature End, Feature Length"/>
+            </actions>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="reference_source_selector" value="history"/>
+            <param name="reference_sequence" ftype="fasta" value="human_aqp3.fasta"/>
+            <param name="query_sequence" ftype="fasta" value="mouse_aqp3.fasta"/>
+            <param name="report_only" value="no"/>
+            <output name="report" ftype="txt" compare="diff" sort="true" lines_diff="2" value="report.txt"/>
+            <output name="delta" ftype="tabular" compare="diff" lines_diff="2" value="delta.txt"/>
+            <output name="delta1" ftype="tabular" compare="diff" lines_diff="2" value="1delta.txt"/>
+            <output name="mdelta" ftype="tabular" compare="diff" lines_diff="2" value="mdelta.txt"/>
+            <output name="coords1" ftype="tabular" compare="diff" value="1coords.txt"/>
+            <output name="mcoords" ftype="tabular" compare="diff" value="mcoords.txt"/>
+            <output name="snps" ftype="tabular" compare="diff" value="snps.txt"/>
+            <output name="rdiff" ftype="tabular" compare="diff" value="rdiff.txt"/>
+            <output name="qdiff" ftype="tabular" compare="diff" value="qdiff.txt"/>
+        </test>
+        <test>
+            <param name="reference_source_selector" value="cached"/>
+            <param name="reference_sequence" ftype="fasta" value="human_aqp3"/>
+            <param name="query_sequence" ftype="fasta" value="mouse_aqp3.fasta"/>
+            <param name="report_only" value="no"/>
+            <output name="report" ftype="txt" compare="diff" sort="true" lines_diff="2" value="report.txt"/>
+            <output name="delta" ftype="tabular" compare="diff" lines_diff="2" value="delta.txt"/>
+            <output name="delta1" ftype="tabular" compare="diff" lines_diff="2" value="1delta.txt"/>
+            <output name="mdelta" ftype="tabular" compare="diff" lines_diff="2" value="mdelta.txt"/>
+            <output name="coords1" ftype="tabular" compare="diff" value="1coords.txt"/>
+            <output name="mcoords" ftype="tabular" compare="diff" value="mcoords.txt"/>
+            <output name="snps" ftype="tabular" compare="diff" value="snps.txt"/>
+            <output name="rdiff" ftype="tabular" compare="diff" value="rdiff.txt"/>
+            <output name="qdiff" ftype="tabular" compare="diff" value="qdiff.txt"/>
+        </test>
+    </tests>
+     <help><![CDATA[
+This script is a wrapper around nucmer that builds an alignment using default parameters, and runs many of nucmer's helper scripts to process the output and report alignment statistics, SNPs, breakpoints, etc. It is designed for evaluating the sequence and structural similarity of two highly similar sequence sets. E.g. comparing two different assemblies of the same organism, or comparing two strains of the same species.
+
+**Output files:**
+    * report: Summary of alignments, differences and SNPs
+    * delta: Standard nucmer alignment output
+    * 1delta: 1-to-1 alignment from delta-filter -1
+    * mdelta: M-to-M alignment from delta-filter -m
+    * 1coords: 1-to-1 coordinates from show-coords -THrcl .1delta
+    * mcoords: M-to-M coordinates from show-coords -THrcl .mdelta
+    * snps: SNPs from show-snps -rlTHC .1delta
+    * rdiff: Classified ref breakpoints from show-diff -rH .mdelta
+    * qdiff: Classified qry breakpoints from show-diff -qH .mdelta
+    ]]></help>
+    <expand macro="citation"/>
+</tool>