comparison Datatype.py @ 1:fb5e60d4d18a draft

planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 64cfc08088d11f6818c1b4e5514ef9e67969eaff-dirty
author rmarenco
date Wed, 13 Jul 2016 13:36:37 -0400
parents
children 816956489fe9
comparison
equal deleted inserted replaced
0:0f3bc17e5ede 1:fb5e60d4d18a
1 #!/usr/bin/python
2 # -*- coding: utf8 -*-
3
4 """
5 Super Class of the managed datatype
6 """
7
8 import os
9
10 from util import subtools
11
12
13 class Datatype(object):
14 def __init__( self, input_fasta_file, extra_files_path, tool_directory ):
15
16 self.input_fasta_file = input_fasta_file
17 self.extra_files_path = extra_files_path
18 self.tool_directory = tool_directory
19
20
21 # Construction of the arborescence
22 # TODO: Change the hard-coded path with a input based one
23 self.mySpecieFolderPath = os.path.join(extra_files_path, "myHub", "dbia3")
24
25 # TODO: Refactor the name of the folder "tracks" into one variable, and should be inside TrackHub object
26 self.myTrackFolderPath = os.path.join(self.mySpecieFolderPath, "tracks")
27
28 # TODO: Redundant, should be refactored because they are all doing it...into hubArchiveCreator?
29 # 2bit file creation from input fasta
30 self.twoBitFile = subtools.faToTwoBit(self.input_fasta_file, self.mySpecieFolderPath)
31
32 def getShortName( self, name_to_shortify ):
33 # Slice to get from Long label the short label
34 short_label_slice = slice(0, 15)
35
36 return name_to_shortify[short_label_slice]