Mercurial > repos > chrisd > testshed
comparison snp_caller/src/main.cpp @ 0:0fd352f62446 draft default tip
planemo upload for repository https://github.com/ChrisD11/Duplicon commit 3ee0594c692faac542ffa58f4339d79b9b8aefbd-dirty
author | chrisd |
---|---|
date | Sun, 21 Feb 2016 06:05:24 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0fd352f62446 |
---|---|
1 #include <iostream> | |
2 #include <string> | |
3 #include <vector> | |
4 | |
5 #include "args.h" | |
6 #include "Fasta.h" | |
7 #include "FastaRecord.h" | |
8 #include "Sam.h" | |
9 #include "SnipDriver.h" | |
10 | |
11 using namespace std; | |
12 | |
13 void print_fasta(const Fasta &f) { | |
14 for(const auto &record: f.records) { | |
15 cout << record.gene_id() << endl; | |
16 cout << record.gene() << endl; | |
17 } | |
18 } | |
19 | |
20 void print_sam(const Sam &s) { | |
21 for(const auto &alignment: s.alignments) { | |
22 cout << alignment.alignment() << endl; | |
23 } | |
24 } | |
25 | |
26 int main(int argc, const char *argv[]) { | |
27 cmd_args arg; | |
28 arg = parse_command_line(argc, argv); | |
29 | |
30 Fasta f(arg.amr_fp); | |
31 f.read_fasta(arg.amr_fp); | |
32 | |
33 Sam s(arg.sam_fp); | |
34 if(arg.samse) { | |
35 s.read_se_sam(arg.sam_fp, arg.best); | |
36 } | |
37 else { | |
38 s.read_pe_sam(arg.sam_fp, arg.best); | |
39 } | |
40 | |
41 run(f.records, s.alignments, arg); | |
42 write_snips(f.records, arg.out_fp); | |
43 | |
44 | |
45 return 0; | |
46 } |