cf848a6f3c75bdb85e7030779e193fe837020566 braney Mon Mar 16 08:47:34 2020 -0700 Add version numbers to wigToBig and bedGraphToBigWig, and increment the version number for bedToBigBed since we've made some changes without incrementing it. refs #25163 diff --git src/utils/bedGraphToBigWig/bedGraphToBigWig.c src/utils/bedGraphToBigWig/bedGraphToBigWig.c index 5a1e806..165d691 100644 --- src/utils/bedGraphToBigWig/bedGraphToBigWig.c +++ src/utils/bedGraphToBigWig/bedGraphToBigWig.c @@ -8,60 +8,65 @@ #include "linefile.h" #include "localmem.h" #include "hash.h" #include "options.h" #include "sqlNum.h" #include "dystring.h" #include "cirTree.h" #include "sig.h" #include "zlibFace.h" #include "bPlusTree.h" #include "bbiFile.h" #include "bwgInternal.h" #include "bigWig.h" +char *version = "2.8"; // when changing, change in bedToBigBed, bedGraphToBigWig, and wigToBigWig +/* Version history from 2.8 on at least - + * 2.8 sync up version numbers with bedToBigBed + */ + static int blockSize = 256; static int itemsPerSlot = 1024; static boolean doCompress = FALSE; static int maxGigs = 100; // Maximum number of gigs to allocate in one block. // Undocumented on purpose. void usage() /* Explain usage and exit. */ { errAbort( - "bedGraphToBigWig v %d - Convert a bedGraph file to bigWig format.\n" + "bedGraphToBigWig v %s - Convert a bedGraph file to bigWig format (bbi version: %d).\n" "usage:\n" " bedGraphToBigWig in.bedGraph chrom.sizes out.bw\n" "where in.bedGraph is a four column file in the format:\n" " <chrom> <start> <end> <value>\n" "and chrom.sizes is a two-column file/URL: <chromosome name> <size in bases>\n" "and out.bw is the output indexed big wig file.\n" "If the assembly <db> is hosted by UCSC, chrom.sizes can be a URL like\n" " http://hgdownload.soe.ucsc.edu/goldenPath/<db>/bigZips/<db>.chrom.sizes\n" "or you may use the script fetchChromSizes to download the chrom.sizes file.\n" "If not hosted by UCSC, a chrom.sizes file can be generated by running\n" "twoBitInfo on the assembly .2bit file.\n" "The input bedGraph file must be sorted, use the unix sort command:\n" " sort -k1,1 -k2,2n unsorted.bedGraph > sorted.bedGraph\n" "options:\n" " -blockSize=N - Number of items to bundle in r-tree. Default %d\n" " -itemsPerSlot=N - Number of data points bundled at lowest level. Default %d\n" " -unc - If set, do not use compression." - , bbiCurrentVersion, blockSize, itemsPerSlot + , version, bbiCurrentVersion, blockSize, itemsPerSlot ); } static struct optionSpec options[] = { {"blockSize", OPTION_INT}, {"itemsPerSlot", OPTION_INT}, {"unc", OPTION_BOOLEAN}, {"maxGigs", OPTION_INT}, {NULL, 0}, }; struct sectionItem /* An item in a section of a bedGraph. */ { bits32 start, end; /* Position in chromosome, half open. */