Skip to content

Commit

Permalink
Merge pull request #44 from mattnashbrowns/desubvert
Browse files Browse the repository at this point in the history
Removed LastChangedRevision SVN magic
  • Loading branch information
ExpressionAnalysis committed Feb 26, 2016
2 parents 92827c4 + e460ca8 commit 27a4809
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 29 deletions.
7 changes: 3 additions & 4 deletions clipper/ea-bcl2fastq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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); }

Expand Down Expand Up @@ -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"
Expand All @@ -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) {
Expand Down
7 changes: 3 additions & 4 deletions clipper/fastq-join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
9 changes: 4 additions & 5 deletions clipper/fastq-mcf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -1453,7 +1452,7 @@ void usage(FILE *f, const char *msg) {

fprintf(f,
"Usage: fastq-mcf [options] <adapters.fa> <reads.fq> [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"
Expand Down Expand Up @@ -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) {
Expand Down
7 changes: 3 additions & 4 deletions clipper/fastq-multx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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] <barcodes.fil> <read1.fq> -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"
Expand Down Expand Up @@ -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) {
Expand Down
9 changes: 4 additions & 5 deletions clipper/sam-stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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, ...) {
Expand Down
13 changes: 6 additions & 7 deletions clipper/varcall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -2205,7 +2204,7 @@ void usage(FILE *f) {
"\n"
"Filtering Details:\n"
"\n"
,VERSION, SVNREV);
,VERSION);
}

std::string string_format(const std::string &fmt, ...) {
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 27a4809

Please sign in to comment.