Mercurial > repos > rmarenco > hubarchivecreator
changeset 30:e7c4be523cb7 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 2f1b3cc8c9cb463e460f7f79efe99ed472700ecf
author | yating-l |
---|---|
date | Tue, 19 Jun 2018 13:02:32 -0400 |
parents | 7e8a8b732db3 |
children | 9c5d82d3c87e |
files | TrackDb.py hub-archive-creator.iml hubArchiveCreator.xml util/Reader.py |
diffstat | 4 files changed, 21 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/TrackDb.py Wed May 16 18:04:20 2018 -0400 +++ b/TrackDb.py Tue Jun 19 13:02:32 2018 -0400 @@ -1,4 +1,5 @@ #!/usr/bin/python +import os import collections from util import santitizer @@ -21,7 +22,7 @@ def createTrackDb(self, track_name, long_label, short_label, file_path, track_type, extraSettings = None): # TODO: Remove the hardcoded "tracks" by the value used as variable from myTrackFolderPath - data_url = "tracks/%s" % track_name + data_url = "tracks/%s" % os.path.basename(file_path) if not short_label: short_label = TrackDb.getShortName(long_label) # Replace '_' by ' ', to invert the sanitization mecanism
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hub-archive-creator.iml Tue Jun 19 13:02:32 2018 -0400 @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="PYTHON_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$" /> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file
--- a/hubArchiveCreator.xml Wed May 16 18:04:20 2018 -0400 +++ b/hubArchiveCreator.xml Tue Jun 19 13:02:32 2018 -0400 @@ -1,4 +1,4 @@ -<tool id="hubArchiveCreator" name="Hub Archive Creator" version="2.5.0"> +<tool id="hubArchiveCreator" name="Hub Archive Creator" version="2.5.2"> <description> This Galaxy tool permits to prepare your files to be ready for Assembly Hub visualization.
--- a/util/Reader.py Wed May 16 18:04:20 2018 -0400 +++ b/util/Reader.py Tue Jun 19 13:02:32 2018 -0400 @@ -1,3 +1,4 @@ +import os import json import logging import codecs @@ -105,10 +106,14 @@ # TODO: Optimize this double loop for input_data in array_inputs: input_false_path = input_data["false_path"] - input_data["name"] = santitizer.sanitize_name_input(input_data["name"]) - extensionObject = ExtensionClass(input_false_path, input_data) - extensionObject.generateCustomTrack() - datatype_dictionary.update({input_data["order_index"]: extensionObject}) + # if the file is empty, skip the rest + if os.path.isfile(input_false_path) and os.path.getsize(input_false_path) > 0: + input_data["name"] = santitizer.sanitize_name_input(input_data["name"]) + extensionObject = ExtensionClass(input_false_path, input_data) + extensionObject.generateCustomTrack() + datatype_dictionary.update({input_data["order_index"]: extensionObject}) + else: + self.logger.info("The input file: %s is empty, skip creating the track for this data", input_data["name"]) return datatype_dictionary