From 34caf50d46734bc0ab6bc93bfd4254c6fdaec057 Mon Sep 17 00:00:00 2001 From: Nils Homer Date: Wed, 12 Aug 2020 09:01:44 -0700 Subject: [PATCH] allow the user to specify the XA drop ratio via the -z option --- fastmap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fastmap.c b/fastmap.c index c865426..fcb2e3c 100644 --- a/fastmap.c +++ b/fastmap.c @@ -156,7 +156,7 @@ int main_mem(int argc, char *argv[]) aux.opt = opt = mem_opt_init(); memset(&opt0, 0, sizeof(mem_opt_t)); - while ((c = getopt(argc, argv, "51qpaMCSPVYjuk:c:v:s:r:t:R:A:B:O:E:U:w:L:d:T:Q:D:m:I:N:o:f:W:x:G:h:y:K:X:H:")) >= 0) { + while ((c = getopt(argc, argv, "51qpaMCSPVYjuk:c:v:s:r:t:R:A:B:O:E:U:w:L:d:T:Q:D:m:I:N:o:f:W:x:G:h:y:K:X:H:z:")) >= 0) { if (c == 'k') opt->min_seed_len = atoi(optarg), opt0.min_seed_len = 1; else if (c == '1') no_mt_io = 1; else if (c == 'x') mode = optarg; @@ -198,6 +198,7 @@ int main_mem(int argc, char *argv[]) if (*p != 0 && ispunct(*p) && isdigit(p[1])) opt->max_XA_hits_alt = strtol(p+1, &p, 10); } + else if (c == 'z') opt->XA_drop_ratio = atof(optarg); else if (c == 'Q') { opt0.mapQ_coef_len = 1; opt->mapQ_coef_len = atoi(optarg); @@ -302,7 +303,12 @@ int main_mem(int argc, char *argv[]) fprintf(stderr, "\n"); fprintf(stderr, " -v INT verbosity level: 1=error, 2=warning, 3=message, 4+=debugging [%d]\n", bwa_verbose); fprintf(stderr, " -T INT minimum score to output [%d]\n", opt->T); - fprintf(stderr, " -h INT[,INT] if there are 80%% of the max score, output all in XA [%d,%d]\n", opt->max_XA_hits, opt->max_XA_hits_alt); + fprintf(stderr, " -h INT[,INT] if there are %.2f%% of the max score, output all in XA [%d,%d]\n", + opt->XA_drop_ratio * 100.0, + opt->max_XA_hits, opt->max_XA_hits_alt); + fprintf(stderr, " A second value may be given for alternate sequences.\n"); + fprintf(stderr, " -z FLOAT The fraction of the max score to use with -h [%f].\n", opt->XA_drop_ratio); + fprintf(stderr, " specify the mean, standard deviation (10%% of the mean if absent), max\n"); fprintf(stderr, " -a output all alignments for SE or unpaired PE\n"); fprintf(stderr, " -C append FASTA/FASTQ comment to SAM output\n"); fprintf(stderr, " -V output the reference FASTA header in the XR tag\n");