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

Changeset 0:20b4c59bec12 (2022-07-17)
Next changeset 1:9f23fe0cb70b (2022-10-28)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/snipit commit 2320dd4efe4d9c800588be55d10008212229703d
added:
snipit.xml
test-data/input.fasta
test-data/snp_plot.jpg
test-data/snp_plot.pdf
test-data/snp_plot.png
test-data/snp_plot_ex.png
b
diff -r 000000000000 -r 20b4c59bec12 snipit.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/snipit.xml Sun Jul 17 15:01:31 2022 +0000
[
@@ -0,0 +1,123 @@
+<tool id="snipit" name="snipit" version="@TOOL_VERSION@+galaxy0">
+    <description>Summarise snps relative to a reference sequence</description>
+    <macros>
+        <token name="@TOOL_VERSION@">1.0.5</token>
+    </macros>
+    <requirements>
+        <requirement type="package" version="@TOOL_VERSION@">snipit</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        snipit '$alignment'
+            #if $opt.reference
+                -r '$opt.reference'
+            #end if
+            #if $opt.labels
+                -l '$opt.labels'
+            #end if
+            --l-header '$opt.l_header'
+            -f '$opt.format'
+            --height '$opt.height'
+            --width '$opt.width'
+            --size-option '$opt.size_option'
+            $opt.flip_vertical
+            #if $opt.exclude_positions
+                --exclude-positions '$opt.exclude_positions'
+            #end if
+            $opt.exclude_ambig_pos
+            $opt.sort_by_mutation_number
+            $opt.sort_by_id
+            #if $opt.sort_by_mutations
+                --sort-by-mutations '$opt.sort_by_mutations'
+            #end if
+            $opt.high_to_low
+            -c '$opt.colour_palette'
+    ]]>    </command>
+    <inputs>
+        <param name="alignment" format="fasta" type="data" label="Input alignment fasta file" />
+        <section name="opt" title="Optional arguments" expanded="true">
+            <param name="reference" argument="-r" type="text" optional="true" label="Reference sequence (by sequence ID)" help="Indicates which sequence in the alignment is the reference (by sequence ID). Default: first sequence in alignment" />
+            <param name="labels" argument="-l" type="data" format="csv" optional="true" label="Labels" help="Optional csv file of labels to show in output snipit plot. Default: sequence names"/>
+            <param argument="--l-header" type="text" value="name,label" label="Label headers" help="Comma separated string of column headers in label csv. First field indicates sequence name column, second the label column. Default: 'name,label'" />
+            <param name="format" argument="-f" type="select" value="png" label="Output file format" help="Format options. Default: png">
+                <option value="png" selected="true">png</option>
+                <option value="jpg">jpg</option>
+                <option value="pdf">pdf</option>
+                <option value="svg">svg</option>
+                <option value="tiff">tiff</option>
+            </param>
+            <param argument="--height" type="float" value="0.0" label="Figure height" help="Overwrite the default figure height." />
+            <param argument="--width" type="float" value="0.0" label="Figure width" help="Overwrite the default figure width." />
+            <param argument="--size-option" type="select" value="scale" label="Sizing options" help="Specify options for sizing. Options: expand, scale">
+                <option value="expand">expand</option>
+                <option value="scale" selected="true">scale</option>
+            </param>
+            <param argument="--flip-vertical" type="boolean" truevalue="--flip-vertical" falsevalue="" value="false" label="Flip plot orientation?" help="Flip the orientation of the plot so sequences are below the reference rather than above it. Default: false" />
+            <param argument="--exclude-positions" type="text" optional="true" label="Excluded positions" help="One or more range (closed, inclusive; one-indexed) or specific position to exclude in the output. Ex. '100-150' or Ex. '100 101' Considered after '--include-positions'." />
+            <param argument="--exclude-ambig-pos" type="boolean" truevalue="--exclude-ambig-pos" falsevalue="" value="false" label="Exclude ambig positions?" help="Exclude positions with ambig base in any sequences. Considered after '--include-positions'" />
+            <param argument="--sort-by-mutation-number" type="boolean" truevalue="--sort-by-mutation-number" falsevalue="" value="false" label="Sort by mutation number?" help="Render the graph with sequences sorted by the number of SNPs relative to the reference (fewest to most). Default: False" />
+            <param argument="--sort-by-id" type="boolean" truevalue="--sort-by-id" falsevalue="" value="false" label="Sort by sequence ID?" help="Sort sequences alphabetically by sequence id. Default: False" />
+            <param argument="--sort-by-mutations" type="text" optional="true" label="Sort by mutations" help="Sort sequences by bases at specified positions. Positions are comma separated integers. Ex. '1,2,3'" />
+            <param argument="--high-to-low" type="boolean" truevalue="--high-to-low" falsevalue="" value="false" label="Sort high to low?" help="If 'sort by mutation number' is selected, show the sequences with the fewest SNPs closest to the reference. Default: False" />
+            <param name="colour_palette" argument="-c" type="select" value="classic" label="Colour palette" help="Specify colour palette. Options: primary, classic, purine-pyrimidine, greyscale, wes, verity">
+                <option value="primary">primary</option>
+                <option value="classic" selected="true">classic</option>
+                <option value="purine-pyrimidine">purine-pyrimidine</option>
+                <option value="greyscale">greyscale</option>
+                <option value="wes">wes</option>
+                <option value="verity">verity</option>
+            </param>
+        </section>
+    </inputs>
+    <outputs>
+        <data name="snp_plot" format="png" label="snp plot" from_work_dir="snp_plot.*">
+            <change_format>
+                <when input="opt.format" value="jpg" format="jpg" />
+                <when input="opt.format" value="pdf" format="pdf" />
+                <when input="opt.format" value="svg" format="svg" />
+                <when input="opt.format" value="tiff" format="tiff" />
+            </change_format>
+        </data>
+    </outputs>
+    <tests>
+        <test>
+            <param name="alignment" value="input.fasta" />
+            <output name="snp_plot" ftype="png" file="snp_plot.png" compare="sim_size"/>
+        </test>
+        <test>
+            <param name="alignment" value="input.fasta" />
+            <param name="reference" value="USA_2" />
+            <param name="format" value="pdf" />
+            <param name="flip_vertical" value="true" />
+            <output name="snp_plot" ftype="pdf" file="snp_plot.pdf" compare="sim_size" />
+        </test>
+        <test>
+            <param name="alignment" value="input.fasta" />
+            <param name="format" value="jpg" />
+            <param name="colour_palette" value="verity" />
+            <output name="snp_plot" ftype="jpg" file="snp_plot.jpg" />
+        </test>
+        <test>
+            <param name="alignment" value="input.fasta" />
+            <param name="excluded_positions" value="1-100" />
+            <param name="exclude_ambig_pos" value="true" />
+            <param name="high_to_low" value="true" />
+            <output name="snp_plot" ftype="png" file="snp_plot_ex.png" compare="sim_size" />
+        </test>
+    </tests>
+    <help><![CDATA[
+**What it does**
+
+Snipit finds the SNPs relative to a reference in a multiple sequence alignment and highlights these changes as a figure.
+    ]]>
+    </help>
+    <citations>
+        <citation type="bibtex">
+            @UNPUBLISHED{OToole2017,
+                author = {O'Toole, Aine},
+                title = {snipit: Summarise snps relative to your reference sequence.},
+                year = {2017},
+                url = {https://github.com/aineniamh/snipit}
+            }
+        </citation>
+    </citations>
+</tool>
b
diff -r 000000000000 -r 20b4c59bec12 test-data/input.fasta
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/input.fasta Sun Jul 17 15:01:31 2022 +0000
b
b'@@ -0,0 +1,3000 @@\n+>reference\n+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n+nnnnnnnnnnnnnnnnnnnnnnnnnatggagagccttgtccctggtttcaacgagaaaac\n+acacgtccaactcagtttgcctgttttacaggttcgcgacgtgctcgtacgtggctttgg\n+agactccgtggaggaggtcttatcagaggcacgtcaacatcttaaagatggcacttgtgg\n+cttagtagaagttgaaaaaggcgttttgcctcaacttgaacagccctatgtgttcatcaa\n+acgttcggatgctcgaactgcacctcatggtcatgttatggttgagctggtagcagaact\n+cgaaggcattcagtacggtcgtagtggtgagacacttggtgtccttgtccctcatgtggg\n+cgaaataccagtggcttaccgcaaggttcttcttcgtaagaacggtaataaaggagctgg\n+tggccatagttacggcgccgatctaaagtcatttgacttaggcgacgagcttggcactga\n+tccttatgaagattttcaagaaaactggaacactaaacatagcagtggtgttacccgtga\n+actcatgcgtgagcttaacggaggggcatacactcgctatgtcgataacaacttctgtgg\n+ccctgatggctaccctcttgagtgcattaaagaccttctagcacgtgctggtaaagcttc\n+atgcactttgtccgaacaactggactttattgacactaagaggggtgtatactgctgccg\n+tgaacatgagcatgaaattgcttggtacacggaacgttctgaaaagagctatgaattgca\n+gacaccttttgaaattaaattggcaaagaaatttgacaccttcaatggggaatgtccaaa\n+ttttgtatttcccttaaattccataatcaagactattcaaccaagggttgaaaagaaaaa\n+gcttgatggctttatgggtagaattcgatctgtctatccagttgcgtcaccaaatgaatg\n+caaccaaatgtgcctttcaactctcatgaagtgtgatcattgtggtgaaacttcatggca\n+gacgggcgattttgttaaagccacttgcgaattttgtggcactgagaatttgactaaaga\n+aggtgccactacttgtggttacttaccccaaaatgctgttgttaaaatttattgtccagc\n+atgtcacaattcagaagtaggacctgagcatagtcttgccgaataccataatgaatctgg\n+cttgaaaaccattcttcgtaagggtggtcgcactattgcctttggaggctgtgtgttctc\n+ttatgttggttgccataacaagtgtgcctattgggttccacgtgctagcgctaacatagg\n+ttgtaaccatacaggtgttgttggagaaggttccgaaggtcttaatgacaaccttcttga\n+aatactccaaaaagagaaagtcaacatcaatattgttggtgactttaaacttaatgaaga\n+gatcgccattattttggcatctttttctgcttccacaagtgcttttgtggaaactgtgaa\n+aggtttggattataaagcattcaaacaaattgttgaatcctgtggtaattttaaagttac\n+aaaaggaaaagctaaaaaaggtgcctggaatattggtgaacagaaatcaatactgagtcc\n+tctttatgcatttgcatcagaggctgctcgtgttgtacgatcaattttctcccgcactct\n+tgaaactgctcaaaattctgtgcgtgttttacagaaggccgctataacaatactagatgg\n+aatttcacagtattcactgagactcattgatgctatgatgttcacatctgatttggctac\n+taacaatctagttgtaatggcctacattacaggtggtgttgttcagttgacttcgcagtg\n+gctaactaacatctttggcactgtttatgaaaaactcaaacccgtccttgattggcttga\n+agagaagtttaaggaaggtgtagagtttcttagagacggttgggaaattgttaaatttat\n+ctcaacctgtgcttgtgaaattgtcggtggacaaattgtcacctgtgcaaaggaaattaa\n+ggagagtgttcagacattctttaagcttgtaaataaatttttggctttgtgtgctgactc\n+tatcattattggtggagctaaacttaaagccttgaatttaggtgaaacatttgtcacgca\n+ctcaaagggattgtacagaaagtgtgttaaatccagagaagaaactggcctactcatgcc\n+tctaaaagccccaaaagaaattatcttcttagagggagaaacacttcccacagaagtgtt\n+aacagaggaagttgtcttgaaaactggtgatttacaaccattagaacaacctactagtga\n+agctgttgaagctccattggttggtacaccagtttgtattaacgggcttatgttgctcga\n+aatcaaagacacagaaaagtactgtgcccttgcacctaatatgatggtaacaaacaatac\n+cttcacactcaaaggcggtgcaccaacaaaggttacttttggtgatgacactgtgataga\n+agtgcaaggttacaagagtgtgaatatcacttttgaacttgatgaaaggattgataaagt\n+acttaatgagaagtgctctgcctatacagttgaactcggtacagaagtaaatgagttcgc\n+ctgtgttgtggcagatgctgtcataaaaactttgcaaccagtatctgaattacttacacc\n+actgggcattgatttagatgagtggagtatggctacatactacttatttgatgagtctgg\n+tgagtttaaattggcttcacatatgtattgttctttctaccctccagatgaggatgaaga\n+agaaggtgattgtgaagaagaagagtttgagccatcaactcaatatgagtatggtactga\n+agatgattaccaaggtaaacctttggaatttggtgccacttctgctgctcttcaacctga\n+agaagagcaagaagaagattggttagatgatgatagtcaacaaactgttggtcaacaaga\n+cggcagtgaggacaatcagacaactactattcaaacaattgttgaggttcaacctcaatt\n+agagatggaacttacaccagttgttcagactattgaagtgaatagttttagtggttattt\n+aaaacttactgacaatgtatacattaaaaatgcagacattgtggaagaagctaaaaaggt\n+aaaaccaacagtggttgttaatgcagccaatgtttaccttaaacatggaggaggtgttgc\n+aggagccttaaataaggctactaacaatgccatgcaagttgaatctgatgattacatagc\n+tactaatggaccacttaaagtgggtggtagttgtgttttaagcggacacaatcttgctaa\n+acactgtcttcatgttgtcggcccaaatgttaacaaaggtgaagacattcaacttcttaa\n+gagtgcttatgaaaattttaatcagcacgaagttctacttgcaccattattatcagctgg\n+tatttttggtgctgaccctatacattctttaagagtttgtgtagatactgttcgcacaaa\n+tgtctacttagctgtctttgataaaaatctctatgacaaacttgtttcaagctttttgga\n'..b'ggtgttgaacatgttaccttcttcatctacaataaaatt\n+gttgatgagcctgaagaacatgtccaaattcacacaatcgacggttcatccggagttgtt\n+aatccagtaatggaaccaatttatgatgaaccgacgacgactactagcgtgcctttgtaa\n+gcacaagctgatgagtacgaacttatgtactcattcgtttcggaagagacaggtacgtta\n+atagttaatagcgtacttctttttcttgctttcgtggtattcttgctagttacactagcc\n+atccttactgcgcttcgattgtgtgcgtactgctgcaatattgttaacgtgagtcttgta\n+aaaccttctttttacgtttactctcgtgttaaaaatctgaattcttctagagttcctgat\n+cttctggtctaaacgaactaaatattatattagtttttctgtttggaactttaattttag\n+ccatggcagattccaacggtactattaccgttgaagagcttaaaaagctccttgaacaat\n+ggaacctagtaataggtttcctattccttacatggatttgtcttctacaatttgcctatg\n+ccaacaggaataggtttttgtatataattaagttaattttcctctggctgttatggccag\n+taactttagcttgttttgtgcttgctgctgtttacagaataaattggatcaccggtggaa\n+ttgctatcgcaatggcttgtcttgtaggcttgatgtggctcagctacttcattgcttctt\n+tcagactgtttgcgcgtacgcgttccatgtggtcattcaatccagaaactaacattcttc\n+tcaacgtgccactccatggcactattctgaccagaccgcttctagaaagtgaactcgtaa\n+tcggagctgtgatccttcgtggacatcttcgtattgctggacaccatctaggacgctgtg\n+acatcaaggacctgcctaaagaaatcactgttgctacatcacgaacgctttcttattaca\n+aattgggagcttcgcagcgtgtagcaggtgactcaggttttgctgcatacagtcgctaca\n+ggattggcaactataaattaaacacagaccattccagtagcagtgacaatattgctttgc\n+ttgtacagtaagtgacaacagatgtttcatctcgttgactttcaggttactatagcagag\n+atattactaattattatgaggacttttaaagtttccatttggaatcttgattacatcata\n+aacctcataattaaaaatttatctaagtcactaactgagaataaatattctcaattagat\n+gaagagcaaccaatggagattgattaaacgaacatgaaaattattcttttcttggcactg\n+ataacactcgctacttgtgagctttatcactaccaagagtgtgttagaggtacaacagta\n+cttttaaaagaaccttgctcttctggaacatacgagggcaattcaccatttcatcctcta\n+gctgataacaaatttgcactgacttgctttagcactcaatttgcttttgcttgtcctgac\n+ggcgtaaaacacgtctatcagttacgtgccagatcagtttcacctaaactgttcatcaga\n+caagaggaagttcaagaactttactctccaatttttcttattgttgcggcaatagtgttt\n+ataacactttgcttcacactcaaaagaaagacagaatgattgaactttcattaattgact\n+tctatttgtgctttttagcctttctgctattccttgttttaattatgcttattatctttt\n+ggttctcacttgaactgcaagatcataatgaaacttgtcacgcctaaacgaacatgaaat\n+ttcttgttttcttaggaatcatcacaactgtagctgcatttcaccaagaatgtagtttac\n+agtcatgtactcaacatcaaccatatgtagttgatgacccgtgtcctattcacttctatt\n+ctaaatggtatattagagtaggagctagaaaatcagcacctttaattgaattgtgcgtgg\n+atgaggctggttctaaatcacccattcagtacatcgatatcggtaattatacagtttcct\n+gttcaccttttacaattaattgccaggaacctaaattgggtagtcttgtagtgcgttgtt\n+cgttctatgaagactttttagagtatcatgacgttcgtgttgttttagatttcatctaaa\n+cgaacaaactaaaatgtctgataatggaccccaaaatcagcgaaatgcaccccgcattac\n+gtttggtggaccctcagattcaactggcagtaaccagaatggagaacgcagtggggcgcg\n+atcaaaacaacgtcggccccaaggtttacccaataatactgcgtcttggttcaccgctct\n+cactcaacatggcaaggaagaccttaaattccctcgaggacaaggcgttccaattaacac\n+caatagcagtccagatgaccaaattggctactaccgaagagctaccagacgaattcgtgg\n+tggtgacggtaaaatgaaagatctcagtccaagatggtatttctactacctaggaactgg\n+gccagaagctggacttccctatggtgctaacaaagacggcatcatatgggttgcaactga\n+gggagccttgaatacaccaaaagatcacattggcacccgcaatcctgctaacaatgctgc\n+aatcgtgctacaacttcctcaaggaacaacattgccaaaaggcttctacgcagaagggag\n+cagaggcggcagtcaagcctcttctcgttcctcatcacgtagtcgcaacagttcaagaaa\n+ttcaactccaggcagcagtaggggaacttctcctgctagaatggctggcaatggcggtga\n+tgctgctcttgctttgctgctgcttgacagattgaaccagcttgagagcaaaatgtctgg\n+taaaggccaacaacaacaaggccaaactgtcactaagaaatctgctgctgaggcttctaa\n+gaagcctcggcaaaaacgtactgccactaaagcatacaatgtaacacaagctttcggcag\n+acgtggtccagaacaaacccaaggaaattttggggaccaggaactaatcagacaaggaac\n+tgattacaaacattggccgcaaattgcacaatttgcccccagcgcttcagcgttcttcgg\n+aatgtcgcgcattggcatggaagtcacaccttcgggaacgtggttgacctacacaggtgc\n+catcaaattggatgacaaagatccaaatttcaaagatcaagtcattttgctgaataagca\n+tattgacgcatacaaaacattcccaccaacagagcctaaaaaggacaaaaagaagaaggc\n+tgatgaaactcaagccttaccgcagagacagaagaaacagcaaactgtgactcttcttcc\n+tgctgcagatttggatgatttctccaaacaattgcaacaatccatgagcagtgctgactc\n+aactcaggcctaaactcatgcagaccacacaaggcagatgggctatataaacgttttcgc\n+ttttccgtttacgatatatagtctactcttgtgcagaatgaattctcgtaactacatagc\n+acaagtagatgtagttaactttaatctcacatagnnnnnnnnnnnnnnnnnnnnnnnnnn\n+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n+nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn\n+nnnnnnnnnnnnnnnnnnnnnnn\n\\ No newline at end of file\n'
b
diff -r 000000000000 -r 20b4c59bec12 test-data/snp_plot.jpg
b
Binary file test-data/snp_plot.jpg has changed
b
diff -r 000000000000 -r 20b4c59bec12 test-data/snp_plot.pdf
b
Binary file test-data/snp_plot.pdf has changed
b
diff -r 000000000000 -r 20b4c59bec12 test-data/snp_plot.png
b
Binary file test-data/snp_plot.png has changed
b
diff -r 000000000000 -r 20b4c59bec12 test-data/snp_plot_ex.png
b
Binary file test-data/snp_plot_ex.png has changed