# HG changeset patch # User bgruening # Date 1382081717 14400 # Node ID 99435bb9072586b56c472e3f3298df5f60b2354b # Parent b942dfd8081909587d74e9ebc08bfe7a573f4a3f Uploaded diff -r b942dfd80819 -r 99435bb90725 antismash.xml --- a/antismash.xml Tue Oct 15 04:19:33 2013 -0400 +++ b/antismash.xml Fri Oct 18 03:35:17 2013 -0400 @@ -2,14 +2,18 @@ and Antibiotics Analysis (antiSMASH) hmmer + hmmer blast+ + blast+ muscle + muscle straight.plugin biopython pyquery helperlibs cssselect antismash + antismash #import os, glob @@ -24,7 +28,7 @@ ln -s $infile #echo 'input_tempfile.' + $file_extension#; mkdir -p $outputfolder; run_antismash.py - --cpus 4 + --cpus 12 --enable $types --input-type 'nucl' $smcogs @@ -33,11 +37,15 @@ $inclusive $full_hmmer $full_blast + $eukaryotic + #if str($pfam_database) != "None": --pfamdir $pfam_database.fields.path #end if + --debug + --disable-embl --outputfolder $outputfolder @@ -47,49 +55,63 @@ ##--from START Start analysis at nucleotide specified ##--to END - ; + 2>&1 + + ## ## shuffling files to create the correct outputs for Galaxy - + ## + ## html output - #if 'html' in str($outputs).split(','): - cp #echo os.path.join($outputfolder, 'index.html')# $html 2>/dev/null; - #end if + ; + cp #echo os.path.join($outputfolder, 'index.html')# $html 2> /dev/null ## gene clusters #if 'geneclusterprots_tabular' in str($outputs).split(','): - cp #echo os.path.join($outputfolder, 'geneclusters.txt')# $geneclusterprots_tabular 2>/dev/null; + ; + cp #echo os.path.join($outputfolder, 'geneclusters.txt')# $geneclusterprots_tabular 2> /dev/null #end if #if 'geneclusterprots_fasta' in str($outputs).split(','): - cp #echo os.path.join($outputfolder, '*_genecluster_proteins.fa')# $geneclusterprots_fasta 2>/dev/null; + ; + cp #echo os.path.join($outputfolder, '*_genecluster_proteins.fa')# $geneclusterprots_fasta 2> /dev/null #end if ##SVG images #if 'archive_svgs' in str($outputs).split(','): - cd #echo os.path.join($outputfolder, 'svg')#; + ; + cd #echo os.path.join($outputfolder, 'svg')# #if $clusterblast: - tar cfz $archive_svgs *_all.svg genecluster* 2>/dev/null; + ; + tar cfz $archive_svgs *_all.svg genecluster* 2> /dev/null #else: - tar cfz $archive_svgs genecluster*; + ; + tar cfz $archive_svgs genecluster* #end if #end if ##all files in a archive #if 'archive' in str($outputs).split(','): + ; cd $outputfolder; - tar cf $archive *.zip 2>/dev/null; + tar cf $archive *.zip 2> /dev/null #end if ## genbank #if 'gb' in str($outputs).split(','): - cat #echo os.path.join($outputfolder, '*.gbk')# > $genbank 2>/dev/null; + ; + cat #echo os.path.join($outputfolder, '*.gbk')# > $genbank 2> /dev/null #end if + + + + + @@ -146,10 +168,9 @@ - + - @@ -170,7 +191,9 @@ 'archive_svgs' in outputs + 'gb' in outputs @@ -217,5 +240,8 @@ http://antismash.secondarymetabolites.org/help.html + +Bjoern A. Gruening: https://github.com/bgruening/galaxytools/tree/master/antismash + diff -r b942dfd80819 -r 99435bb90725 src/genecluster_sequence/__init__.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/genecluster_sequence/__init__.py Fri Oct 18 03:35:17 2013 -0400 @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +""" + antiSMASH 2.0 output plugin to write all cluster proteins to a file (*_genecluster_proteins.fa) +""" +import logging +import textwrap +from os import path +from antismash import utils + +name = "genecluster_proteins" +short_description = "Ouptut gene clusters as FASTA sequences" +# Output plugins are sorted by priority, lower numbers get run first +priority = 9 + +def write(seq_records, options): + """Write all cluster proteins to a file + + Args: + seq_records (iterable): An iterable containing Bio.SeqRecords + options (argparse.Namespace): The options passed to the program + """ + basename = seq_records[0].id + output_name = path.join(options.outputfoldername, "%s_genecluster_proteins.fa" % basename) + logging.debug("Writing seq_records to %r" % output_name) + + with open(output_name, 'w+') as handle: + for seq_record in seq_records: + clusters = utils.get_cluster_features(seq_record) + for cluster in clusters: + clustertype = utils.get_cluster_type(cluster) + clusternr = utils.get_cluster_number(cluster) + for feature in utils.get_cluster_cds_features(cluster, seq_record): + qual = feature.qualifiers + fasta_header = '>%s:%s %s #%s - %s\n' % (qual['locus_tag'][0], qual['protein_id'][0], clustertype, clusternr, qual['product'][0]) + handle.write( fasta_header ) + handle.write( '%s\n' % '\n'.join( textwrap.wrap(qual['translation'][0], 60) ) ) diff -r b942dfd80819 -r 99435bb90725 tool_dependencies.xml --- a/tool_dependencies.xml Tue Oct 15 04:19:33 2013 -0400 +++ b/tool_dependencies.xml Fri Oct 18 03:35:17 2013 -0400 @@ -7,7 +7,7 @@ - + @@ -18,7 +18,10 @@ https://pypi.python.org/packages/source/h/helperlibs/helperlibs-0.1.2.tar.gz $INSTALL_DIR/lib/python - export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + + export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && + python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + $INSTALL_DIR/lib/python $INSTALL_DIR/bin @@ -35,7 +38,10 @@ https://pypi.python.org/packages/source/c/cssselect/cssselect-0.9.tar.gz $INSTALL_DIR/lib/python - export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + + export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && + python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + $INSTALL_DIR/lib/python $INSTALL_DIR/bin @@ -52,7 +58,10 @@ https://github.com/gawel/pyquery/archive/1.2.6.tar.gz $INSTALL_DIR/lib/python - export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + + export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && + python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + $INSTALL_DIR/lib/python $INSTALL_DIR/bin @@ -69,7 +78,10 @@ https://pypi.python.org/packages/source/s/straight.plugin/straight.plugin-1.4.0-post-1.tar.gz $INSTALL_DIR/lib/python - export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + + export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python && + python setup.py install --install-lib $INSTALL_DIR/lib/python --install-scripts $INSTALL_DIR/bin + $INSTALL_DIR/lib/python $INSTALL_DIR/bin @@ -83,8 +95,7 @@ - - + https://bitbucket.org/antismash/antismash2/downloads/antiSMASH2.0.2_macosx.zip @@ -109,10 +120,10 @@ --> sed -i 's/check_prereqs(plugins, options) > 0/False/g' $INSTALL_DIR/run_antismash.py https://bitbucket.org/antismash/antismash2/downloads/clusterblast.tar.gz - tar xfvz clusterblast.tar.gz -C $INSTALL_DIR/antismash/generic_modules/clusterblastn> + tar xfvz clusterblast.tar.gz -C $INSTALL_DIR/antismash/generic_modules/clusterblast - + https://bitbucket.org/antismash/antismash2/downloads/antiSMASH2.0.2_macosx.zip @@ -209,6 +220,7 @@ AntiSmash installation with all dependencies. + Java needs to be installed.