Previous changeset 2:f8aad74cc8c1 (2015-10-09) Next changeset 4:d9c2b2fde6a3 (2022-09-15) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/clustalw commit 31dd2ec1d105282421df5d6801c65cdcfd589f59 |
modified:
rgClustalw.xml |
added:
test-data/rgClustal_testin.dnd |
removed:
rgClustalw.py test-data/rgClustal_testout.log tool_dependencies.xml |
b |
diff -r f8aad74cc8c1 -r d6694932c5e0 rgClustalw.py --- a/rgClustalw.py Fri Oct 09 15:45:22 2015 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
@@ -1,60 +0,0 @@ -""" -rgclustalw.py -wrapper for clustalw necessitated by bad choice of output path for .dnd file based on input file. Naughty. -Copyright ross lazarus march 2011 -All rights reserved -Licensed under the LGPL -""" - -import sys,optparse,os,subprocess,tempfile,shutil - -class Clustrunner: - """ - """ - def __init__(self,opts=None): - self.opts = opts - self.iname = 'infile_copy' - shutil.copy(self.opts.input,self.iname) - - def run(self): - tlf = open(self.opts.outlog,'w') - cl = ['clustalw2 -INFILE=%s -OUTFILE=%s -OUTORDER=%s -TYPE=%s -OUTPUT=%s' % (self.iname,self.opts.output,self.opts.out_order,self.opts.dnarna,self.opts.outform)] - if self.opts.seq_range_end <> None and self.opts.seq_range_start <> None: - cl.append('-RANGE=%s,%s' % (self.opts.seq_range_start,self.opts.seq_range_end)) - if self.opts.outform=='CLUSTAL' and self.opts.outseqnos <> None: - cl.append('-SEQNOS=ON') - process = subprocess.Popen(' '.join(cl), shell=True, stderr=tlf, stdout=tlf) - rval = process.wait() - dndf = '%s.dnd' % self.iname - if os.path.exists(dndf): - tlf.write('\nClustal created the following dnd file for your information:\n') - dnds = open('%s.dnd' % self.iname,'r').readlines() - for row in dnds: - tlf.write(row) - tlf.write('\n') - tlf.close() - os.unlink(self.iname) - - - -if __name__ == "__main__": - op = optparse.OptionParser() - op.add_option('-i', '--input', default=None) - op.add_option('-o', '--output', default=None) - op.add_option('-t', '--outname', default="rgClustal") - op.add_option('-s', '--out_order', default='ALIGNMENT') - op.add_option('-f', '--outform', default='CLUSTAL') - op.add_option('-e', '--seq_range_end',default=None) - op.add_option('-b', '--seq_range_start',default=None) - op.add_option('-l','--outlog',default='rgClustalw.log') - op.add_option('-q', '--outseqnos',default=None) - op.add_option('-d', '--dnarna',default='DNA') - - opts, args = op.parse_args() - assert opts.input <> None - assert os.path.isfile(opts.input) - c = Clustrunner(opts) - c.run() - - - |
b |
diff -r f8aad74cc8c1 -r d6694932c5e0 rgClustalw.xml --- a/rgClustalw.xml Fri Oct 09 15:45:22 2015 -0400 +++ b/rgClustalw.xml Mon May 22 21:02:45 2017 -0400 |
[ |
b'@@ -1,133 +1,110 @@\n-<tool id="clustalw" name="ClustalW" version="0.1">\n- <requirements>\n- <requirement type="package" version="2.1">clustalw2</requirement>\n- </requirements>\n- <description>multiple sequence alignment program for DNA or proteins</description>\n- <command interpreter="python"> \n- rgClustalw.py -i "$input" -o "$output" -s "$out_order" -l "$outlog" -t "$outname" -d "$dnarna"\n- #if ($range.mode=="part")\n--b "$range.seq_range_start" -e "$range.seq_range_end"\n- #end if\n- #if ($outcontrol.outform=="clustal")\n--f "CLUSTAL"\n- #if ($outcontrol.out_seqnos=="ON")\n--q "ON"\n- #end if\n- #end if\n- #if ($outcontrol.outform=="phylip")\n--f "PHYLIP"\n- #end if\n- #if ($outcontrol.outform=="fasta")\n--f "FASTA"\n+<tool id="clustalw" name="ClustalW" version="2.1">\n+ <description>multiple sequence alignment program for DNA or proteins</description>\n+ <requirements>\n+ <requirement type="package" version="2.1">clustalw</requirement>\n+ </requirements>\n+ <command detect_errors="exit_code"><![CDATA[\n+ln -s \'$input\' input.fasta &&\n+clustalw2 -INFILE=input.fasta -OUTFILE=\'$output\' -OUTORDER=$out_order -TYPE=$dnarna\n+#if $outcontrol.outform == "clustal"\n+ -OUTPUT=CLUSTAL\n+ #if $outcontrol.out_seqnos == "ON"\n+ -SEQNOS=ON\n #end if\n- </command>\n- <inputs>\n- <page>\n- <param format="fasta" name="input" type="data" label="Fasta File" />\n- <param name="outname" label="Name for output files to make it easy to remember what you did" type="text" value="Clustal_run" />\n- <param name="dnarna" type="select" label="Data Type">\n- <option value="DNA" selected="True">DNA nucleotide sequences</option>\n- <option value="PROTEIN">Protein sequences</option>\n- </param>\n- <conditional name="outcontrol">\n- <param name="outform" type="select" label="Output alignment format">\n- <option value="clustal" selected="True">Native Clustal output format</option>\n- <option value="phylip">Phylip format</option>\n- <option value="fasta">Fasta format</option>\n- </param>\n- <when value="fasta" />\n- <when value="phylip" />\n- <when value="clustal">\n- <param name="out_seqnos" type="select" label="Show residue numbers in clustal format output">\n- <option value="ON">yes</option>\n- <option value="OFF" selected="true">no</option>\n- </param>\n- </when>\n- </conditional>\n- <param name="out_order" type="select" label="Output Order">\n- <option value="ALIGNED">aligned</option>\n- <option value="INPUT">same order as input file</option>\n- </param>\n-\n- <conditional name="range">\n- <param name="mode" type="select" label="Output complete alignment (or specify part to output)">\n- <option value="complete">complete alignment</option>\n- <option value="part">only part of the alignment</option>\n+#end if\n+#if $outcontrol.outform == "phylip"\n+ -OUTPUT=PHYLIP\n+#end if\n+#if $outcontrol.outform == "fasta"\n+ -OUTPUT=FASTA\n+#end if\n+#if $range.mode == "part"\n+ -RANGE=${range.seq_range_start},${range.seq_range_end}\n+#end if\n+ ]]></command>\n+ <inputs>\n+ <param name="input" type="data" format="fasta" label="FASTA file" />\n+ <param name="dnarna" type="select" label="Data type">\n+ <option value="DNA" selected="True">DNA nucleotide sequences</option>\n+ <option value="PROTEIN">Protein sequences</option>\n+ </param>\n+ <conditional name="outcontrol">\n+ <param name="outform" type="select" label="Output alignment format">\n+ <option value="clustal" selected="True">Native Clustal output format</option>\n+ <option value="phylip">PHYLIP format</option>\n+ <option value="fasta">FASTA format</option>\n+ </param>\n+ <when value="fasta" />\n+ <when value="phylip" />\n+ <when value="clustal">\n+ <param name="out_seqnos" type="boolean" t'..b' </param>\n+ <when value="complete" />\n+ <when value="part">\n+ <param name="seq_range_start" type="integer" value="1" label="Start point" help="Sequence range to write" />\n+ <param name="seq_range_end" type="integer" value="99999" label="End point" />\n+ </when>\n+ </conditional>\n+ </inputs>\n+ <outputs>\n+ <data name="output" format="clustal" label="${tool.name} on ${on_string}: ${outcontrol.outform}">\n+ <change_format>\n+ <when input="outcontrol.outform" value="phylip" format="phylip" />\n+ <when input="outcontrol.outform" value="fasta" format="fasta" />\n+ </change_format>\n+ </data>\n+ <data name="dnd" format="nhx" label="${tool.name} on ${on_string}: dnd" from_work_dir="input.dnd" />\n+ </outputs>\n+ <tests>\n+ <test>\n+ <param name="input" value="rgClustal_testin.fasta" />\n+ <param name="outform" value="fasta" />\n+ <param name="dnarna" value="DNA" />\n+ <param name="mode" value="complete" />\n+ <param name="out_order" value="ALIGNED" />\n+ <output name="output" file="rgClustal_testout.fasta" ftype="fasta" />\n+ <output name="dnd" file="rgClustal_testin.dnd" ftype="nhx" />\n+ </test>\n+ </tests>\n+ <help><![CDATA[\n **Note**\n \n-This tool allows you to run a multiple sequence alignment with ClustalW2 (see Clustsrc_) using the default options.\n- \n-For a tutorial introduction, see ClustalW2_\n+This tool allows you to run a multiple sequence alignment with ClustalW_ using the default options.\n \n-You can align DNA or protein sequences in the input file which should be multiple sequences to be aligned in a fasta file\n+You can align DNA or protein sequences in the input file which should be multiple sequences to be aligned in a FASTA file.\n \n-A log will be output to your history showing the output Clustal would normally write to standard output.\n-\n-The alignments will appear as a clustal format file or optionally, as phylip or fasta format files in your history. If you choose fasta as \n+The alignments will appear as a clustal format file or optionally, as PHYLIP or FASTA format files in your history. If you choose FASTA as\n the output format, you can create a \'Logo\' image using the Sequence Logo tool.\n \n-If Clustal format is chosen, you have the option of adding basepair counts to the output\n+If Clustal format is chosen, you have the option of adding basepair counts to the output.\n \n-A subsequence of the alignment can be output by setting the Output complete parameter to "Partial" and defining the offset and end of the subsequence to be output \n+A subsequence of the alignment can be output by setting the Output complete parameter to "Partial" and defining the offset and end of the subsequence to be output.\n \n ----\n \n **Attribution**\n \n-Clustal attribution and associated documentation are available at Clustsrc_\n-\n-The first iteration of this Galaxy wrapper was written by Hans-Rudolf Hotz - see Clustfirst_\n+The first iteration of this Galaxy wrapper was written by Hans-Rudolf Hotz.\n \n-It was modified by Ross Lazarus for the rgenetics project - tests and some additional parameters were added\n-\n-This wrapper is released licensed under the LGPL_\n+It was modified by Ross Lazarus for the rgenetics project - tests and some additional parameters were added.\n \n-.. _ClustalW2: http://www.ebi.ac.uk/2can/tutorials/protein/clustalw.html \n-\n-.. _Clustsrc: http://www.clustal.org\n+This wrapper is released licensed under the LGPL_.\n \n-.. _Clustfirst: http://lists.bx.psu.edu/pipermail/galaxy-dev/2010-November/003732.html\n+.. _ClustalW: http://www.clustal.org/clustal2/\n \n-.. _LGPL: http://www.gnu.org/copyleft/lesser.html\n-\n- </help>\n+.. _LGPL: https://www.gnu.org/copyleft/lesser.html\n+ ]]></help>\n <citations>\n <citation type="doi">10.1093/bioinformatics/btm404</citation>\n </citations>\n </tool>\n-\n' |
b |
diff -r f8aad74cc8c1 -r d6694932c5e0 test-data/rgClustal_testin.dnd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/rgClustal_testin.dnd Mon May 22 21:02:45 2017 -0400 |
b |
@@ -0,0 +1,31 @@ +( +( +c_briggsae-chrII_+_/43862-46313:0.07349, +c_brenneri-Cbre_Contig60_+_/627772-630087:0.04317) +:0.02387, +( +c_remanei-Crem_Contig172_-_/123228-124941:0.06114, +c_elegans-II_+_/9706834-9708803:0.07219) +:0.01779, +( +( +( +c_briggsae-chrIfooI_+_/43862-46313:0.10368, +c_brenneri-Cbre_Contig60gak_+_/627772-630087:0.06298) +:0.01654, +( +c_remanei-Crem_Contig172foo_-_/123228-124941:0.05765, +c_elegans-II_+_more/9706834-9708803:0.05902) +:0.06262) +:0.31533, +( +( +c_briggsae-chrII_+_bar/43862-46313:0.02327, +c_brenneri-Cbre_Contig60fee_+_/627772-630087:0.13463) +:0.05016, +( +c_remanei-Crem_Contig172zot_-_/123228-124941:0.11667, +c_elegans-II_+_meh/9706834-9708803:0.11737) +:0.12013) +:0.20951) +:0.30133); |
b |
diff -r f8aad74cc8c1 -r d6694932c5e0 test-data/rgClustal_testout.log --- a/test-data/rgClustal_testout.log Fri Oct 09 15:45:22 2015 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
@@ -1,144 +0,0 @@ - - - - CLUSTAL 2.1 Multiple Sequence Alignments - - -Sequence type explicitly set to DNA -Sequence format is Pearson -Sequence 1: c_briggsae-chrII_+_/43862-46313 60 bp -Sequence 2: c_remanei-Crem_Contig172_-_/123228-124941 60 bp -Sequence 3: c_brenneri-Cbre_Contig60_+_/627772-630087 60 bp -Sequence 4: c_elegans-II_+_/9706834-9708803 60 bp -Sequence 5: c_briggsae-chrIfooI_+_/43862-46313 60 bp -Sequence 6: c_remanei-Crem_Contig172foo_-_/123228-124941 60 bp -Sequence 7: c_brenneri-Cbre_Contig60gak_+_/627772-630087 60 bp -Sequence 8: c_elegans-II_+_more/9706834-9708803 60 bp -Sequence 9: c_briggsae-chrII_+_bar/43862-46313 60 bp -Sequence 10: c_remanei-Crem_Contig172zot_-_/123228-124941 60 bp -Sequence 11: c_brenneri-Cbre_Contig60fee_+_/627772-630087 60 bp -Sequence 12: c_elegans-II_+_meh/9706834-9708803 60 bp -Start of Pairwise alignments -Aligning... - -Sequences (1:2) Aligned. Score: 80 -Sequences (1:3) Aligned. Score: 88 -Sequences (1:4) Aligned. Score: 83 -Sequences (1:5) Aligned. Score: 21 -Sequences (1:6) Aligned. Score: 20 -Sequences (1:7) Aligned. Score: 23 -Sequences (1:8) Aligned. Score: 18 -Sequences (1:9) Aligned. Score: 21 -Sequences (1:10) Aligned. Score: 16 -Sequences (1:11) Aligned. Score: 25 -Sequences (1:12) Aligned. Score: 10 -Sequences (2:3) Aligned. Score: 85 -Sequences (2:4) Aligned. Score: 86 -Sequences (2:5) Aligned. Score: 21 -Sequences (2:6) Aligned. Score: 20 -Sequences (2:7) Aligned. Score: 25 -Sequences (2:8) Aligned. Score: 20 -Sequences (2:9) Aligned. Score: 36 -Sequences (2:10) Aligned. Score: 16 -Sequences (2:11) Aligned. Score: 22 -Sequences (2:12) Aligned. Score: 17 -Sequences (3:4) Aligned. Score: 85 -Sequences (3:5) Aligned. Score: 13 -Sequences (3:6) Aligned. Score: 20 -Sequences (3:7) Aligned. Score: 25 -Sequences (3:8) Aligned. Score: 20 -Sequences (3:9) Aligned. Score: 36 -Sequences (3:10) Aligned. Score: 16 -Sequences (3:11) Aligned. Score: 18 -Sequences (3:12) Aligned. Score: 25 -Sequences (4:5) Aligned. Score: 13 -Sequences (4:6) Aligned. Score: 11 -Sequences (4:7) Aligned. Score: 20 -Sequences (4:8) Aligned. Score: 10 -Sequences (4:9) Aligned. Score: 31 -Sequences (4:10) Aligned. Score: 17 -Sequences (4:11) Aligned. Score: 29 -Sequences (4:12) Aligned. Score: 14 -Sequences (5:6) Aligned. Score: 73 -Sequences (5:7) Aligned. Score: 83 -Sequences (5:8) Aligned. Score: 80 -Sequences (5:9) Aligned. Score: 31 -Sequences (5:10) Aligned. Score: 14 -Sequences (5:11) Aligned. Score: 14 -Sequences (5:12) Aligned. Score: 12 -Sequences (6:7) Aligned. Score: 80 -Sequences (6:8) Aligned. Score: 88 -Sequences (6:9) Aligned. Score: 26 -Sequences (6:10) Aligned. Score: 16 -Sequences (6:11) Aligned. Score: 25 -Sequences (6:12) Aligned. Score: 12 -Sequences (7:8) Aligned. Score: 78 -Sequences (7:9) Aligned. Score: 31 -Sequences (7:10) Aligned. Score: 10 -Sequences (7:11) Aligned. Score: 12 -Sequences (7:12) Aligned. Score: 12 -Sequences (8:9) Aligned. Score: 31 -Sequences (8:10) Aligned. Score: 10 -Sequences (8:11) Aligned. Score: 14 -Sequences (8:12) Aligned. Score: 12 -Sequences (9:10) Aligned. Score: 63 -Sequences (9:11) Aligned. Score: 84 -Sequences (9:12) Aligned. Score: 78 -Sequences (10:11) Aligned. Score: 64 -Sequences (10:12) Aligned. Score: 76 -Sequences (11:12) Aligned. Score: 46 -Guide tree file created: [infile_copy.dnd] - -There are 11 groups -Start of Multiple Alignment - -Aligning... -Group 1: Sequences: 2 Score:1045 -Group 2: Sequences: 2 Score:1016 -Group 3: Sequences: 4 Score:1001 -Group 4: Sequences: 2 Score:313 -Group 5: Sequences: 2 Score:731 -Group 6: Sequences: 4 Score:516 -Group 7: Sequences: 8 Score:344 -Group 8: Sequences: 2 Score:1016 -Group 9: Sequences: 2 Score:1054 -Group 10: Sequences: 4 Score:945 -Group 11: Sequences: 12 Score:380 -Alignment Score 6283 - -CLUSTAL-Alignment file created [/share/shared/galaxy/database/files/002/dataset_2801.dat] - - -Clustal created the following dnd file for your information: -( -( -c_briggsae-chrII_+_/43862-46313:0.07349, -c_brenneri-Cbre_Contig60_+_/627772-630087:0.04317) -:0.02387, -( -c_remanei-Crem_Contig172_-_/123228-124941:0.06114, -c_elegans-II_+_/9706834-9708803:0.07219) -:0.01779, -( -( -( -c_briggsae-chrIfooI_+_/43862-46313:0.10368, -c_brenneri-Cbre_Contig60gak_+_/627772-630087:0.06298) -:0.01654, -( -c_remanei-Crem_Contig172foo_-_/123228-124941:0.05765, -c_elegans-II_+_more/9706834-9708803:0.05902) -:0.06262) -:0.31533, -( -( -c_briggsae-chrII_+_bar/43862-46313:0.02327, -c_brenneri-Cbre_Contig60fee_+_/627772-630087:0.13463) -:0.05016, -( -c_remanei-Crem_Contig172zot_-_/123228-124941:0.11667, -c_elegans-II_+_meh/9706834-9708803:0.11737) -:0.12013) -:0.20951) -:0.30133); - |
b |
diff -r f8aad74cc8c1 -r d6694932c5e0 tool_dependencies.xml --- a/tool_dependencies.xml Fri Oct 09 15:45:22 2015 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <package name="clustalw2" version="2.1"> - <repository changeset_revision="09243d89e7a4" name="package_clustalw_2_1" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" /> - </package> -</tool_dependency> |