6fbfd308fd266741cdc35ee2b480f0284935a9b9
wong
  Thu Oct 20 12:14:01 2011 -0700
added some stuff for QA functions
diff --git python/lib/ucscgenomics/track.py python/lib/ucscgenomics/track.py
index 6cd235d..8f3e787 100644
--- python/lib/ucscgenomics/track.py
+++ python/lib/ucscgenomics/track.py
@@ -153,30 +153,40 @@
             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/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):
                     if file != 'md5sum.txt' and md5s != None and file in md5s and not os.path.isdir(releasepath + file):
@@ -267,21 +277,23 @@
             self._organism = organisms[database]
         else:
             raise KeyError(database + ' is not a valid database')
         
         if not self._trackPath.endswith('/'):
             self._trackPath = self._trackPath + '/'
         
         self._trackDbPath = self._trackPath + self._organism + '/' + database + '/' + compositeName + '.ra'
         if not os.path.isfile(self._trackDbPath):
             raise KeyError(self._trackDbPath + ' does not exist')    
         
         self._alphaMdbPath = self._trackPath + self._organism + '/' + database + '/metaDb/alpha/' + compositeName + '.ra'
         self._betaMdbPath = self._trackPath + self._organism + '/' + database + '/metaDb/beta/' + compositeName + '.ra'    
         self._publicMdbPath = self._trackPath + self._organism + '/' + database + '/metaDb/public/' + compositeName + '.ra'
         self._downloadsDirectory = '/hive/groups/encode/dcc/analysis/ftp/pipeline/' + database + '/' + compositeName + '/'
-        self._httpDownloadsPath = '/usr/local/apache/htdocs-hgdownload/goldenPath/' + database + '/' + 'encodeDCC/' + compositeName + '/'
+        self._httpDownloadsPath = '/usr/local/apache/htdocs-hgdownload/goldenPath/' + database + '/encodeDCC/' + compositeName + '/'
+        self._rrHttpDir = '/usr/local/apache/htdocs/goldenPath/' + database + '/encodeDCC/' + compositeName + '/'
+        self._notesDirectory = os.path.expanduser("~/kent/src/hg/makeDb/doc/encodeDcc%s" % database.capitalize()) + '/'
         self._url = 'http://genome.ucsc.edu/cgi-bin/hgTrackUi?db=' + database + '&g=' + compositeName
         self._database = database
         self._name = compositeName        
         self._md5path = '/hive/groups/encode/dcc/analysis/ftp/pipeline/' + database + '/' + compositeName + '/md5sum.txt'