Skip to content

Commit

Permalink
r339: pemerge - expose some settings to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
lh3 committed Mar 7, 2013
1 parent 1cadfa1 commit 503ca9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[]);
Expand Down
9 changes: 7 additions & 2 deletions pemerge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 503ca9e

Please sign in to comment.