# HG changeset patch # User peterjc # Date 1548697664 18000 # Node ID d5a874662a1dc8bc2dfc68e48d27695f79a92d46 # Parent 3a36a2d8232aa15bc1138d8d5910acb09676fce2 planemo upload for repository https://github.com/peterjc/pico_galaxy/tree/master/datatypes/mira_datatypes commit f8b364b793b832acb4deaf0964f35987099f82bf-dirty diff -r 3a36a2d8232a -r d5a874662a1d README.rst --- a/README.rst Mon Jan 28 12:16:42 2019 -0500 +++ b/README.rst Mon Jan 28 12:47:44 2019 -0500 @@ -1,112 +1,11 @@ -Galaxy datatypes for MIRA Assembly Format (MAF) -=============================================== - -These Galaxy datatypes are copyright 2013 by Peter Cock, The James Hutton -Institute (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved. - -See the licence text below (MIT licence). - -This code defines a 'mira' datatype within Galaxy for the MIRA Assembly Format -(specifically v2 of the format introduced by MIRA 4.0 and the development -preview releases of MIRA v3.9). See http://chevreux.org/projects_mira.html -and https://sourceforge.net/projects/mira-assembler/ for background. - -This format is not to be confused with the existing 'maf' datatype within Galaxy -for the unrelated Multiple (sequence) Alignment Format (MAF). - -It is available from the Galaxy Tool Shed at: -http://toolshed.g2.bx.psu.edu/view/peterjc/mira_datatypes - - -History -======= +Galaxy packages for MIRA +======================== -======= ====================================================================== -Version Changes -------- ---------------------------------------------------------------------- -v0.0.1 - First public release -======= ====================================================================== - - -Installation -============ - -Doing this automatically via the Galaxy Tool Shed is probably simplest, and will -happen automatically as a dependency of the Galaxy wrapper for MIRA v4.0. - - -Manual Installation -=================== - -Normally you would install this via the Galaxy ToolShed, which would move -the provided mira.py file into a suitable location and process the -``datatypes_conf.xml`` entry to be combined with your local configuration. - -However, if you really want to this should work for a manual install. Add -the following lines to the ``datatypes_conf.xml`` file in the Galaxy main folder:: - - - -and later in the sniffer section:: - - +The code for my Galaxy wrappers for MIRA and associated packages has been +moved to a new repository: -Also create the file ``lib/galaxy/datatypes/mira.py`` by moving, copying or linking -the mira.py file provided in this tar-ball. Finally add ``import mira`` near -the start of file ``lib/galaxy/datatypes/registry.py`` (after the other import -lines). - - -Bug Reports -=========== - -You can file an issue here https://github.com/peterjc/pico_galaxy/issues or ask -us on the Galaxy development list http://lists.bx.psu.edu/listinfo/galaxy-dev - - -Developers -========== - -Development is done on this GitHub repository: -https://github.com/peterjc/pico_galaxy - -For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball I use -the following command from the ``mira_datatypes`` folder:: - - $ tar -czf mira_datatypes.tar.gz README.rst datatypes_conf.xml mira.py - -Check this worked:: +https://github.com/peterjc/galaxy_mira/ - $ tar -tzf mira_datatypes.tar.gz - README.rst - datatypes_conf.xml - mira.py - -For development, rather than having a local ToolShed running, I currently -use a symlink from ``lib/galaxy/datatypes/mira.py`` to the actual file as -described above. - - -Licence (MIT) -============= +The tools, datatypes and packages remain available from the Galaxy Tool Shed: -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. - -NOTE: This is the licence for the Galaxy MIRA datatypes **only**. MIRA itself -is available and licenced separately. +http://toolshed.g2.bx.psu.edu/view/peterjc/ diff -r 3a36a2d8232a -r d5a874662a1d datatypes_conf.xml --- a/datatypes_conf.xml Mon Jan 28 12:16:42 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff -r 3a36a2d8232a -r d5a874662a1d mira.py --- a/mira.py Mon Jan 28 12:16:42 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -"""MiraAssemblyFormat class for the 'mira' format within Galaxy.""" - -from galaxy.datatypes.data import Text - - -class MiraAssemblyFormat(Text): - """MIRA Assembly Format data.""" - - file_ext = "mira" - - def sniff(self, filename): - """Determine if the file is a MIRA Assembly Format file. - - Note currently this only detects MIRA Assembly Format v2.0, - as used in MIRA v3.9 and v4.0. - - It does not detect MIRA Assembly Format v1 as used in both - MIRA v3.2 and v3.4. - """ - h = open(filename) - line = h.readline() - if line.rstrip() != "@Version\t2\t0": - h.close() - return False - line = h.readline() - if line.rstrip() != "@Program\tMIRALIB": - h.close() - return False - return True - - def merge(split_files, output_file): - """Merge MIRA assembly files (not implemented). - - Merging multiple MIRA files is non-trivial and may not be possible... - """ - if len(split_files) == 1: - # For one file only, use base class method (move/copy) - return Text.merge(split_files, output_file) - if not split_files: - raise ValueError("Given no MIRA, %r, to merge into %s" - % (split_files, output_file)) - raise NotImplementedError("Merging MIRA Assembly Files has not been implemented") - merge = staticmethod(merge) - - def split(cls, input_datasets, subdir_generator_function, split_params): - """Split a MIRA Assembly File (not implemented for now).""" - if split_params is None: - return None - raise NotImplementedError("Can't yet split a MIRA Assembly Format file") - merge = staticmethod(merge)