Merge branch 'master' into clip2
This commit is contained in:
commit
ed78df9184
|
|
@ -301,6 +301,7 @@ int mem_sam_pe(const mem_opt_t *opt, const bntseq_t *bns, const uint8_t *pac, co
|
||||||
h[1] = mem_reg2aln(opt, bns, pac, s[1].l_seq, s[1].seq, &a[1].a[z[1]]); h[1].mapq = q_se[1]; h[1].flag |= 0x80 | extra_flag;
|
h[1] = mem_reg2aln(opt, bns, pac, s[1].l_seq, s[1].seq, &a[1].a[z[1]]); h[1].mapq = q_se[1]; h[1].flag |= 0x80 | extra_flag;
|
||||||
mem_aln2sam(bns, &str, &s[0], 1, &h[0], 0, &h[1]); s[0].sam = strdup(str.s); str.l = 0;
|
mem_aln2sam(bns, &str, &s[0], 1, &h[0], 0, &h[1]); s[0].sam = strdup(str.s); str.l = 0;
|
||||||
mem_aln2sam(bns, &str, &s[1], 1, &h[1], 0, &h[0]); s[1].sam = str.s;
|
mem_aln2sam(bns, &str, &s[1], 1, &h[1], 0, &h[0]); s[1].sam = str.s;
|
||||||
|
if (strcmp(s[0].name, s[1].name) != 0) err_fatal(__func__, "paired reads have different names: \"%s\", \"%s\"\n", s[0].name, s[1].name);
|
||||||
free(h[0].cigar); free(h[1].cigar);
|
free(h[0].cigar); free(h[1].cigar);
|
||||||
} else goto no_pairing;
|
} else goto no_pairing;
|
||||||
return n;
|
return n;
|
||||||
|
|
@ -319,6 +320,7 @@ no_pairing:
|
||||||
}
|
}
|
||||||
mem_reg2sam_se(opt, bns, pac, &s[0], &a[0], 0x41|extra_flag, &h[1]);
|
mem_reg2sam_se(opt, bns, pac, &s[0], &a[0], 0x41|extra_flag, &h[1]);
|
||||||
mem_reg2sam_se(opt, bns, pac, &s[1], &a[1], 0x81|extra_flag, &h[0]);
|
mem_reg2sam_se(opt, bns, pac, &s[1], &a[1], 0x81|extra_flag, &h[0]);
|
||||||
|
if (strcmp(s[0].name, s[1].name) != 0) err_fatal(__func__, "paired reads have different names: \"%s\", \"%s\"\n", s[0].name, s[1].name);
|
||||||
free(h[0].cigar); free(h[1].cigar);
|
free(h[0].cigar); free(h[1].cigar);
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1
bwape.c
1
bwape.c
|
|
@ -706,6 +706,7 @@ void bwa_sai2sam_pe_core(const char *prefix, char *const fn_sa[2], char *const f
|
||||||
}
|
}
|
||||||
bwa_print_sam1(bns, p[0], p[1], opt.mode, opt.max_top2);
|
bwa_print_sam1(bns, p[0], p[1], opt.mode, opt.max_top2);
|
||||||
bwa_print_sam1(bns, p[1], p[0], opt.mode, opt.max_top2);
|
bwa_print_sam1(bns, p[1], p[0], opt.mode, opt.max_top2);
|
||||||
|
if (strcmp(p[0]->name, p[1]->name) != 0) err_fatal(__func__, "paired reads have different names: \"%s\", \"%s\"\n", p[0]->name, p[1]->name);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "%.2f sec\n", (float)(clock() - t) / CLOCKS_PER_SEC); t = clock();
|
fprintf(stderr, "%.2f sec\n", (float)(clock() - t) / CLOCKS_PER_SEC); t = clock();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ int main_mem(int argc, char *argv[])
|
||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
if (opt->n_threads < 1) opt->n_threads = 1;
|
if (opt->n_threads < 1) opt->n_threads = 1;
|
||||||
if (optind + 1 >= argc) {
|
if (optind + 1 >= argc || optind + 3 < argc) {
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
fprintf(stderr, "Usage: bwa mem [options] <idxbase> <in1.fq> [in2.fq]\n\n");
|
fprintf(stderr, "Usage: bwa mem [options] <idxbase> <in1.fq> [in2.fq]\n\n");
|
||||||
fprintf(stderr, "Algorithm options:\n\n");
|
fprintf(stderr, "Algorithm options:\n\n");
|
||||||
|
|
|
||||||
9
main.c
9
main.c
|
|
@ -46,10 +46,11 @@ static int usage()
|
||||||
fprintf(stderr, " bwtupdate update .bwt to the new format\n");
|
fprintf(stderr, " bwtupdate update .bwt to the new format\n");
|
||||||
fprintf(stderr, " bwt2sa generate SA from BWT and Occ\n");
|
fprintf(stderr, " bwt2sa generate SA from BWT and Occ\n");
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
fprintf(stderr, "Note: To use BWA, you need to first index the genome with `bwa index'. There are\n");
|
fprintf(stderr,
|
||||||
fprintf(stderr, " three alignment algorithms in BWA: `mem', `bwasw' and `aln/samse/sampe'. If\n");
|
"Note: To use BWA, you need to first index the genome with `bwa index'.\n"
|
||||||
fprintf(stderr, " you are not sure which to use, try `bwa mem' first. Please `man ./bwa.1' for\n");
|
" There are three alignment algorithms in BWA: `mem', `bwasw', and\n"
|
||||||
fprintf(stderr, " for the manual.\n\n");
|
" `aln/samse/sampe'. If you are not sure which to use, try `bwa mem'\n"
|
||||||
|
" first. Please `man ./bwa.1' for the manual.\n\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue