annotate util/Reader.py @ 29:7e8a8b732db3 draft

planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
author yating-l
date Wed, 16 May 2018 18:04:20 -0400
parents
children e7c4be523cb7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
1 import json
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
2 import logging
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
3 import codecs
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
4
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
5
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
6 # Internal dependencies
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
7 from datatypes.binary.Bam import Bam
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
8 from datatypes.binary.BigWig import BigWig
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
9 from datatypes.binary.BigBed import BigBed
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
10 from datatypes.interval.Bed import Bed
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
11 from datatypes.interval.BedSimpleRepeats import BedSimpleRepeats
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
12 from datatypes.interval.BedSpliceJunctions import BedSpliceJunctions
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
13 from datatypes.interval.CytoBand import CytoBand
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
14 from datatypes.interval.BedBlatAlignments import BedBlatAlignments
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
15 from datatypes.interval.BedBlastAlignments import BedBlastAlignments
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
16 from datatypes.interval.Gff3 import Gff3
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
17 from datatypes.interval.Gtf import Gtf
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
18 from datatypes.interval.Psl import Psl
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
19 from datatypes.sequence.Fasta import Fasta
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
20 from util import santitizer
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
21
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
22 class Reader(object):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
23
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
24 DATATYPE_CLASS = [Bam, BigWig, BigBed, Bed, BedSimpleRepeats, BedSpliceJunctions, CytoBand, BedBlatAlignments, BedBlastAlignments, Gff3, Gtf, Psl, Fasta]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
25
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
26 def __init__(self, input_json_file):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
27 self.inputFile = input_json_file
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
28 self.args = self.loadJson()
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
29
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
30
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
31 def loadJson(self):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
32 try:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
33 data_file = codecs.open(self.inputFile, 'r', 'utf-8')
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
34 return json.load(data_file)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
35 except IOError:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
36 print "Cannot find JSON file\n"
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
37 exit(1)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
38
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
39 def getToolDir(self):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
40 try:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
41 return self.args["tool_directory"]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
42 except KeyError:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
43 print ("tool_directory is not defined in the input file!")
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
44 exit(1)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
45
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
46 def getExtFilesPath(self):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
47 try:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
48 return self.args["extra_files_path"]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
49 except KeyError:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
50 print ("extra_files_path is not defined in the input file!")
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
51 exit(1)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
52
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
53 def getUserEmail(self):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
54 try:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
55 return self.args["user_email"]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
56 except KeyError:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
57 print ("user_email is not defined in the input file!")
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
58 exit(1)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
59
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
60 def getDebugMode(self):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
61 try:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
62 return self.args["debug_mode"]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
63 except KeyError:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
64 print ("debug_mode is not defined in the input file!")
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
65 exit(1)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
66
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
67
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
68 def getRefGenome(self):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
69 array_inputs_reference_genome = self.args["fasta"]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
70 # TODO: Replace these with the object Fasta
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
71 input_fasta_file = array_inputs_reference_genome["false_path"]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
72 input_fasta_file_name = santitizer.sanitize_name_input(array_inputs_reference_genome["name"])
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
73 genome_name = santitizer.sanitize_name_input(self.args["genome_name"])
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
74 reference_genome = Fasta(input_fasta_file,
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
75 input_fasta_file_name, genome_name)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
76 return reference_genome
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
77
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
78
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
79 def getTracksData(self):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
80 self.logger = logging.getLogger(__name__)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
81 all_datatype_dictionary = dict()
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
82 for datatype in self.DATATYPE_CLASS:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
83 class_name = datatype.__name__
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
84 array_inputs = self.args.get(str(class_name))
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
85 if array_inputs:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
86 self.logger.debug("Create %s objects\n", class_name)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
87 self.logger.debug("array_inputs: %s", array_inputs)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
88 all_datatype_dictionary.update(self.create_ordered_datatype_objects(datatype, array_inputs))
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
89
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
90 return all_datatype_dictionary
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
91
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
92 def create_ordered_datatype_objects(self, ExtensionClass, array_inputs):
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
93 """
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
94 Function which executes the creation all the necessary files / folders for a special Datatype, for TrackHub
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
95 and update the dictionary of datatype
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
96
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
97 :param ExtensionClass:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
98 :param array_inputs:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
99 :type ExtensionClass: Datatype
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
100 :type array_inputs: list[string]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
101 """
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
102
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
103 datatype_dictionary = {}
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
104
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
105 # TODO: Optimize this double loop
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
106 for input_data in array_inputs:
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
107 input_false_path = input_data["false_path"]
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
108 input_data["name"] = santitizer.sanitize_name_input(input_data["name"])
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
109 extensionObject = ExtensionClass(input_false_path, input_data)
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
110 extensionObject.generateCustomTrack()
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
111 datatype_dictionary.update({input_data["order_index"]: extensionObject})
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
112 return datatype_dictionary
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
113
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
114
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
115
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
116
7e8a8b732db3 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 1a81ebd0ddea950b84af3fc830e9267a4814b29f
yating-l
parents:
diff changeset
117