# HG changeset patch # User crs4 # Date 1378461539 14400 # Node ID 1e8862eb2eba59d5a1ca0ee925287f34e8d1f3e3 Uploaded diff -r 000000000000 -r 1e8862eb2eba COPYING --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/COPYING Fri Sep 06 05:58:59 2013 -0400 @@ -0,0 +1,23 @@ +Copyright © 2012-2013 CRS4 Srl. http://www.crs4.it/ +Created by: +Massimiliano Orsini +Nicola Soranzo + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff -r 000000000000 -r 1e8862eb2eba mugsy.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mugsy.py Fri Sep 06 05:58:59 2013 -0400 @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +""" +Mugsy wrapper + +For draft genomes a single multi-FASTA file containig all contigs should be provided. +""" + +import optparse +import os +import shutil +import subprocess +import sys +import tempfile + +def __main__(): + """ main function """ + parser = optparse.OptionParser() + parser.add_option('-r', dest='reference', help='reference FASTA file') + parser.add_option('-c', dest='contigs', help='contigs FASTA file') + parser.add_option('-p', dest='prefix', default='prefix', help='prefix ') + parser.add_option('-l', dest='logfile', help='logfile') + parser.add_option('--ml', dest='mugsylog', help='mugsylog file') + parser.add_option('--maf', dest='maf', help='ouput MAF alignment file ') + (options, args) = parser.parse_args() + if len(args) > 0: + parser.error('Wrong number of arguments') + + logfile = options.logfile + wd = tempfile.mkdtemp() + try: + command = "mugsy --directory %s --prefix %s --log %s %s %s" % (wd, options.prefix, options.mugsylog, options.reference, options.contigs) + print 'Mugsy command to be executed:\n ' + command + + log = open(logfile, 'w') if logfile else sys.stdout + try: + subprocess.check_call(command, stderr=log, shell=True) # need to redirect stderr because mugsy writes its logging info there + finally: + if log != sys.stdout: + log.close() + print 'Mugsy executed!' + + shutil.move(os.path.join(wd, options.prefix + '.maf'), options.maf) + finally: + shutil.rmtree(wd) + + +if __name__ == "__main__": + __main__() diff -r 000000000000 -r 1e8862eb2eba mugsy.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mugsy.xml Fri Sep 06 05:58:59 2013 -0400 @@ -0,0 +1,44 @@ + + multiple whole genome aligner + + mugsy + + + mugsy.py -r $reference -c $contigs -l $logfile --ml $mugsylog --maf $maffile + + + + + + + + + + + + + + + +**What it does** + +Mugsy generates a MAF (multiple alignment format) file containing the multiple alignments from FASTA inputs. + +This implementation runs with two files only: reference vs contigs/draft(s). For multiple alignment a single Multi-FASTA file containing all contigs should be provided. + +**License and citation** + +This Galaxy tool is Copyright © 2012-2013 `CRS4 Srl.`_ and is released under the `MIT license`_. + +.. _CRS4 Srl.: http://www.crs4.it/ +.. _MIT license: http://opensource.org/licenses/MIT + +If you use this tool in Galaxy, please cite the website http://orione.crs4.it/ + +This tool uses `Mugsy`_, which is licensed separately. Please cite |Angiuoli2010|_. + +.. _Mugsy: http://mugsy.sourceforge.net/ +.. |Angiuoli2010| replace:: Angiuoli, S. V., Salzberg S. L. (2010) Mugsy: Fast multiple alignment of closely related whole genomes. *Bioinformatics* 27(3), 334-342 +.. _Angiuoli2010: http://bioinformatics.oxfordjournals.org/content/27/3/334 + + diff -r 000000000000 -r 1e8862eb2eba tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Fri Sep 06 05:58:59 2013 -0400 @@ -0,0 +1,52 @@ + + + + + + + + + + svn checkout http://svn.code.sf.net/p/mugsy/code/ mugsy + + sed -i 's/boost\/property_map\.hpp/boost\/property_map\/property_map.hpp/' trunk/chaining/synchain-mugsy.cpp + + sed -i 's/boost\/graph\/kolmogorov_max_flow\.hpp/boost\/graph\/boykov_kolmogorov_max_flow.hpp/' trunk/chaining/synchain-mugsy.cpp trunk/mugsy-seqan/projects/library/apps/mugsy/mugsy.cpp + + sed -i -e 's/-static//g' -e 's/-lbgl-viz -lboost_graph-gcc41-mt//g' trunk/chaining/Makefile + + sed -i '13 a \#include <algorithm>' trunk/MUMmer3.20/src/tigr/show-diff.cc + + touch trunk/MUMmer3.20/src/kurtz/streesrc/streeproto.h + + sed -i -e 's/install synchain-mugsy/install chaining\/synchain-mugsy/' -e 's/install mugsyWGA \(.*\)/install mugsy-seqan\/projects\/library\/apps\/mugsy\/gcc\/mugsy \1\/mugsyWGA/' trunk/Makefile + + sed -i '/DOC_DIR/d' trunk/MUMmer3.20/Makefile + + + + + + + + sed -i -e 's/-I \/usr\/local\/projects\/angiuoli\/boost\/include\/boost-1_38/-I $(BOOST_ROOT_DIR)\/include/g' -e 's/-L \/usr\/local\/projects\/angiuoli\/boost\/lib\//-L $(BOOST_ROOT_DIR)\/lib/g' trunk/chaining/Makefile trunk/mugsy-seqan/platforms/gcc/platform.mak + + rm -f trunk/chaining/synchain-mugsy trunk/mugsyWGA trunk/synchain-mugsy && make -C trunk/MUMmer3.20 clean + make -C trunk all + make -C trunk install + + trunk/mugsy_x86-64-v1r2.3.1 + $INSTALL_DIR + + + $INSTALL_DIR + + + $INSTALL_DIR + + + + + + +