Mercurial > repos > rmarenco > hubarchivecreator
view Datatype.py @ 5:fcff8e9146e7 draft
planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 8fa0bb53e1bd6c4d7e3b0d9ea2f86825040e29de-dirty
author | rmarenco |
---|---|
date | Mon, 18 Jul 2016 12:40:30 -0400 |
parents | fb5e60d4d18a |
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]