From e460ca80eda32d7c0d2ccc68091dbaf6ea3d1fcf Mon Sep 17 00:00:00 2001 From: Matt Nash Date: Fri, 26 Feb 2016 11:22:42 -0500 Subject: [PATCH] Removed LastChangedRevision SVN magic as it will not only not work, but will prevent compilation. Updated the version numbers to the last-changed SVN revision number from the old Google Code repo. --- clipper/ea-bcl2fastq.cpp | 7 +++---- clipper/fastq-join.cpp | 7 +++---- clipper/fastq-mcf.cpp | 9 ++++----- clipper/fastq-multx.cpp | 7 +++---- clipper/sam-stats.cpp | 9 ++++----- clipper/varcall.cpp | 13 ++++++------- 6 files changed, 23 insertions(+), 29 deletions(-) diff --git a/clipper/ea-bcl2fastq.cpp b/clipper/ea-bcl2fastq.cpp index 6fce7d6..ece28c0 100644 --- a/clipper/ea-bcl2fastq.cpp +++ b/clipper/ea-bcl2fastq.cpp @@ -46,8 +46,7 @@ using namespace std; // bad practice #define MAX_ERR_FILES 10 #include "zlib.h" -#define VERSION "1.01" -#define SVNREV atoi(strchr("$LastChangedRevision: 705 $", ':')+1) +#define VERSION "1.01.816" #define warn(...) { fprintf(stderr, __VA_ARGS__); } #define die(...) { warn(__VA_ARGS__); exit(1); } @@ -525,7 +524,7 @@ void usage(FILE *f, const char *msg) { fprintf(f, "Usage: ea-bcl2fastq -r PATH -l NUM -m MASK -o PREFIX [options] \n" -"Version: %s.%d\n" +"Version: %s\n" "\n" "Converts Illumina bcl files to fastq\n" "\n" @@ -538,7 +537,7 @@ void usage(FILE *f, const char *msg) { " -s START Cluster offset (ZERO BASED OFFSET)\n" " -n COUNT Cluster count\n" "\n" - ,VERSION, SVNREV); + ,VERSION); } char *arg2cmd(int argc, char** argv) { diff --git a/clipper/fastq-join.cpp b/clipper/fastq-join.cpp index fd2b399..d8d0169 100644 --- a/clipper/fastq-join.cpp +++ b/clipper/fastq-join.cpp @@ -28,8 +28,7 @@ See "void usage" below for usage. */ -#define VERSION "1.01" -#define SVNREV atoi(strchr("$LastChangedRevision$", ':')+1) +#define VERSION "1.01.759" void usage(FILE *f); int debug=0; @@ -74,7 +73,7 @@ int main (int argc, char **argv) { break; case 'r': orep = optarg; break; case 't': threads = atoi(optarg); break; - case 'V': printf("Version: %s.%d\n", VERSION, SVNREV); return 0; break; + case 'V': printf("Version: %s\n", VERSION); return 0; break; case 'm': mino = atoi(optarg); break; case 'x': allow_ex = true; break; case 'p': pctdiff = atoi(optarg); break; @@ -393,7 +392,7 @@ int main (int argc, char **argv) { printf("Total joined: %d\n", joincnt); printf("Average join len: %.2f\n", (double) tlen / (double) joincnt); printf("Stdev join len: %.2f\n", dev); - printf("Version: %s.%d\n", VERSION, SVNREV); + printf("Version: %s\n", VERSION); return 0; } diff --git a/clipper/fastq-mcf.cpp b/clipper/fastq-mcf.cpp index 2813600..af59e57 100644 --- a/clipper/fastq-mcf.cpp +++ b/clipper/fastq-mcf.cpp @@ -31,8 +31,7 @@ See "void usage" below for usage. #include "fastq-lib.h" -#define VERSION "1.04" -#define SVNREV atoi(strchr("$LastChangedRevision$", ':')+1) +#define VERSION "1.04.807" #define MAX_ADAPTER_NUM 1000 #define SCANLEN 15 @@ -365,7 +364,7 @@ int main (int argc, char **argv) { case 'F': fref[fref_n++] = optarg; break; case 'x': pctns = atof(optarg); break; case 'R': rmns = false; break; - case 'V': printf("Version: %s.%d\n", VERSION, SVNREV); return 0; break; + case 'V': printf("Version: %s\n", VERSION); return 0; break; case 'p': pctdiff = atoi(optarg); break; case 'P': phred = (char) atoi(optarg); break; case 'D': duplen = atoi(optarg); break; @@ -1453,7 +1452,7 @@ void usage(FILE *f, const char *msg) { fprintf(f, "Usage: fastq-mcf [options] [mates1.fq ...] \n" -"Version: %s.%d\n" +"Version: %s\n" "\n" "Detects levels of adapter presence, computes likelihoods and\n" "locations (start, end) of the adapters. Removes the adapter\n" @@ -1562,7 +1561,7 @@ void usage(FILE *f, const char *msg) { "\n" "Homopolymer filtering is a subset of low-complexity, but will not\n" "be separately tracked unless both are turned on.\n" - ,VERSION, SVNREV); + ,VERSION); } inline int char2bp(char c) { diff --git a/clipper/fastq-multx.cpp b/clipper/fastq-multx.cpp index 43d5e7a..0772579 100644 --- a/clipper/fastq-multx.cpp +++ b/clipper/fastq-multx.cpp @@ -34,8 +34,7 @@ See "void usage" below for usage. #define THFIXFACTOR 20 #define endstr(e) (e=='e'?"end":e=='b'?"start":"n/a") -const char * VERSION = "1.02"; -#define SVNREV atoi(strchr("$LastChangedRevision$", ':')+1) +const char * VERSION = "1.02.772"; // barcode struct bc { @@ -1114,7 +1113,7 @@ void pickbest(const void *nodep, const VISIT which, const int depth) void usage(FILE *f) { fprintf(f, "Usage: fastq-multx [-g|-l|-B] -o r1.%%.fq [mate.fq -o r2.%%.fq] ...\n" -"Version: %s.%d\n" +"Version: %s\n" "\n" "Output files must contain a '%%' sign which is replaced with the barcode id in the barcodes file.\n" "Output file can be n/a to discard the corresponding data (use this for the barcode read)\n" @@ -1156,7 +1155,7 @@ void usage(FILE *f) { "-m N Allow up to N mismatches, as long as they are unique (1)\n" "-d N Require a minimum distance of N between the best and next best (2)\n" "-q N Require a minimum phred quality of N to accept a barcode base (0)\n" - ,VERSION,SVNREV); + ,VERSION); } void getbcfromheader(struct fq *fq, struct fq *bc, char **s2, int *ns2) { diff --git a/clipper/sam-stats.cpp b/clipper/sam-stats.cpp index fdf28d3..54eecae 100644 --- a/clipper/sam-stats.cpp +++ b/clipper/sam-stats.cpp @@ -41,9 +41,8 @@ #include "fastq-lib.h" -const char * VERSION = "1.38"; +const char * VERSION = "1.38.763"; -#define SVNREV atoi(strchr("$LastChangedRevision$", ':')+1) using namespace std; @@ -429,7 +428,7 @@ int main(int argc, char **argv) { if (s.dat.secondary > 0) { fprintf(o, "secondary\t%d\n", s.dat.secondary); } - fprintf(o, "version\t%s.%d\n", VERSION, SVNREV); + fprintf(o, "version\t%s\n", VERSION); // mapped reads is the number of reads that mapped at least once (either mated or not) if (s.dat.mapn > 0) { @@ -1020,7 +1019,7 @@ bool sstats::parse_bam(const char *in) { void usage(FILE *f) { fprintf(f, "Usage: sam-stats [options] [file1] [file2...filen]\n" -"Version: %s.%d\n" +"Version: %s\n" "\n" "Produces lots of easily digested statistics for the files listed\n" "\n" @@ -1080,7 +1079,7 @@ void usage(FILE *f) { " .ldist : length distribution (if applicable)\n" " .mqdist : mapping quality distribution\n" "\n" - ,VERSION, SVNREV); + ,VERSION); } std::string string_format(const std::string &fmt, ...) { diff --git a/clipper/varcall.cpp b/clipper/varcall.cpp index bc85173..a9eebc7 100644 --- a/clipper/varcall.cpp +++ b/clipper/varcall.cpp @@ -44,8 +44,7 @@ THE SOFTWARE. #include "fastq-lib.h" -#define SVNREV atoi(strchr("$Revision$", ':')+1) -const char * VERSION = "0.96"; +const char * VERSION = "0.96.819"; #define MIN_READ_LEN 20 #define DEFAULT_LOCII 1000000 @@ -446,7 +445,7 @@ int main(int argc, char **argv) { case 'q': min_qual=ok_atoi(optarg); break; case 'o': out_prefix=optarg; break; case 'Q': min_mapq=ok_atoi(optarg); break; - case 'V': printf("Version: %s.%d\n", VERSION, SVNREV); exit(0); break; + case 'V': printf("Version: %s\n", VERSION); exit(0); break; case 'R': repeat_filter=ok_atoi(optarg); break; case 'a': uminadepth=ok_atoi(optarg);break; case 'D': artifact_filter=atof(optarg);break; @@ -701,7 +700,7 @@ int main(int argc, char **argv) { output_ref=1; } - fprintf(varsum_f,"version\tvarcall-%s.%d\n", VERSION, SVNREV); + fprintf(varsum_f,"version\tvarcall-%s\n", VERSION); fprintf(varsum_f,"min depth\t%d\n", min_depth); fprintf(varsum_f,"min call depth\t%d\n", min_adepth); fprintf(varsum_f,"alpha\t%f\n", alpha); @@ -2134,7 +2133,7 @@ void VarStatVisitor::Visit(PileupSummary &p) { void usage(FILE *f) { fprintf(f, "Usage: varcall <-s|-v> <-f REF> [options] bam1 [bam2...]\n" -"Version: %s.%d (BETA)\n" +"Version: %s (BETA)\n" "\n" "Either outputs summry stats for the list of files, or performs variant calling\n" "\n" @@ -2205,7 +2204,7 @@ void usage(FILE *f) { "\n" "Filtering Details:\n" "\n" - ,VERSION, SVNREV); + ,VERSION); } std::string string_format(const std::string &fmt, ...) { @@ -2394,7 +2393,7 @@ void PileupSubscriber::SetManager(PileupManager &man) { void output_stats(VarStatVisitor &vstat) { - stat_out("version\tvarcall-%s.%d\n", VERSION, SVNREV); + stat_out("version\tvarcall-%s\n", VERSION); stat_out("min depth\t%d\n", minsampdepth); stat_out("alpha\t%f\n", alpha);