changeset 0:b4310d79bbfb draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/rna_tools/locarna commit 1d1d9aac8cb96d043be07f2e4059baa3b05c2afc
author bgruening
date Wed, 28 Dec 2016 18:48:14 -0500
parents
children
files locarna.tar.bz2 locarna_pairwise.xml macros.xml test-data/archaea-default.stdout test-data/archaea-probabilistic.aln test-data/archaea.fa test-data/archaea.tar.gz test-data/archaea_relplot.scr test-data/haca.snoRNA-default.stdout test-data/haca.snoRNA.fa test-data/haca.snoRNA_anchor.bed test-data/tRNA_2-1.fa test-data/tRNA_2-2.fa test-data/tRNA_2.aln test-data/tRNA_5.fa
diffstat 15 files changed, 725 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
Binary file locarna.tar.bz2 has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/locarna_pairwise.xml	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,284 @@
+<tool id="locarna_pairwise" name="LocARNA Pairwise Aligner" version="@VERSION@.0">
+    <description>
+        Pairwise Simultaneous Alignment and Folding of RNAs
+    </description>
+
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    
+    <expand macro="requirements" />
+
+    <expand macro="stdio" />
+    
+    <expand macro="version" />
+   
+    <command><![CDATA[
+    #if str($alignment_mode.alignment_mode_selector) == "sparse"
+        sparse
+    #else
+        locarna
+    #end if
+
+    '$inputA'
+    '$inputB'
+    
+    --width 60
+    
+    ## -------------------- alignment mode and specific options
+
+    #if str($alignment_mode.alignment_mode_selector) == "global_locarna"
+        #if str($alignment_mode.free_endgaps) != "----"
+            --free-endgaps $alignment_mode.free_endgaps
+        #end if
+    #else if str($alignment_mode.alignment_mode_selector) == "local_locarna"
+        --sequ-local on
+    #else if str($alignment_mode.alignment_mode_selector) == "structure_local_locarna"
+        --struct-local on
+    #else if str($alignment_mode.alignment_mode_selector) == "structure_sequence_local_locarna"
+        --sequ-local on
+        --struct-local on
+    #end if
+
+    ## -------------------- scoring parameters
+    
+    --indel $Scoring.indel
+    --indel-opening $Scoring.indel_opening
+    --struct-weight $Scoring.struct_weight
+    --tau $Scoring.tau
+    
+    #if str($Scoring.sequence_score.sequence_score_selector) == "match"
+        --match $Scoring.sequence_score.match
+        --mismatch $Scoring.sequence_score.mismatch
+    #else if str($Scoring.sequence_score.sequence_score_selector) == "ribosum"
+        --use-ribosum true
+    #else if str($Scoring.sequence_score.sequence_score_selector) == "ribofit"
+        --ribofit true
+    #end if
+
+    ## -------------------- folding parameters
+
+    #if float($Folding.rnafold_temperature) != 37.0
+        --rnafold-temperature $Folding.rnafold_temperature
+    #end if
+
+    $Folding.alifold_consensus_dp
+    --consensus-structure $Folding.consensus_structure
+
+    ## -------------------- heuristic parameters
+    
+    -p $Heuristics.min_prob
+    --max-diff-am $Heuristics.max_diff_am
+    --max-diff $Heuristics.max_diff
+    --max-diff-at-am $Heuristics.max_diff_at_am
+    
+    #if float($Heuristics.max_bps_length_ratio) != 0.0
+        --max-bps-length-ratio $Heuristics.max_bps_length_ratio
+    #end if
+    
+    ## -------------------- other parameters
+        
+    $Constraint.lonely_pairs
+
+    #if $Constraint.maxBPspan != -1
+        --maxBPspan $Constraint.maxBPspan
+    #end if
+
+    $Constraint.ignore_constraints
+
+    ## -------------------- output
+    
+    #if 'stockholm' in str($outputs).split(",")
+        --stockholm '$stockholm'
+    #end if
+    #if 'clustal' in str($outputs).split(",")
+        --clustal '$clustal'
+    #end if
+    #if 'clustal_strict' in str($outputs).split(",") and (not 'clustal' in str($outputs).split(","))
+        --clustal '$clustal_strict'
+    #end if
+    #if 'pp' in str($outputs).split(",")
+        --pp '$pp'
+    #end if
+    
+    $stdout_verbosity
+
+    #if str($stdout_verbosity) != "--quiet":
+        > '$stdout'
+    #end if
+
+    #if 'clustal' in str($outputs).split(",") and 'clustal_strict' in str($outputs).split(",")
+        && cp $clustal $clustal_strict
+    #end if
+
+    #if 'clustal_strict' in str($outputs).split(",")
+        && sed -i '/\^#/d' '$clustal_strict'
+    #end if
+
+    ]]></command>
+
+    <inputs>
+        <param name="inputA" type="data" format="fasta,clustal,txt" label="Sequence A"
+               help="First sequence in fasta, clustal, dp_ps, or PP2.0 format"
+               />
+        <param name="inputB" type="data" format="fasta,clustal,txt" label="Sequence B"
+               help="Second sequence in fasta, clustal, dp_ps, or PP2.0 format"
+               />
+        <conditional name="alignment_mode">
+            <param name="alignment_mode_selector" type="select" label="Alignment mode"
+                   help="Note that local alignment mode usually requires to turn off 
+                         the 'max-diff' heuristic (maximal difference for alignment traces)."
+                   >
+                <option value="global_locarna">Global alignment
+                (LocARNA)</option>
+                <option value="local_locarna">Local alignment (LocARNA)</option>
+                <option value="sparse">Global alignment (SPARSE)</option>
+                <option value="structure_sequence_local_locarna">
+                    Structure and sequence local alignment (LocARNA)
+                </option>
+                <option value="structure_local_locarna">
+                    Structure local, sequence global alignment (LocARNA)
+                </option>
+            </param>
+            <when value="global_locarna">
+                <param name="free_endgaps" type="select" label="Free endgaps"
+                       help="Specify whether gaps at the ends (all, 5', or 3' ends)
+                             of the sequences should be penalized or allowed for free.">
+                    <option value="----">None</option>
+                    <option value="++++">All</option>
+                    <option value="+-+-">5' ends</option>
+                    <option value="-+-+">3' ends</option>
+                    <option value="++--">first sequence</option>
+                    <option value="--++">second sequence</option>
+                    <option value="+---">sequence A, 5' end</option>
+                    <option value="-+--">sequence A, 3' end</option>
+                    <option value="--+-">sequence B, 5' end</option>
+                    <option value="---+">sequence B, 3' end</option>
+                </param>
+            </when>
+            <when value="local_locarna">
+            </when>
+            <when value="sparse" />
+            <when value="structure_sequence_local_locarna" />
+            <when value="structure_local_locarna" />
+        </conditional>
+        
+        <param name="outputs" type="select" display="checkboxes" multiple="True" 
+               label="Output options">
+            <option value="clustal_strict" selected="True">Output alignment
+            in ClustalW format</option>
+            <option value="clustal" selected="False">Output alignment
+            in constraint-annotated ClustalW format</option>
+            <option value="stockholm" selected="False">Output
+            alignment in Stockholm format</option>
+            <option value="pp" selected="False">Output
+            alignment in LocARNA's PP 2.0 format</option>
+        </param>
+        
+        <param name="stdout_verbosity" type="select" label="Standard output verbosity">
+            <option value="--quiet">Don't report standard
+            output</option>
+            <option value="">Non verbose</option>
+            <option value="--verbose">Verbose</option>
+        </param>
+               
+        <section name="Scoring" title="Scoring parameters">
+            <expand macro="common_scoring_parameters" />
+        </section>
+        
+        <section name="Folding" title="RNA folding parameters">
+            <expand macro="common_folding_parameters" />
+            <expand macro="alifold_consensus_parameter" />
+            <param name="consensus_structure" type="select" label="Consensus structure type"
+                   help="Type of consensus structures written to screen and stockholm output"
+                   >
+                <!-- <option value="mea">mea</option>-->
+                <option value="none">none</option>
+                <option value="alifold">alifold</option>
+            </param>
+        </section>
+
+        <section name="Heuristics" title="Heuristic parameters">
+            <expand macro="common_heuristic_parameters" />
+        </section>
+
+        <section name="Constraint" title="Constraint parameters">
+            <expand macro="constraints" />
+        </section>
+    </inputs>
+    
+    <outputs>
+        <data format="txt" name="stdout" label="${tool.name} std out on ${on_string}">
+            <filter>stdout_verbosity != '--quiet'</filter>
+        </data>
+        <data format="clustal" name="clustal"
+              label="${tool.name} alignment (annotated clustal) on ${on_string}">
+            <filter>'clustal' in outputs</filter>
+        </data>
+        <data format="clustal" name="clustal_strict" 
+              label="${tool.name} alignment (clustal) on ${on_string}">
+            <filter>'clustal_strict' in outputs</filter>
+        </data>
+        <data format="stockholm" name="stockholm"
+              label="${tool.name} alignment (stockholm) on ${on_string}">
+            <filter>'stockholm' in outputs</filter>
+        </data>
+        <data format="txt" name="pp"
+              label="${tool.name} alignment (PP 2.0) on ${on_string}">
+            <filter>'pp' in outputs</filter>
+        </data>
+    </outputs>
+    
+    <tests>
+        <test>
+            <param name="inputA" value="tRNA_2-1.fa" />
+            <param name="inputB" value="tRNA_2-2.fa" />
+            <param name="outputs" value="clustal" />
+            <output name="clustal" file="tRNA_2.aln" />
+        </test>
+    </tests>
+
+    <help><![CDATA[ **LocARNA -- Pairwise alignment of RNAs**
+
+Pairwise RNA alignment tools of the LocARNA suite (locarna,
+sparse). These tools perform variants of simultaneous RNA folding and
+alignment. They can be adapted to specific needs by a broad range of
+parameters:
+
+* *scoring* of the alignment, e.g. influencing the cost of
+  insertions/deletions and the weight of sequence vs. structure
+  similarity.
+
+* *RNA folding*, which control the secondary RNA structure prediciton.
+
+* *heuristics*, which trade alignment accuracy vs. computation
+  speed. The huge complexity of simultaneous alignment and folding
+  generally requires some heuristics for reasonable computation times.
+  Some alignment instances and alignment modes will require relaxation
+  of the default heuristics; in particular, local, constrained, and free end gap
+  alignment, will often require turning off the "maximal difference for
+  alignment traces" heuristic.
+  
+* *constraints*, which can be applied to include prior knowledge to
+  improve the quality of results and/or speed of computation.
+
+**Input.**
+
+Input consists of two sequences or alignments, which are specified in
+fasta, clustal, stockholm, or LocARNA pp format.
+
+Optionally, one can specify structure and anchor constraints in these
+input files.
+
+**Output.**
+
+The final pairwise alignment is reported in standard and/or variants of the
+clustal and stockholm format, as well as LocARNA's own pp format.
+    
+For more information, see     
+.. __: http://www.bioinf.uni-freiburg.de/Software/LocARNA/
+    ]]></help>
+
+    <expand macro="citations" />
+    
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,178 @@
+<macros>
+    <token name="@VERSION@">1.9.0</token>
+
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@VERSION@">locarna</requirement>
+        </requirements>
+    </xml>
+
+    <xml name="stdio">
+        <stdio>
+            <exit_code range="1:" />
+        </stdio>
+    </xml>
+
+    <xml name="version">
+        <version_command>
+            <![CDATA[
+                     mlocarna --version
+            ]]>
+        </version_command>
+    </xml>
+
+    <xml name="bed_anchors">
+        <conditional name="bed_anchors">
+            <param name="bed_anchors_selector" type="select" label="Anchor constraints"
+                   help="Anchor constraints in bed format specify positions of
+                             named anchor regions per sequence. The sequence names
+                             ('contig' names have to correspond to the fasta input
+                             sequence names. Anchor names must be unique per sequence
+                             and regions of the same name for different sequences
+                             must have the same length. This constrains the alignment
+                             to align all regions of the same name.">
+                <option value="no">Don't load anchor constraints from bed file</option> 
+                <option value="yes">Load anchor constraints from bed file</option> 
+            </param>
+            <when value="no" />
+            <when value="yes">
+                <param name="bed_anchors_file" type="data" format="tabular" 
+                       label="Anchor constraint specification in bed format"
+                       />
+            </when>
+        </conditional>
+    </xml>
+    
+    <xml name="common_scoring_parameters">
+        <param name="struct_weight" argument="struct-weight"
+               label="Structure weight" type="integer" 
+               value="200" min="0" max="800" />
+        <param name="indel_opening" argument="indel-opening"
+               label="Indel opening score" type="integer"
+               value="-500" max="0" min="-1500" />
+        <param argument="indel" label="Indel score" type="integer" 
+               value="-350" min="-1000" max="0" />
+        <param argument="tau" type="integer" value="50"
+               min="0" max="200"
+               label="Sequence contribution at structure match in percent"/> 
+
+        <conditional name="sequence_score">
+            <param name="sequence_score_selector" type="select" label="Type of sequence score contribution">
+                <option value="ribofit">Use ribofit</option>
+                <option value="ribosum">Use RIBOSUM85_60</option>
+                <option value="match">Simple match/mismatch costs</option>
+            </param>
+            <when value="ribofit" />
+            <when value="ribosum" />
+            <when value="match">
+                <param name="match" type="integer" value="50" 
+                       min="0" max="400"
+                       label="Match score" />
+                <param name="mismatch" type="integer" value="0" 
+                       min="-400" max="0"
+                       label="Mismatch score" />
+            </when>
+        </conditional>
+    </xml>
+
+    <xml name="plfolding_parameters">
+        <param name="plfold_span" argument="--plfold-span" 
+               type="integer" value="150" min="-1" max="400" 
+               label="Maximum basepair span by RNAplfold (local folding); -1 for global folding" />
+        
+        <param name="plfold_winsize" argument="--plfold-winsize"
+               type="integer" value="300"  min="-1" max="800" 
+               label="Window size for local folding" />
+    </xml>
+    
+    <xml name="common_folding_parameters">
+        <param name="rnafold_temperature" argument="rnafold-temperature"
+               type="float" value="37.0" min="10" max="50"
+               label="Temperature for RNAfold (RNAfold's -T option)" />
+    </xml>
+
+    <xml name="common_heuristic_parameters">
+        <param  name="min_prob" argument="min-prob" type="float" value="0.0005" 
+                min="0.0" max="0.2"
+                label="Minimal / cutoff probability" /> 
+
+        <param  name="max_diff_am" argument="max-diff-am" 
+                type="integer" value="30" 
+                min="-1" max="300"
+                label="Maximal difference for sizes of matched arcs (-1=off)" /> 
+
+        <param  name="max_diff" argument="max-diff" type="integer"
+                value="60" min="-1" max="300"
+                label="Maximal difference for alignment traces (-1=off)" /> 
+
+        <param  name="max_diff_at_am" argument="max-diff-am" type="integer" 
+                value="-1" min="-1" max="300"
+                label="Maximal difference for alignment traces, only at arc match positions" /> 
+        
+        <param  name="max_bps_length_ratio" argument="max-bps-length-ratio"
+                type="float" value="0.0" min="0.0" max="1.0" 
+                label="Maximal ratio of #base pairs divided by sequence length (default: no effect)" /> 
+    </xml>
+
+    <xml name="alifold_consensus_parameter">
+        <param  name="alifold_consensus_dp" argument="alifold-consensus-dp" 
+                type="boolean" checked="false" 
+                truevalue="--alifold-consensus-dp" falsevalue=""
+                label="Compute consensus dot plot by alifold" />
+    </xml>
+    
+    <xml name="constraints">
+        <param name="lonely_pairs" type="boolean" truevalue="--LP" falsevalue="--noLP" 
+               checked="false" label="Allow lonely base-pairs" help="(--LP/--noLP)" />
+        <param name="maxBPspan" argument="--maxBPspan" 
+               type="integer" value="-1" min="-1" max="400" 
+               label="Maximum basepair span by RNAfold; -1 for arbitrary span" />
+        <param name="ignore_constraints" argument="ignore-constraints"
+               type="boolean" checked="false" truevalue="--ignore-constraints" falsevalue=""
+               help="Ignore all anchor and structure constraints given
+                     in the fasta(-ish) input." />
+    </xml>
+
+    <xml name="common_other_parameters">
+    </xml>
+
+    <xml name="common_outputs">
+        <data format="txt" name="stdout" label="${tool.name} std out on ${on_string}">
+            <filter>stdout_verbosity != '--quiet'</filter>
+        </data>
+        <data format="clustal" name="clustal" from_work_dir="mlocarna_results/results/result.aln"
+              label="${tool.name} alignment (annotated clustal) on ${on_string}">
+            <filter>'clustal' in outputs</filter>
+        </data>
+        <data format="clustal" name="clustal_strict" 
+              from_work_dir="mlocarna_results/results/result.strict-aln"
+              label="${tool.name} alignment (clustal) on ${on_string}">
+            <filter>'clustal_strict' in outputs</filter>
+        </data>
+        <data format="stockholm" name="stockholm" from_work_dir="mlocarna_results/results/result.stk"
+              label="${tool.name} alignment (stockholm) on ${on_string}">
+            <filter>'stockholm' in outputs</filter>
+        </data>
+        <data format="txt" name="pp"
+              from_work_dir="mlocarna_results/results/result.pp"
+              label="${tool.name} alignment (PP 2.0) on ${on_string}">
+            <filter>'pp' in outputs</filter>
+        </data>
+        <data format="tar.gz" name="mlocarna_results_tgz"
+              label="${tool.name} results archive on ${on_string}">
+            <filter>'mlocarna_results' in outputs</filter>
+        </data>
+    </xml>
+
+    <xml name="citations">
+        <citations>
+            <citation
+            type="doi">10.1371/journal.pcbi.0030065</citation>
+            <citation type="doi">10.1261/rna.029041.111</citation>
+        </citations>
+    </xml>
+
+
+
+</macros>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/archaea-default.stdout	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,18 @@
+mLocARNA --- multiple Local (and global) Alignment of RNA --- LocARNA 1.9.0
+Copyright Sebastian Will
+
+Compute pair probs ...
+Compute pairwise alignments ... 
+Perform progressive alignment ...
+
+
+
+vhuU               AG-CUCACAACCGAACCC-AU------------UUGGGAGGUUGUGAGCU-
+fwdB               AU-GUUGGAGGGGAACCC-GU------------AAGGGACCCUCCAAGAU-
+selD               UUACGAUGUGCCGAACCCUUU------------AAGGGAGGCACAUCGAAA
+hdrA               GG--CACCACUCGAAGGC--U------------AAGCCAAAGUGGUG-CU-
+vhuD               GU--UCUCUCGGGAACCCGUC------------AAGGGACCGAGAGA-AC-
+fruA               ---CCUCGAGGGGAACCC-GA------------AAGGGACCCGAGAGG---
+fdhA               CG-CCACCCUGCGAACCCAAUAUAAAAUAAUACAAGGGAGCAG-GUGGCG-
+
+alifold            ((.(((((((((...(((.................))).))))))))))). (-31.59 = -20.01 + -11.58)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/archaea-probabilistic.aln	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,11 @@
+CLUSTAL W --- LocARNA 1.9.0
+
+
+
+selD               UUACGAUGUGCCGAACCCUU------------UAAGGGAGGCACAUCGAAA
+vhuU               AGC-UCACAACCGAACCCAU-------------UUGGGAGGUUGUGAG-CU
+fwdB               AUG-UUGGAGGGGAACCCGU-------------AAGGGACCCUCCAAG-AU
+hdrA               GGC-ACC-ACUCGAAGGCU--------------AAGCCAAAGU-GGUG-CU
+vhuD               GUU-CUC-UCGGGAACCCGU------------CAAGGGACCGA-GAGA-AC
+fdhA               CGC-CACCCUGCGAACCCAAUAUAAAAUAAUACAAGGGAGCAG-GUGG-CG
+fruA               CC-UCG--AGGGGAACCCGA-------------AAGGGACCC--GAGA-GG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/archaea.fa	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,14 @@
+>fruA
+CCUCGAGGGGAACCCGAAAGGGACCCGAGAGG
+>fdhA
+CGCCACCCUGCGAACCCAAUAUAAAAUAAUACAAGGGAGCAGGUGGCG
+>vhuU
+AGCUCACAACCGAACCCAUUUGGGAGGUUGUGAGCU
+>hdrA
+GGCACCACUCGAAGGCUAAGCCAAAGUGGUGCU
+>vhuD
+GUUCUCUCGGGAACCCGUCAAGGGACCGAGAGAAC
+>selD
+UUACGAUGUGCCGAACCCUUUAAGGGAGGCACAUCGAAA
+>fwdB
+AUGUUGGAGGGGAACCCGUAAGGGACCCUCCAAGAU
Binary file test-data/archaea.tar.gz has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/archaea_relplot.scr	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,137 @@
+pdf("/tmp/tmp5yxSuG/files/000/dataset_2.dat",width=12,height=4,version="1.4")
+
+rel    <- read.table("mlocarna_results/results/result.bmreliability");
+seqrel <- rel[[2]]
+strrel <- rel[[3]]
+
+if ("" != "") {
+  seq <- ""
+  seq <- strsplit(seq,split="")
+  tab <- unlist(seq)!="-"
+
+  seqrel<-seqrel[tab]
+  strrel<-strrel[tab]
+}
+
+len<-length(seqrel)
+
+if (0) {
+  seqrel<-seqrel[len:1]
+  strrel<-strrel[len:1]
+}
+
+
+
+if (1) {
+  seqrel <- seqrel/1.0
+}
+
+
+totalrel <- seqrel+strrel;
+
+anno_space<-0.075
+
+maxy <- max(c(1,totalrel))+anno_space*(0+1);
+
+
+firstpos <- 1
+lastpos  <- 1+len-1
+
+if (0) {
+  the_xlim <- c(lastpos,firstpos)
+} else {
+  the_xlim <- c(firstpos,lastpos)
+}
+
+# set margin
+# b, l, t, r
+par(mar=c(6,2.5,1,1))
+
+# open plot (and draw threshold)
+plot(c(0),c(0),type="l",                                        
+     xlab="",ylab="",
+     xlim=the_xlim,ylim=c(0,maxy),
+     yaxp=c(0,1,2))
+
+## title inside of plot
+legend("topleft","",bty="n")
+
+
+# total reliability
+polygon(c(firstpos,firstpos:lastpos,lastpos),c(0,totalrel,0),col=rgb(0.8,0.8,0.9,0.5),lwd=2,border=FALSE)
+lines(firstpos:lastpos,totalrel,col="blue",lwd=2)
+
+# plot structure reliability
+polygon(c(firstpos,firstpos:lastpos,lastpos),c(0,strrel,0),col=rgb(0.3,0.3,0.5,0.8),lwd=1,border=FALSE)
+
+
+## draw other signals
+signals<-c();
+signal_sizes<-c();
+
+signal_starts <- 1:0
+
+signal_starts[1]<-1;
+if (0>1) {
+  for (i in 2:0) {
+    signal_starts[i]<-signal_starts[i-1]+signal_sizes[i-1]*2+1;
+  }
+}
+
+colors <- c(
+    rgb(0.6,0.1,0.1,0.9),
+    rgb(0.6,0.6,0.1,0.9),
+    rgb(0.1,0.6,0.6,0.9),
+    rgb(0.6,0.1,0.6,0.9)
+);
+colors<-c(colors,colors);
+
+if (0>0) {
+  
+  for (i in 1:0) {
+    orientation <- signals[signal_starts[i]+signal_sizes[i]*2];
+    sig_y  <- maxy-i*anno_space;
+    
+    for (j in 0:(signal_sizes[i]-1)) {
+
+      sig_x <- c(signals[signal_starts[i]+j*2],signals[signal_starts[i]+j*2+1]);
+          
+      ## draw arrows
+      if (orientation!=0) {
+        the_code <- 1+(orientation+1)/2;
+        arrows(sig_x[1],sig_y,sig_x[2],sig_y,lwd=4,col=colors[i],code=the_code,angle=20,length=0.15);
+      } else {
+        lines(sig_x,c(sig_y,sig_y),lwd=4,col=colors[i]);
+      }
+    }
+  }
+}
+
+#draw inferred on-signal
+hit_color <- rgb(0.1,0.6,0.1,0.9)
+  
+if (0!=1) {
+  
+  on  <- c(0,4,33,44,49);
+  off <- c(3,20,43,48,51);
+
+  if (length(on)>0) {
+    for (i in 1:length(on)) {
+      lines(c(1+on[i],1+off[i]-1),c(maxy,maxy),lwd=7,col=hit_color);
+    }
+  }
+
+  ### draw on/off values
+  if (0) {
+    lines(c(1,1+len),c(0.0355791,0.0355791),lty=2,lwd=1)
+    lines(c(1,1+len),c(0.702675,0.702675),lty=2,lwd=1)
+  }
+}
+
+
+signal_names<-c();
+
+if (length(signal_names)>0 || (0!=1)) {
+  legend("bottom",c("LocARNA",signal_names),lwd=7,col=c(hit_color,colors),horiz=TRUE,inset=-0.4);
+  # ,xpd=TRUE
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/haca.snoRNA-default.stdout	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,33 @@
+mLocARNA --- multiple Local (and global) Alignment of RNA --- LocARNA 1.9.0
+Copyright Sebastian Will
+
+Compute pair probs ...
+Compute pairwise alignments ... 
+Perform progressive alignment ...
+
+
+
+ACA7               ACCUCCUGGGAUCGCAUCUGG-AGAGUGC---CUAGUAUUCUGCCAGCUUCGGAA-AGGG
+ACA30              UGGCACUUUCACAG--UUCCU-UCCCCAG---GCAGUGGGGCCAGGAUUUGGUAGCUGGU
+ACA5               UGCAGCCGUGUCAAAUUCAGUACCUGUCCUAUGCAUGGUAGGCACUGGCCCAGAA--GGC
+ACA59              GCCCAGGGUAUGUUCACGGGGCGAUGCUGCCCUCCCAGCUGG-CCCAUGGGUGAC--CCU
+#A1                ............................................................
+#A2                ............................................................
+
+ACA7               AGGGAAAGCAAGCCUGGCAGAG-GCACCCAUUCCAUUCCCAGCUUGCUCCGUAGCUGGCG
+ACA30              GCUGAGAGAAAAC---CC-UUG---AUUGUAUUCUUGCCCUGGG---AUUAUACCAGUGG
+ACA5               UGCCACAGAAACAC--UGUGAC-UCAUGG-----GCCCUGUUCCUGUGUCCCAGGCUCAG
+ACA59              GGGAACAUUAACUGCCUCACAACGUUUGUGCCUCAGUUACCCGUAGAUGUAGUGAGGGUA
+#A1                ....AAAAAA..................................................
+#A2                ....123456..................................................
+
+ACA7               AUUGGA--AGA---CACU-CUGCG-----ACA
+ACA30              CAACUG--UCA---CUCA-AUGGG-----ACA
+ACA5               GGAUAA--AUU---UGGU-UACAG-----ACA
+ACA59              ACAAUACUUACUCUCGUUGGUGAUAAGGAACA
+#A1                .............................BBB
+#A2                .............................123
+
+alifold            .((((((((........((((.(((((((......))))))).))))......))..)))
+                   ))).............((((((.....((.....((((((((((((.....)))))))))
+                   )))......)).....)).))))......... (-61.69 = -33.85 + -27.84)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/haca.snoRNA.fa	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,21 @@
+>ACA59
+GCCCAGGGUAUGUUCACGGGGCGAUGCUGCCCUCCCAGCUGGCCCAUGGGUGACCCUGGGAACAUUAACUGCCUCACAACGUUUGUGCCUCAGUUACCCGUAGAUGUAGUGAGGGUAACAAUACUUACUCUCGUUGGUGAUAAGGAACA
+.............................................................xxxxxx...............................................................................xxx #S
+.............................................................AAAAAA...............................................................................BBB #1
+.............................................................123456...............................................................................123 #2
+
+>ACA7
+ACCUCCUGGGAUCGCAUCUGGAGAGUGCCUAGUAUUCUGCCAGCUUCGGAAAGGGAGGGAAAGCAAGCCUGGCAGAGGCACCCAUUCCAUUCCCAGCUUGCUCCGUAGCUGGCGAUUGGAAGACACUCUGCGACA
+...........................................................xxxxxx...................................................................xxx #S
+...........................................................AAAAAA...................................................................BBB #1
+...........................................................123456...................................................................123 #2
+>ACA5
+UGCAGCCGUGUCAAAUUCAGUACCUGUCCUAUGCAUGGUAGGCACUGGCCCAGAAGGCUGCCACAGAAACACUGUGACUCAUGGGCCCUGUUCCUGUGUCCCAGGCUCAGGGAUAAAUUUGGUUACAGACA
+..............................................................xxxxxx............................................................xxx #S
+..............................................................AAAAAA............................................................BBB #1
+..............................................................123456............................................................123 #2
+>ACA30
+UGGCACUUUCACAGUUCCUUCCCCAGGCAGUGGGGCCAGGAUUUGGUAGCUGGUGCUGAGAGAAAACCCUUGAUUGUAUUCUUGCCCUGGGAUUAUACCAGUGGCAACUGUCACUCAAUGGGACA
+..........................................................xxxxxx..........................................................xxx #S
+..........................................................AAAAAA..........................................................BBB #1
+..........................................................123456..........................................................123 #2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/haca.snoRNA_anchor.bed	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,8 @@
+ACA59	61	67	ANANNA
+ACA7	59	65	ANANNA
+ACA5	62	68	ANANNA
+ACA30	58	64	ANANNA
+ACA59	146	149	ACA
+ACA7	132	135	ACA
+ACA5	128	131	ACA
+ACA30	122	125	ACA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/tRNA_2-1.fa	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,2 @@
+>D10744
+GGAAAAUUGAUCAUCGGCAAGAUAAGUUAUUUACUAAAUAAUAGGAUUUAAUAACCUGGUGAGUUCGAAUCUCACAUUUUCCG
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/tRNA_2-2.fa	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,2 @@
+>AF008220
+GGAGGAUUAGCUCAGCUGGGAGAGCAUCUGCCUUACAAGCAGAGGGUCGGCGGUUCGAGCCCGUCAUCCUCCA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/tRNA_2.aln	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,7 @@
+CLUSTAL W --- LocARNA 1.9.0 --- Score: 2875
+
+D10744             GGAAAAUU-GAUCAUCGGCAAGAUAAGUUAUUUACUAAAUAAUAGGAUUUAAUAACCUGG
+AF008220           GGAGGAUUAGCUCAGCUGGGAGAGCAUCUGCCUUACAAGCAGAGGG-----------UCG
+
+D10744             UGAGUUCGAAUCUCACAUUUUCCG
+AF008220           GCGGUUCGAGCCCGUCAUCCUCCA
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/tRNA_5.fa	Wed Dec 28 18:48:14 2016 -0500
@@ -0,0 +1,10 @@
+>D10744
+GGAAAAUUGAUCAUCGGCAAGAUAAGUUAUUUACUAAAUAAUAGGAUUUAAUAACCUGGUGAGUUCGAAUCUCACAUUUUCCG
+>AF008220
+GGAGGAUUAGCUCAGCUGGGAGAGCAUCUGCCUUACAAGCAGAGGGUCGGCGGUUCGAGCCCGUCAUCCUCCA
+>Z11880
+GCCUUCCUAGCUCAGUGGUAGAGCGCACGGCUUUUAACCGUGUGGUCGUGGGUUCGAUCCCCACGGAAGGCG
+>X02172
+GCCUUUAUAGCUUAGUGGUAAAGCGAUAAACUGAAGAUUUAUUUACAUGUAGUUCGAUUCUCAUUAAGGGCA
+>M68929
+GCGGAUAUAACUUAGGGGUUAAAGUUGCAGAUUGUGGCUCUGAAAACACGGGUUCGAAUCCCGUUAUUCGCC