comparison util/Reader.py @ 13:43a700afd457 draft

planemo upload for repository https://github.com/goeckslab/jbrowse-archive-creator.git commit bcb239c4045d2c47a8acad5fbd29eea03663e187
author yating-l
date Tue, 19 Jun 2018 17:59:51 -0400
parents 5d5fdcb798da
children
comparison
equal deleted inserted replaced
12:9161beae834f 13:43a700afd457
118 datatype_dictionary = {} 118 datatype_dictionary = {}
119 119
120 # TODO: Optimize this double loop 120 # TODO: Optimize this double loop
121 for input_data in array_inputs: 121 for input_data in array_inputs:
122 input_false_path = input_data["false_path"] 122 input_false_path = input_data["false_path"]
123 input_data["name"] = santitizer.sanitize_name_input(input_data["name"]) 123 # if the file is empty, skip the rest
124 extensionObject = ExtensionClass(input_false_path, input_data) 124 if os.path.isfile(input_false_path) and os.path.getsize(input_false_path) > 0:
125 extensionObject.generateCustomTrack() 125 input_data["name"] = santitizer.sanitize_name_input(input_data["name"])
126 datatype_dictionary.update({input_data["order_index"]: extensionObject}) 126 extensionObject = ExtensionClass(input_false_path, input_data)
127 self.logger.debug("%s object: %s has been created", ExtensionClass, input_data["name"]) 127 extensionObject.generateCustomTrack()
128 datatype_dictionary.update({input_data["order_index"]: extensionObject})
129 self.logger.debug("%s object: %s has been created", ExtensionClass, input_data["name"])
130 else:
131 self.logger.info("The input file: %s is empty, skip creating the track for this data", input_data["name"])
128 return datatype_dictionary 132 return datatype_dictionary
129 133
130 134
131 135
132 136