# HG changeset patch # User rmarenco # Date 1468905597 14400 # Node ID 816956489fe96f6e19aae631210daa1692e6cd7e # Parent fcff8e9146e710e0cc0c5ea853c3d133e2b34fc1 planemo upload for repository https://github.com/goeckslab/hub-archive-creator commit 20817d2bd61639d88226c9cd0392cea420ded222 diff -r fcff8e9146e7 -r 816956489fe9 Datatype.py --- a/Datatype.py Mon Jul 18 12:40:30 2016 -0400 +++ b/Datatype.py Tue Jul 19 01:19:57 2016 -0400 @@ -11,12 +11,16 @@ class Datatype(object): + + twoBitFile = None + 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 + self.twoBitFile = None # Construction of the arborescence # TODO: Change the hard-coded path with a input based one @@ -27,7 +31,12 @@ # 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) + if not Datatype.twoBitFile: + print "We create the self.twoBit in " + self.__class__.__name__ + Datatype.twoBitFile = subtools.faToTwoBit(self.input_fasta_file, self.mySpecieFolderPath) + + # TODO: Remove this by saying to all children classes to use "Datatype.twoBitFile" instead + self.twoBitFile = Datatype.twoBitFile def getShortName( self, name_to_shortify ): # Slice to get from Long label the short label diff -r fcff8e9146e7 -r 816956489fe9 Datatype.pyc Binary file Datatype.pyc has changed diff -r fcff8e9146e7 -r 816956489fe9 TrackHub.pyc Binary file TrackHub.pyc has changed