c5661011bc3f83ae214e6f65da4596585ae829f6 Merge parents 3c7f865 98180c8 mmaddren Mon Oct 31 16:18:35 2011 -0700 style.txt updated, fixed merge conflict diff --cc python/lib/ucscgenomics/track.py index e0f529f,00f3420..e8e5085 --- python/lib/ucscgenomics/track.py +++ python/lib/ucscgenomics/track.py @@@ -132,50 -132,69 +132,69 @@@ def httpDownloadsPath(self): """The location of the downloadable files path in apache form""" if not os.path.isdir(self._httpDownloadsPath): raise KeyError(self._httpDownloadsPath + ' does not exist') return self._httpDownloadsPath @property def files(self): """A list of all files in the downloads directory of this composite""" try: return self._files except AttributeError: md5sums = readMd5sums(self._md5path) radict = dict() - for stanza in self.alphaMetaDb: + for stanza in self.alphaMetaDb.itervalues(): if 'fileName' in stanza: for file in stanza['fileName'].split(','): radict[file] = stanza self._files = dict() for file in os.listdir(self.downloadsDirectory): if os.path.isfile(self.downloadsDirectory + file): - + stanza = None if file in radict: stanza = radict[file] if file in md5sums: self._files[file] = TrackFile(self.downloadsDirectory + file, md5sums[file], stanza) else: self._files[file] = TrackFile(self.downloadsDirectory + file, None, stanza) return self._files - + + @property + def qaInitDir(self): + qaDir = '/hive/groups/encode/encodeQa/' + self._database + '/' + self._name + '/' + if os.path.exists(qaDir) and os.path.isdir(qaDir): + pass + else: + os.makedirs(qaDir) + self._qaDir = qaDir + return qaDir + @property + def qaInitDirTest(self): + qaDir = '/hive/groups/encode/encodeQa/test/' + self._database + '/' + self._name + '/' + if os.path.exists(qaDir) and os.path.isdir(qaDir): + pass + else: + os.makedirs(qaDir) + self._qaDir = qaDir + return qaDir + @property def releases(self): """A list of all files in the release directory of this composite""" try: return self._releaseFiles except AttributeError: self._releaseFiles = list() count = 1 while os.path.exists(self.downloadsDirectory + 'release' + str(count)): releasepath = self.downloadsDirectory + 'release' + str(count) + '/' md5s = readMd5sums(releasepath + 'md5sum.txt') releasefiles = dict() for file in os.listdir(releasepath):