r151: documentations

This commit is contained in:
Heng Li 2017-07-03 12:11:07 -04:00
parent b625247300
commit a94bc31311
2 changed files with 23 additions and 11 deletions

12
main.c
View File

@ -10,7 +10,7 @@
#include "minimap.h" #include "minimap.h"
#include "mmpriv.h" #include "mmpriv.h"
#define MM_VERSION "2.0-r150-pre" #define MM_VERSION "2.0-r151-pre"
void liftrlimit() void liftrlimit()
{ {
@ -70,7 +70,7 @@ int main(int argc, char *argv[])
mm_realtime0 = realtime(); mm_realtime0 = realtime();
mm_mapopt_init(&opt); mm_mapopt_init(&opt);
while ((c = getopt_long(argc, argv, "aw:k:t:r:f:Vv:g:I:d:ST:s:x:Hcp:M:n:z:A:B:O:E:m:D:N:", long_options, &long_idx)) >= 0) { while ((c = getopt_long(argc, argv, "aw:k:t:r:f:Vv:g:I:d:XT:s:x:Hcp:M:n:z:A:B:O:E:m:D:N:", long_options, &long_idx)) >= 0) {
if (c == 'w') w = atoi(optarg); if (c == 'w') w = atoi(optarg);
else if (c == 'k') k = atoi(optarg); else if (c == 'k') k = atoi(optarg);
else if (c == 'H') is_hpc = 1; else if (c == 'H') is_hpc = 1;
@ -85,7 +85,7 @@ int main(int argc, char *argv[])
else if (c == 'D') opt.min_seedcov_ratio = atof(optarg); else if (c == 'D') opt.min_seedcov_ratio = atof(optarg);
else if (c == 'M') opt.mask_level = atof(optarg); else if (c == 'M') opt.mask_level = atof(optarg);
else if (c == 'c') opt.flag |= MM_F_CIGAR; else if (c == 'c') opt.flag |= MM_F_CIGAR;
else if (c == 'S') opt.flag |= MM_F_AVA | MM_F_NO_SELF; else if (c == 'X') opt.flag |= MM_F_AVA | MM_F_NO_SELF;
else if (c == 'a') opt.flag |= MM_F_OUT_SAM | MM_F_CIGAR; else if (c == 'a') opt.flag |= MM_F_OUT_SAM | MM_F_CIGAR;
else if (c == 'T') opt.sdust_thres = atoi(optarg); else if (c == 'T') opt.sdust_thres = atoi(optarg);
else if (c == 'n') opt.min_cnt = atoi(optarg); else if (c == 'n') opt.min_cnt = atoi(optarg);
@ -145,12 +145,12 @@ int main(int argc, char *argv[])
fprintf(stderr, " -n INT minimal number of minimizers on a chain [%d]\n", opt.min_cnt); fprintf(stderr, " -n INT minimal number of minimizers on a chain [%d]\n", opt.min_cnt);
fprintf(stderr, " -m INT minimal chaining score (matching bases minus log gap penalty) [%d]\n", opt.min_chain_score); fprintf(stderr, " -m INT minimal chaining score (matching bases minus log gap penalty) [%d]\n", opt.min_chain_score);
// fprintf(stderr, " -T INT SDUST threshold; 0 to disable SDUST [%d]\n", opt.sdust_thres); // TODO: this option is never used; might be buggy // fprintf(stderr, " -T INT SDUST threshold; 0 to disable SDUST [%d]\n", opt.sdust_thres); // TODO: this option is never used; might be buggy
fprintf(stderr, " -S skip self and dual mappings (for the all-vs-all mode)\n"); fprintf(stderr, " -X skip self and dual mappings (for the all-vs-all mode)\n");
fprintf(stderr, " -p FLOAT min secondary-to-primary score ratio [%g]\n", opt.pri_ratio); fprintf(stderr, " -p FLOAT min secondary-to-primary score ratio [%g]\n", opt.pri_ratio);
fprintf(stderr, " -N INT retain at most INT secondary alignments [%d]\n", opt.best_n); fprintf(stderr, " -N INT retain at most INT secondary alignments [%d]\n", opt.best_n);
fprintf(stderr, " -D FLOAT min fraction of minimizer matches [%g]\n", opt.min_seedcov_ratio); fprintf(stderr, " -D FLOAT min fraction of minimizer matches [%g]\n", opt.min_seedcov_ratio);
fprintf(stderr, " -x STR preset (recommended to be applied before other options) []\n"); fprintf(stderr, " -x STR preset (recommended to be applied before other options) []\n");
fprintf(stderr, " ava10k: -Hk19 -Sw5 -p0 -m100 -D.05 (PacBio/ONT all-vs-all read mapping)\n"); fprintf(stderr, " ava10k: -Hk19 -w5 -Xp0 -m100 -D.05 (PacBio/ONT all-vs-all read mapping)\n");
fprintf(stderr, " map10k: -Hk19 (PacBio/ONT vs reference mapping)\n"); fprintf(stderr, " map10k: -Hk19 (PacBio/ONT vs reference mapping)\n");
fprintf(stderr, " asm1m: -k19 -w19 (intra-species assembly to ref mapping)\n"); fprintf(stderr, " asm1m: -k19 -w19 (intra-species assembly to ref mapping)\n");
fprintf(stderr, " Alignment:\n"); fprintf(stderr, " Alignment:\n");
@ -166,7 +166,7 @@ int main(int argc, char *argv[])
fprintf(stderr, " -t INT number of threads [%d]\n", n_threads); fprintf(stderr, " -t INT number of threads [%d]\n", n_threads);
// fprintf(stderr, " -v INT verbose level [%d]\n", mm_verbose); // fprintf(stderr, " -v INT verbose level [%d]\n", mm_verbose);
fprintf(stderr, " -V show version number\n"); fprintf(stderr, " -V show version number\n");
fprintf(stderr, "\nSee minimap2.1 for detailed description of the command-line options.\n"); fprintf(stderr, "\nSee `man ./minimap2.1' for detailed description of command-line options.\n");
return 1; return 1;
} }

View File

@ -142,7 +142,7 @@ not using
.BR -H ) .BR -H )
minus base-2 logarithm gap penalty. It is computed with dynamic programming. minus base-2 logarithm gap penalty. It is computed with dynamic programming.
.TP .TP
.B -S .B -X
Perform all-vs-all mapping. In this mode, if the query sequence name is Perform all-vs-all mapping. In this mode, if the query sequence name is
lexicographically larger than the target sequence name, the hits between them lexicographically larger than the target sequence name, the hits between them
will be suppressed; if the query sequence name is the same as the target name, will be suppressed; if the query sequence name is the same as the target name,
@ -160,7 +160,9 @@ the secondary chain will not be outputted or extended with DP alignment later.
.BI -N \ INT .BI -N \ INT
Output at most Output at most
.I INT .I INT
secondary alignments [5] secondary alignments [5]. This option has no effect when
.B -X
is applied.
.TP .TP
.BI -D \ FLOAT .BI -D \ FLOAT
Discard a chain if the fraction of matching bases over the length of Discard a chain if the fraction of matching bases over the length of
@ -179,7 +181,7 @@ are:
.RS .RS
.TP 8 .TP 8
.B ava10k .B ava10k
PacBio/Oxford Nanopore all-vs-all overlap mapping (-Hk19 -Sw5 -p0 -m100 -D.05) PacBio/Oxford Nanopore all-vs-all overlap mapping (-Hk19 -w5 -Xp0 -m100 -D.05)
.TP .TP
.B map10k .B map10k
PacBio/Oxford Nanopore read to reference mapping (-Hk19) PacBio/Oxford Nanopore read to reference mapping (-Hk19)
@ -224,14 +226,24 @@ by default.
Generate CIGAR. In PAF, the CIGAR is written to the `cg' custom tag. Generate CIGAR. In PAF, the CIGAR is written to the `cg' custom tag.
.TP .TP
.BI -t \ INT .BI -t \ INT
Number of threads [3]. Minimap2 uses at most three threads when collecting Number of threads [3]. Minimap2 uses at most three threads when indexing target
minimizers on target sequences, and uses up to sequences, and uses up to
.IR INT +1 .IR INT +1
threads when mapping (the extra thread is for I/O, which is frequently idle and threads when mapping (the extra thread is for I/O, which is frequently idle and
takes little CPU time). takes little CPU time).
.TP .TP
.B -V .B -V
Print version number to stdout Print version number to stdout
.SS Miscellaneous options
.TP 10
.B --no-kalloc
Use the libc default allocator instead of the kalloc thread-local allocator.
This debugging option is mostly used with Valgrind to detect invalid memory
accesses. Minimap2 runs slower with this option, especially in the
multi-threading mode.
.TP
.B --print-qname
Print query names to stderr, mostly to see which query is crashing minimap2.
.SH OUTPUT FORMAT .SH OUTPUT FORMAT
.PP .PP
Minimap2 outputs mapping positions in the Pairwise mApping Format (PAF) by Minimap2 outputs mapping positions in the Pairwise mApping Format (PAF) by