Permalink
Browse files

r339: pemerge - expose some settings to CLI

  • Loading branch information...
1 parent 1cadfa1 commit 503ca9ed2e9d82727c38ed587c368905da43cc66 @lh3 committed Mar 7, 2013
Showing with 8 additions and 3 deletions.
  1. +1 −1 main.c
  2. +7 −2 pemerge.c
View
@@ -3,7 +3,7 @@
#include "utils.h"
#ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.7.0-r338-beta"
+#define PACKAGE_VERSION "0.7.0-r339-beta"
#endif
int bwa_fa2pac(int argc, char *argv[]);
View
@@ -210,27 +210,32 @@ static void process_seqs(const pem_opt_t *opt, int n_, bseq1_t *seqs, int64_t cn
int main_pemerge(int argc, char *argv[])
{
- int c, flag = 0, i, n;
+ int c, flag = 0, i, n, min_ovlp = 10;
int64_t cnt[MAX_ERR+1];
bseq1_t *bseq;
gzFile fp, fp2 = 0;
kseq_t *ks, *ks2 = 0;
pem_opt_t *opt;
opt = pem_opt_init();
- while ((c = getopt(argc, argv, "muQ:")) >= 0) {
+ while ((c = getopt(argc, argv, "muQ:t:T:")) >= 0) {
if (c == 'm') flag |= 1;
else if (c == 'u') flag |= 2;
else if (c == 'Q') opt->q_thres = atoi(optarg);
+ else if (c == 't') opt->n_threads = atoi(optarg);
+ else if (c == 'T') min_ovlp = atoi(optarg);
}
if (flag == 0) flag = 3;
opt->flag = flag;
+ opt->T = opt->a * min_ovlp;
if (optind == argc) {
fprintf(stderr, "\n");
fprintf(stderr, "Usage: bwa pemerge [-mu] <read1.fq> [read2.fq]\n\n");
fprintf(stderr, "Options: -m output merged reads only\n");
fprintf(stderr, " -u output unmerged reads only\n");
+ fprintf(stderr, " -t INT number of threads [%d]\n", opt->n_threads);
+ fprintf(stderr, " -T INT minimum end overlap [%d]\n", min_ovlp);
fprintf(stderr, " -Q INT max sum of errors [%d]\n", opt->q_thres);
fprintf(stderr, "\n");
free(opt);

0 comments on commit 503ca9e

Please sign in to comment.