Mercurial > repos > rmarenco > hubarchivecreator
view 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 |
line wrap: on
line source
#!/usr/bin/python # -*- coding: utf8 -*- """ Super Class of the managed datatype """ import os from util import subtools class Datatype(object): def __init__( self, input_fasta_file, extra_files_path, tool_directory ): self.input_fasta_file = input_fasta_file self.extra_files_path = extra_files_path self.tool_directory = tool_directory # Construction of the arborescence # TODO: Change the hard-coded path with a input based one self.mySpecieFolderPath = os.path.join(extra_files_path, "myHub", "dbia3") # TODO: Refactor the name of the folder "tracks" into one variable, and should be inside TrackHub object self.myTrackFolderPath = os.path.join(self.mySpecieFolderPath, "tracks") # TODO: Redundant, should be refactored because they are all doing it...into hubArchiveCreator? # 2bit file creation from input fasta self.twoBitFile = subtools.faToTwoBit(self.input_fasta_file, self.mySpecieFolderPath) def getShortName( self, name_to_shortify ): # Slice to get from Long label the short label short_label_slice = slice(0, 15) return name_to_shortify[short_label_slice]