1
2 /******************************************************************************
3 *
4 * This file is part of canu, a software program that assembles whole-genome
5 * sequencing reads into contigs.
6 *
7 * This software is based on:
8 * 'Celera Assembler' r4587 (http://wgs-assembler.sourceforge.net)
9 * the 'kmer package' r1994 (http://kmer.sourceforge.net)
10 *
11 * Except as indicated otherwise, this is a 'United States Government Work',
12 * and is released in the public domain.
13 *
14 * File 'README.licenses' in the root directory of this distribution
15 * contains full conditions and disclaimers.
16 */
17
18 #include "runtime.H"
19
20 #include "sqStore.H"
21 #include "tgStore.H"
22
23
24 int
main(int argc,char ** argv)25 main(int argc, char **argv) {
26 tgTig tig;
27 char *seqName = NULL;
28 char *tigFileName = NULL;
29
30 argc = AS_configure(argc, argv, 1);
31
32 int arg=1;
33 int err=0;
34 while (arg < argc) {
35 if (strcmp(argv[arg], "-S") == 0) {
36 seqName = argv[++arg];
37
38 } else if (strcmp(argv[arg], "-t") == 0) {
39 tigFileName = argv[++arg];
40
41 } else {
42 err++;
43 }
44
45 arg++;
46 }
47 if (seqName == NULL)
48 err++;
49 if (tigFileName == NULL)
50 err++;
51 if (err) {
52 fprintf(stderr, "usage: %s -S seqStore -t tigFile\n", argv[0]);
53 exit(1);
54 }
55
56 sqStore *seqStore = new sqStore(seqName);
57
58 FILE *F = fopen(tigFileName, "r");
59
60 tig.loadFromStream(F);
61
62 AS_UTL_closeFile(F, tigFileName);
63
64 uint32 displayWidth = 250;
65 uint32 displaySpacing = 10;
66 bool withQV = false;
67 bool withDots = true;
68
69 tig.display(stdout, seqStore, displayWidth, displaySpacing, withQV, withDots);
70
71 exit(0);
72 }
73