annotate pyPRADA_1.2/tools/bwa-0.5.7-mh/main.c @ 3:f17965495ec9 draft default tip

Uploaded
author siyuan
date Tue, 11 Mar 2014 12:14:01 -0400
parents acc2ca1a3ba4
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
1 #include <stdio.h>
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
2 #include <string.h>
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
3 #include "main.h"
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
4
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
5 #ifndef PACKAGE_VERSION
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
6 #define PACKAGE_VERSION "0.5.7 (r1310)"
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
7 #endif
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
8
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
9 static int usage()
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
10 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
11 fprintf(stderr, "\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
12 fprintf(stderr, "Program: bwa (alignment via Burrows-Wheeler transformation)\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
13 fprintf(stderr, "Version: %s\n", PACKAGE_VERSION);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
14 fprintf(stderr, "Contact: Heng Li <lh3@sanger.ac.uk>\n\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
15 fprintf(stderr, "Usage: bwa <command> [options]\n\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
16 fprintf(stderr, "Command: index index sequences in the FASTA format\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
17 fprintf(stderr, " aln gapped/ungapped alignment\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
18 fprintf(stderr, " samse generate alignment (single ended)\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
19 fprintf(stderr, " sampe generate alignment (paired ended)\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
20 fprintf(stderr, " bwasw BWA-SW for long queries\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
21 fprintf(stderr, "\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
22 fprintf(stderr, " fa2pac convert FASTA to PAC format\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
23 fprintf(stderr, " pac2bwt generate BWT from PAC\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
24 fprintf(stderr, " pac2bwtgen alternative algorithm for generating BWT\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
25 fprintf(stderr, " bwtupdate update .bwt to the new format\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
26 fprintf(stderr, " pac_rev generate reverse PAC\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
27 fprintf(stderr, " bwt2sa generate SA from BWT and Occ\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
28 fprintf(stderr, " pac2cspac convert PAC to color-space PAC\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
29 fprintf(stderr, " stdsw standard SW/NW alignment\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
30 fprintf(stderr, "\n");
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
31 return 1;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
32 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
33
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
34 int main(int argc, char *argv[])
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
35 {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
36 if (argc < 2) return usage();
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
37 if (strcmp(argv[1], "fa2pac") == 0) return bwa_fa2pac(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
38 else if (strcmp(argv[1], "pac2bwt") == 0) return bwa_pac2bwt(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
39 else if (strcmp(argv[1], "pac2bwtgen") == 0) return bwt_bwtgen_main(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
40 else if (strcmp(argv[1], "bwtupdate") == 0) return bwa_bwtupdate(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
41 else if (strcmp(argv[1], "pac_rev") == 0) return bwa_pac_rev(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
42 else if (strcmp(argv[1], "bwt2sa") == 0) return bwa_bwt2sa(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
43 else if (strcmp(argv[1], "index") == 0) return bwa_index(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
44 else if (strcmp(argv[1], "aln") == 0) return bwa_aln(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
45 else if (strcmp(argv[1], "sw") == 0) return bwa_stdsw(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
46 else if (strcmp(argv[1], "samse") == 0) return bwa_sai2sam_se(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
47 else if (strcmp(argv[1], "sampe") == 0) return bwa_sai2sam_pe(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
48 else if (strcmp(argv[1], "pac2cspac") == 0) return bwa_pac2cspac(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
49 else if (strcmp(argv[1], "stdsw") == 0) return bwa_stdsw(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
50 else if (strcmp(argv[1], "bwtsw2") == 0) return bwa_bwtsw2(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
51 else if (strcmp(argv[1], "dbwtsw") == 0) return bwa_bwtsw2(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
52 else if (strcmp(argv[1], "bwasw") == 0) return bwa_bwtsw2(argc-1, argv+1);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
53 else {
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
54 fprintf(stderr, "[main] unrecognized command '%s'\n", argv[1]);
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
55 return 1;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
56 }
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
57 return 0;
acc2ca1a3ba4 Uploaded
siyuan
parents:
diff changeset
58 }