498a4c0cbcb540ba8cf8488b4175e4b59e543948
wong
  Tue Oct 25 16:57:40 2011 -0700
removed executable portion, fixed bug with special mdb
diff --git python/lib/ucscgenomics/mkChangeNotes.py python/lib/ucscgenomics/mkChangeNotes.py
index 56d3568..05a6d8b 100755
--- python/lib/ucscgenomics/mkChangeNotes.py
+++ python/lib/ucscgenomics/mkChangeNotes.py
@@ -264,31 +264,31 @@
         output.append("QA Count Summaries for Release %s:" % args['releaseNew'])
         output.append("Tables: %d" % int(len(newTableSet)))
         output.append("Files: %d" % int(len(totalFiles - revokedFiles)))
         output.append("Gbdbs: %d" % int(len(newGbdbSet)))
         output.append("Supplemental: %d" % int(len(newSupplementalSet - oldSupplementalSet)))
         output.append("Other: %d" % int(len(additionalList)))
         output.append("\n")
         output.append("Sizes of New:")
 
         totalsize = 0
         size = 0
         tableGb = int(tableSize/1024)
         totalsize = totalsize + tableSize
         if tableGb > 1:
             output.append("Tables: %d MB (%d GB)" % (tableSize, tableGb))
-        elif tableSize:
+        else:
             output.append("Tables: %d MB" % tableSize)
 
         size = int(self.__makeFileSizes(c, args, pushFiles))
         totalsize = totalsize + size
         if int(size/1024) > 1:
             output.append("Files: %d MB (%d GB)" % (size, int(size/1024)))
         else:
             output.append("Files: %d MB" % size)
         
         size = int(self.__makeFileSizes(c, args, pushGbdbs))
         totalsize = totalsize + size
         if int(size/1024) > 1:
             output.append("Gbdbs: %d MB (%d GB)" % (size, int(size/1024)))
         else:
             output.append("Gbdbs: %d MB" % size)
@@ -534,34 +534,35 @@
         output.append("Errors (%s):" % len(errors))
         for i in sorted(errorsDict.keys()):
             output.append("%s:" % i)
             for j in sorted(errorsDict[i]):
                 output.append("%s" % j)
         return output
 
     def __init__(self, args):
         self.releaseNew = args['releaseNew']
         self.releaseOld = args['releaseOld']
         self.database = args['database']
         self.composite = args['composite']
         self.loose = args['loose']
         self.ignore = args['ignore']
         self.summary = args['summary']
+        self.specialMdb = args['specialMdb']
         self.args = args
 
         errors = []
-        c = track.CompositeTrack(self.database, self.composite)
+        c = track.CompositeTrack(self.database, self.composite, None, self.specialMdb)
 
         #sanitize arguments
         if not self.releaseOld.isdigit():
             self.releaseOld = 'solo'
         elif int(self.releaseOld) <= 0:
             self.releaseOlf = 'solo'
         elif self.releaseOld > self.releaseNew:
             self.releaseOld = 'solo'
 
         if int(self.releaseNew) > 1 and str(self.releaseOld) != 'solo':
 
             self.newReleaseFiles = c.releases[int(self.releaseNew)-1]
             self.oldReleaseFiles = c.releases[int(self.releaseOld)-1]
 
             self.newMdb = c.alphaMetaDb
@@ -632,69 +633,15 @@
             errors.extend(newGbdbError)
 
             #set for easy operations
             totalFiles = set(self.newReleaseFiles)
 
             #clean out special fiels we don't push i.e. md5sum.history
             self.totalFiles = self.__cleanSpecialFiles(totalFiles)
 
             #makes list for additional files
             (self.oldTotalFiles, self.oldSupplementalSet) = (set(), set())
             (self.oldReleaseFiles, self.additionalList, self.oldAdditionalList, self.totalFiles) = self.__separateOutAdditional()
             if (not errors) or self.ignore:
                 self.output = self.printReportOne(args, c) 
             else:
                 self.output = self.printErrors(errors)
-
-
-def main():
-
-
-    parser = argparse.ArgumentParser(
-        prog='mkChangeNotes',
-        formatter_class=argparse.RawDescriptionHelpFormatter,
-        description='Writes out notes file for packing to QA',
-        epilog=
-    """Examples:
-
-    mkChangeNotes hg19 wgEncodeUwDnase 3 2 --loose
-    mkChangeNotes hg19 wgEncodeSydhTfbs 1 - --full
-    mkChangeNotes hg19 wgEncodeCshlLongRnaSeq 1 -
-
-    """
-        )
-    parser.add_argument('-l', '--loose', action="store_true", default=0, help='Loose checking for legacy elements. Will be retired once all tracks go through a release cycle')
-    parser.add_argument('-i', '--ignore', action="store_true", default=0, help='Ignore errors, output.append(out report.')
-    parser.add_argument('-s', '--summary', action="store_true", default=0, help='output.append(summary stats only.')
-    parser.add_argument('database', help='The database, typically hg19 or mm9')
-    parser.add_argument('composite', help='The composite name, wgEncodeCshlLongRnaSeq for instance')
-    parser.add_argument('releaseNew', help='The new release to be released')
-    parser.add_argument('releaseOld', nargs='?', default='-', help='The old release that is already released, if on release 1, or solo release mode, put anything here')
-
-    if len(sys.argv) == 1:
-        parser.print_help()
-        return
-    args = parser.parse_args(sys.argv[1:])
-    if not args.releaseNew.isdigit():
-        parser.print_help()
-        return
-
-
-
-    if not args.releaseOld.isdigit():
-        args.releaseOld = 'solo'    
-    elif int(args.releaseOld) > int(args.releaseNew):
-        errors.append("Old Release is higher than New Release")
-        args.releaseOld = args.releaseNew
-        printErrors(errors)
-        return
-
-    argsdict = {'database': args.database, 'composite': args.composite, 'releaseNew': args.releaseNew, 'releaseOld': args.releaseOld, 'loose': args.loose, 'ignore': args.ignore, 'summary': args.summary}
-
-    notes = makeNotes(argsdict)
-
-    for line in notes.output:
-        print line
-
-if __name__ == '__main__':
-    main()
-
