changeset 0:6cce721f568c draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sfold commit 41456127d154f251438945210c2513601bd21ceb
author iuc
date Wed, 27 Nov 2024 13:22:29 +0000
parents
children
files macros.xml sfold.xml test-data/cons.ct test-data/mfe.ct test-data/seq.fasta
diffstat 5 files changed, 507 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Wed Nov 27 13:22:29 2024 +0000
@@ -0,0 +1,13 @@
+<macros>
+    <token name="@TOOL_VERSION@">2.2.0</token>
+    <token name="@VERSION_SUFFIX@">0</token>
+    <token name="@PROFILE@">23.0</token>
+    <xml name="requirements">
+        <requirement type="package" version="2.2">sfold</requirement>
+    </xml>
+    <xml name="citations">
+    <citations>        
+        <citation type="doi">10.1093/nar/gkh449</citation>
+    </citations>
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sfold.xml	Wed Nov 27 13:22:29 2024 +0000
@@ -0,0 +1,335 @@
+<tool id="sfold" name="Sfold" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
+    <description>Prediction of  RNA secondary structures through structure ensemble sampling</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <requirements>
+        <expand macro="requirements"/>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        #if not $non_commercial_use
+            >&2 echo "this tool is only available for non commercial use";
+            exit 1;
+        #end if
+        mkdir -p 'output' &&
+        sfold '$fasta'
+            -a $a
+            #if $f: 
+                -f '$f'
+            #end if
+            #if str($l) != '':
+                -l $l
+            #end if
+            #if $m: 
+                -m '$m'
+            #end if
+            -w $w
+            -i $i
+    ]]></command>
+    <inputs>
+        <param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False">
+            <validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator>
+        </param>
+        <param argument="fasta" type="data" format="fasta" label="FASTA input"/>
+        <param argument="-a" type="boolean" truevalue="1" falsevalue="0" checked="true" label="Run clustering on the sampled ensemble?"/>
+        <param argument="-f" type="data" format="ct" optional="true" label="Constrain data" help="Constraint syntax follows what is used in mfold 3.1"/>
+        <param argument="-l" type="integer" min="0" optional="true" label="Maximum distance between paired bases"/>
+        <param argument="-m" type="data" format="ct" optional="true" label="MFE structure" help="If provided, Sfold clustering module will determine the cluster to which this structure belongs."/>
+        <param argument="-w" type="integer" value="20" label="Length of antisense oligos"/>
+        <param argument="-i" type="select" label="Module">
+            <option value="0">None</option>
+            <option value="1">Sirna</option>
+            <option value="2">Soligo</option>
+            <option value="3">Both</option>
+        </param>
+        <param name="output_selector" type="select" multiple="true" optional="true" display="checkboxes" label="Output options">
+            <option value="ct" selected="true">Output ct files</option>
+            <option value="bp" selected="true">Output bp files</option>
+            <option value="clusters">Output cluster files</option>
+        </param>
+    </inputs>
+    <outputs>
+        <collection name="sfold_out" type="list" label="${tool.name} on ${on_string}: sfold log files">
+            <discover_datasets pattern="(?P&lt;name&gt;.+)\.out$" format="txt" directory="output/"/>
+        </collection>
+        <collection name="sfold_bp" type="list" label="${tool.name} on ${on_string}: sfold bp files">
+            <discover_datasets pattern="(?P&lt;name&gt;.+)\.bp$" format="txt" directory="output/"/>
+            <filter>'bp' in output_selector</filter>
+        </collection>
+        <collection name="sfold_ct" type="list" label="${tool.name} on ${on_string}: sfold ct files">
+            <discover_datasets pattern="(?P&lt;name&gt;.+)\.ct$" format="ct" directory="output/"/>
+            <filter>'ct' in output_selector</filter>
+        </collection>
+        <collection name="sfold_cluster_out" type="list" label="${tool.name} on ${on_string}: sfold cluster log files">
+            <discover_datasets pattern="(?P&lt;name&gt;.+)\.out$" format="txt" directory="output/clusters"/>
+            <discover_datasets pattern="(?P&lt;name&gt;.+)\.list$" format="txt" directory="output/clusters"/>
+            <filter>'clusters' in output_selector</filter>
+        </collection>
+        <collection name="sfold_cluster_bp" type="list" label="${tool.name} on ${on_string}: sfold cluster bp files">
+            <discover_datasets pattern="(?P&lt;name&gt;.+)\.bp$" format="txt" directory="output/clusters"/>
+            <filter>'clusters' in output_selector and 'bp' in output_selector</filter>
+        </collection>
+        <collection name="sfold_cluster_ct" type="list" label="${tool.name} on ${on_string}: sfold cluster ct files">
+            <discover_datasets pattern="(?P&lt;name&gt;.+)\.ct$" format="ct" directory="output/clusters"/>
+            <filter>'clusters' in output_selector and 'ct' in output_selector</filter>
+        </collection>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="6">
+            <param name="non_commercial_use" value="true"/>
+            <param name="fasta" value="seq.fasta"/>
+            <param name="a" value="true"/>
+            <param name="f" value="cons.ct"/>
+            <param name="l" value="30"/>
+            <param name="m" value="mfe.ct"/>
+            <param name="w" value="20"/>
+            <param name="i" value="1"/>
+            <param name="output_selector" value="ct,bp,clusters"/>
+            <output_collection name="sfold_out" type="list">
+                <element name="10structure">
+                    <assert_contents>
+                        <has_n_lines n="770"/>
+                        <has_text text="Structure        1     -28.90       0.74863E-01"/>
+                    </assert_contents>
+                </element>
+                <element name="10structure_2">
+                    <assert_contents>
+                        <has_n_lines n="10"/>
+                    </assert_contents>
+                </element>
+                <element name="bp.dist.from.ecentroid">
+                    <assert_contents>
+                        <has_n_lines n="1001"/>
+                        <has_text text="1 5"/>
+                    </assert_contents>
+                </element>
+                <element name="bp">
+                    <assert_contents>
+                        <has_text text="Structure            1"/>
+                    </assert_contents>
+                </element>
+                <element name="bprob">
+                    <assert_contents>
+                        <has_n_lines n="4"/>
+                        <has_text text=".16225072123690604808E+01L"/>
+                    </assert_contents>
+                </element>
+                <element name="cdf">
+                    <assert_contents>
+                        <has_n_lines n="101"/>
+                    </assert_contents>
+                </element>
+                <element name="fe">
+                    <assert_contents>
+                        <has_n_lines n="1000"/>
+                        <has_text text="1     -28.70"/>
+                    </assert_contents>
+                </element>
+                <element name="fe_init">
+                    <assert_contents>
+                        <has_n_lines n="1002"/>
+                        <has_text text="Ensemble free energy (based on initial energies):-RT ln(U)=  -28.297589224477537   "/>
+                    </assert_contents>
+                </element>
+                <element name="loopr">
+                    <assert_contents>
+                        <has_n_lines n="76"/>
+                    </assert_contents>
+                </element>
+                <element name="pdf">
+                    <assert_contents>
+                        <has_n_lines n="21"/>
+                    </assert_contents>
+                </element>
+                <element name="sample">
+                    <assert_contents>
+                        <has_n_lines n="1"/>
+                        <has_text text="Structure data in BP format removed to"/>
+                    </assert_contents>
+                </element>
+                <element name="sample_1000">
+                    <assert_contents>
+                        <has_text text="(i j k): helix formed by base pairs i-j, (i+1)-(j-1),...,(i+k-1)-(j-k+1)"/>
+                    </assert_contents>
+                </element>
+                <element name="sclass">
+                    <assert_contents>
+                        <has_text text="Sequence length            = 76"/>
+                    </assert_contents>
+                </element>
+                <element name="sfold">
+                    <assert_contents>
+                        <has_n_lines n="42"/>
+                        <has_text text="1 G"/>
+                    </assert_contents>
+                </element>
+                <element name="smfe">
+                    <assert_contents>
+                        <has_n_lines n="2"/>
+                        <has_text text="Minimum free energy in the sample (SMFE)=  -28.90 kcal/mol"/>
+                    </assert_contents>
+                </element>
+                <element name="sstrand">
+                    <assert_contents>
+                        <has_n_lines n="76"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
+            <output_collection name="sfold_bp" type="list">
+                <element name="ecentroid">
+                    <assert_contents>
+                        <has_text text="1 72"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
+            <output_collection name="sfold_ct" type="list">
+                <element name="ecentroid">
+                    <assert_contents>
+                        <has_n_lines n="78"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
+            <output_collection name="sfold_cluster_out" type="list">
+                <element name="c01.2dhist">
+                    <assert_contents>
+                        <has_text text="1"/>
+                    </assert_contents>
+                </element>
+                <element name="c01.bp.dist.from.ccentroid">
+                    <assert_contents>
+                        <has_text text="1"/>
+                    </assert_contents>
+                </element>
+                <element name="c01.bp">
+                    <assert_contents>
+                        <has_text text="Structure 1"/>
+                    </assert_contents>
+                </element>
+                <element name="c01.fe">
+                    <assert_contents>
+                        <has_text text=" 1"/>
+                    </assert_contents>
+                </element>
+                <element name="c02.2dhist">
+                    <assert_contents>
+                        <has_text text="72"/>
+                    </assert_contents>
+                </element>
+                <element name="c02.bp.dist.from.ccentroid">
+                    <assert_contents>
+                        <has_text text="1"/>
+                    </assert_contents>
+                </element>
+                <element name="c02.bp">
+                    <assert_contents>
+                        <has_text text="Structure 1"/>
+                    </assert_contents>
+                </element>
+                <element name="c02.fe">
+                    <assert_contents>
+                        <has_text text="10"/>
+                    </assert_contents>
+                </element>
+                <element name="ch.index">
+                    <assert_contents>
+                        <has_n_lines n="19"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
+            <output_collection name="sfold_cluster_bp" type="list">
+                <element name="c01.ccentroid">
+                    <assert_contents>
+                        <has_text text="1 72"/>
+                    </assert_contents>
+                </element>
+                <element name="c02.ccentroid">
+                    <assert_contents>
+                        <has_text text="Structure 1"/>
+                    </assert_contents>
+                </element>
+            </output_collection>
+            <output_collection name="sfold_cluster_ct" type="list">
+                    <element name="c01.ccentroid">
+                        <assert_contents>
+                            <has_n_lines n="78"/>
+                            <has_text text="Length:  76"/>
+                        </assert_contents>
+                    </element>
+                    <element name="c02.ccentroid">
+                        <assert_contents>
+                            <has_n_lines n="78"/>
+                            <has_text text="Length:  76"/>
+                        </assert_contents>
+                    </element>
+            </output_collection>
+        </test>
+        <test expect_num_outputs="4">
+            <param name="non_commercial_use" value="true"/>
+            <param name="fasta" value="seq.fasta"/>
+            <param name="a" value="true"/>
+            <param name="f" value="cons.ct"/>
+            <param name="l" value="30"/>
+            <param name="m" value="mfe.ct"/>
+            <param name="w" value="20"/>
+            <param name="i" value="1"/>
+            <param name="output_selector" value="bp,clusters"/>
+            <output_collection name="sfold_cluster_bp" type="list">
+                <element name="c01.ccentroid">
+                    <assert_contents>
+                        <has_text text="1 72"/>
+                    </assert_contents>
+                </element>
+                <element name="c02.ccentroid">
+                    <assert_contents>
+                        <has_text text="Structure 1"/>
+                        </assert_contents>
+                </element>
+            </output_collection>
+            <output_collection name="sfold_bp" type="list">
+                <element name="ecentroid">
+                    <assert_contents>
+                        <has_text text="1 72"/>
+                    </assert_contents>
+                </element>
+            </output_collection>    
+        </test>
+    </tests>
+    <help><![CDATA[
+Sfold is a software package for statistical folding and rational design of nucleic acids.
+
+It provides tools for predicting RNA secondary structures, designing antisense oligonucleotides, and analyzing RNA folding patterns. Sfold is widely used in academic research for studying
+RNA structure and function.
+
+Input Format
+
+-----------
+
+The program requires one input file of RNA sequence in FASTA format.
+
+Sfold options
+
+------------
+
+The program can run based on the clustering on the sampled ensemble or not.
+It can also predict the secondary structure based on the constraint and MFE structure files.
+The sfold has two different modules:
+
+* SiRNA : Target accessibility prediction and RNA duplex thermodynamics for rational siRNA design
+* Solig: Target accessibility prediction and rational design of antisense oligonucleotides and nucleic acid probes
+
+The program can be run based on the above-mentioned modules, both of them or none of them.
+
+Output Files
+
+------------
+
+The Sfold program generates 4 different types of output files. sfold.out and sclass.out in your output log files, save the general messages from standard output/error from which you can know if your Sfold run was successful. Most of the other
+files contain a header section that defines the formats and meanings of the data in the output.
+
+------------
+
+Important: The program usage is restricted to non-commercial and academic research.
+    ]]>
+    </help>
+    <expand macro="citations" />
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/cons.ct	Wed Nov 27 13:22:29 2024 +0000
@@ -0,0 +1,78 @@
+76	dG = -27.58 [Initially -28.90] test
+1	G	0	2	72	1
+2	G	1	3	71	2
+3	G	2	4	70	3
+4	G	3	5	69	4
+5	C	4	6	68	5
+6	U	5	7	67	6
+7	A	6	8	66	7
+8	U	7	9	0	8
+9	A	8	10	0	9
+10	G	9	11	25	10
+11	C	10	12	24	11
+12	U	11	13	23	12
+13	C	12	14	22	13
+14	A	13	15	0	14
+15	G	14	16	0	15
+16	C	15	17	0	16
+17	U	16	18	0	17
+18	G	17	19	0	18
+19	G	18	20	0	19
+20	G	19	21	0	20
+21	A	20	22	0	21
+22	G	21	23	13	22
+23	A	22	24	12	23
+24	G	23	25	11	24
+25	C	24	26	10	25
+26	G	25	27	0	26
+27	C	26	28	43	27
+28	U	27	29	42	28
+29	U	28	30	41	29
+30	G	29	31	40	30
+31	C	30	32	39	31
+32	A	31	33	38	32
+33	U	32	34	37	33
+34	G	33	35	0	34
+35	G	34	36	0	35
+36	C	35	37	0	36
+37	A	36	38	33	37
+38	U	37	39	32	38
+39	G	38	40	31	39
+40	C	39	41	30	40
+41	A	40	42	29	41
+42	A	41	43	28	42
+43	G	42	44	27	43
+44	A	43	45	0	44
+45	G	44	46	0	45
+46	G	45	47	0	46
+47	U	46	48	0	47
+48	C	47	49	0	48
+49	A	48	50	65	49
+50	G	49	51	64	50
+51	C	50	52	63	51
+52	G	51	53	62	52
+53	G	52	54	61	53
+54	U	53	55	0	54
+55	U	54	56	0	55
+56	C	55	57	0	56
+57	G	56	58	0	57
+58	A	57	59	0	58
+59	U	58	60	0	59
+60	C	59	61	0	60
+61	C	60	62	53	61
+62	C	61	63	52	62
+63	G	62	64	51	63
+64	C	63	65	50	64
+65	U	64	66	49	65
+66	U	65	67	7	66
+67	A	66	68	6	67
+68	G	67	69	5	68
+69	C	68	70	4	69
+70	U	69	71	3	70
+71	C	70	72	2	71
+72	C	71	73	1	72
+73	A	72	74	0	73
+74	C	73	75	0	74
+75	C	74	76	0	75
+76	A	75	0	0	76
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mfe.ct	Wed Nov 27 13:22:29 2024 +0000
@@ -0,0 +1,78 @@
+76	dG = -27.58 [Initially -28.90] test
+1	G	0	2	72	1
+2	G	1	3	71	2
+3	G	2	4	70	3
+4	G	3	5	69	4
+5	C	4	6	68	5
+6	U	5	7	67	6
+7	A	6	8	66	7
+8	U	7	9	0	8
+9	A	8	10	0	9
+10	G	9	11	25	10
+11	C	10	12	24	11
+12	U	11	13	23	12
+13	C	12	14	22	13
+14	A	13	15	0	14
+15	G	14	16	0	15
+16	C	15	17	0	16
+17	U	16	18	0	17
+18	G	17	19	0	18
+19	G	18	20	0	19
+20	G	19	21	0	20
+21	A	20	22	0	21
+22	G	21	23	13	22
+23	A	22	24	12	23
+24	G	23	25	11	24
+25	C	24	26	10	25
+26	G	25	27	0	26
+27	C	26	28	43	27
+28	U	27	29	42	28
+29	U	28	30	41	29
+30	G	29	31	40	30
+31	C	30	32	39	31
+32	A	31	33	38	32
+33	U	32	34	37	33
+34	G	33	35	0	34
+35	G	34	36	0	35
+36	C	35	37	0	36
+37	A	36	38	33	37
+38	U	37	39	32	38
+39	G	38	40	31	39
+40	C	39	41	30	40
+41	A	40	42	29	41
+42	A	41	43	28	42
+43	G	42	44	27	43
+44	A	43	45	0	44
+45	G	44	46	0	45
+46	G	45	47	0	46
+47	U	46	48	0	47
+48	C	47	49	0	48
+49	A	48	50	65	49
+50	G	49	51	64	50
+51	C	50	52	63	51
+52	G	51	53	62	52
+53	G	52	54	61	53
+54	U	53	55	0	54
+55	U	54	56	0	55
+56	C	55	57	0	56
+57	G	56	58	0	57
+58	A	57	59	0	58
+59	U	58	60	0	59
+60	C	59	61	0	60
+61	C	60	62	53	61
+62	C	61	63	52	62
+63	G	62	64	51	63
+64	C	63	65	50	64
+65	U	64	66	49	65
+66	U	65	67	7	66
+67	A	66	68	6	67
+68	G	67	69	5	68
+69	C	68	70	4	69
+70	U	69	71	3	70
+71	C	70	72	2	71
+72	C	71	73	1	72
+73	A	72	74	0	73
+74	C	73	75	0	74
+75	C	74	76	0	75
+76	A	75	0	0	76
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/seq.fasta	Wed Nov 27 13:22:29 2024 +0000
@@ -0,0 +1,3 @@
+>gi|395400|emb|X66515|ECTRALA E.coli tRNA-Ala
+GGGGCTATAGCTCAGCTGGGAGAGCGCTTGCATGGCATGCAAGAGGTCAGCGGTTCGATC
+CCGCTTAGCTCCACCA   
\ No newline at end of file