src/hg/encode/encodeMkChangeNotes/encodeMkChangeNotes 1.10
1.10 2010/04/08 00:06:54 krish
support for pairedTagAlign and better addtional files handeling
Index: src/hg/encode/encodeMkChangeNotes/encodeMkChangeNotes
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeMkChangeNotes/encodeMkChangeNotes,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -B -U 4 -r1.9 -r1.10
--- src/hg/encode/encodeMkChangeNotes/encodeMkChangeNotes 7 Apr 2010 22:08:37 -0000 1.9
+++ src/hg/encode/encodeMkChangeNotes/encodeMkChangeNotes 8 Apr 2010 00:06:54 -0000 1.10
@@ -128,12 +128,16 @@
database = args[0]
current_release_dir = args[1]
prev_release_dir = args[2]
+ # list of addition files
+ possible_addition_files = ["index.html", "files.txt", "md5sum.txt"]
+ addition_files = []
+
# some re we will be using
- table_and_file = re.compile("^(narrowPeaks|narrowPeak|broadPeak|gtf|bedGraph\d+|bed\d+)$")
+ table_and_file = re.compile("^(narrowPeaks|narrowPeak|broadPeak|gtf|bedGraph\d+|bed\d+|pairedTagAlign)$")
gbdb = re.compile("^(wig|tagAlign)$")
- file_only = re.compile("^(fastq|fasta|rpkm|bowtie|psl|csqual|csfasta|pairedTagAlign)$")
+ file_only = re.compile("^(fastq|fasta|rpkm|bowtie|psl|csqual|csfasta)$")
# if new relase, add the full path to all files
path_prefix = ""
if prev_release_dir == "-":
@@ -279,8 +280,17 @@
new_files_list.append(path_prefix + f)
else:
raise ValueError, "unknown type %s of file %s" % (type, f)
+ # check the list of addition files
+ for f in possible_addition_files:
+ if os.path.exists(f):
+ addition_files.append(path_prefix + f)
+ else:
+ warn = "addition file %s not found" % f
+ warnings.append(warn)
+ print >>sys.stderr, warn
+
# output some basic stats
if options.verbose:
print >>sys.stderr, "Counts:"
print >>sys.stderr, " unchanged tables: %d" % len(unchanged_tables_list)
@@ -291,8 +301,9 @@
print >>sys.stderr, " removed gbdbs: %d" % len(removed_gbdbs_list)
print >>sys.stderr, " new tables: %d" % len(new_tables_list)
print >>sys.stderr, " new files: %d" % len(new_files_list)
print >>sys.stderr, " new gbdbs: %d" % len(new_gbdbs_list)
+ print >>sys.stderr, " additional files: %d" % len(addition_files)
# if asked, save the list of new files
if options.files_path:
new_files_file = open(options.files_path, "w")
@@ -338,11 +349,11 @@
D) Additional items of note
"""
# some summary counts of current files, i.e. new + untouched
- print "Summary total counts for %s (new+untouched, not counting D):" % current_release_dir
+ print "Summary total counts for %s (new+untouched):" % current_release_dir
print " Tables: %d" % (len(unchanged_tables_list) + len(new_tables_list))
- print " Files: %d" % (len(unchanged_files_list) + len(new_files_list))
+ print " Files: %d" % (len(unchanged_files_list) + len(new_files_list) + len(addition_files))
print " Gbdbs: %d" % (len(unchanged_gbdbs_list) + len(new_gbdbs_list))
print
# untouched list
@@ -433,11 +444,10 @@
print " /usr/local/apache/htdocs/goldenPath/%s/encodeDCC/%s/%s/" % (database, options.composite_name, current_release_dir)
print " should be placed on the RR in (overwritting any existing copy):"
print " /usr/local/apache/htdocs/goldenPath/%s/encodeDCC/%s/" % (database, options.composite_name)
print
- print "index.html"
- print "files.txt"
- print "md5sum.txt"
+ for f in addition_files:
+ print f
#### Module ####################################################################
if __name__ == "__main__":