comparison TrackHub.py @ 11:d05236b15f81 draft

planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 3760d0c8353b924ecf994131a5c2eb381aa81fb2
author rmarenco
date Wed, 27 Jul 2016 10:10:49 -0400
parents acc233161f50
children 3233451a3bd6
comparison
equal deleted inserted replaced
10:acc233161f50 11:d05236b15f81
26 self.tool_directory = tool_directory 26 self.tool_directory = tool_directory
27 27
28 self.reference_genome = inputFastaFile 28 self.reference_genome = inputFastaFile
29 # TODO: Add the specie name 29 # TODO: Add the specie name
30 self.genome_name = inputFastaFile.assembly_id 30 self.genome_name = inputFastaFile.assembly_id
31 self.specie_html = self.genome_name + '.html'
31 self.default_pos = None 32 self.default_pos = None
32 self.user_email = user_email 33 self.user_email = user_email
33 34
34 # TODO: Modify according to the files passed in parameter 35 # TODO: Modify according to the files passed in parameter
35 mylookup = TemplateLookup(directories=[os.path.join(tool_directory, 'templates/trackDb')], 36 mylookup = TemplateLookup(directories=[os.path.join(tool_directory, 'templates/trackDb')],
146 # Add the hub.txt file 147 # Add the hub.txt file
147 hubTxtFilePath = os.path.join(myHubPath, 'hub.txt') 148 hubTxtFilePath = os.path.join(myHubPath, 'hub.txt')
148 self.__fillHubTxt__(hubTxtFilePath) 149 self.__fillHubTxt__(hubTxtFilePath)
149 150
150 # Add the hub.html file 151 # Add the hub.html file
151 # TODO: Change the name and get it depending on the specie 152 hubHtmlFilePath = os.path.join(myHubPath, self.specie_html)
152 hubHtmlFilePath = os.path.join(myHubPath, 'dbia.html')
153 self.__fillHubHtmlFile__(hubHtmlFilePath) 153 self.__fillHubHtmlFile__(hubHtmlFilePath)
154 154
155 155
156 # Create the description html file in the specie folder 156 # Create the description html file in the specie folder
157 descriptionHtmlFilePath = os.path.join(mySpecieFolderPath, 'description.html') 157 descriptionHtmlFilePath = os.path.join(mySpecieFolderPath, 'description.html')
206 hubName=(''.join(['gonramp', self.genome_name.title()])), 206 hubName=(''.join(['gonramp', self.genome_name.title()])),
207 shortLabel=self.genome_name, 207 shortLabel=self.genome_name,
208 longLabel=self.genome_name, 208 longLabel=self.genome_name,
209 genomesFile='genomes.txt', 209 genomesFile='genomes.txt',
210 email=self.user_email, 210 email=self.user_email,
211 descriptionUrl='dbia.html' 211 descriptionUrl=self.specie_html
212 ) 212 )
213 genomesTxtFile.write(htmlMakoRendered) 213 genomesTxtFile.write(htmlMakoRendered)
214 214
215 def __fillHubHtmlFile__(self, hubHtmlFilePath): 215 def __fillHubHtmlFile__(self, hubHtmlFilePath):
216 # TODO: Think about the inputs and outputs 216 # TODO: Think about the inputs and outputs