-
Notifications
You must be signed in to change notification settings - Fork 1
/
longreadqc.cpp
56 lines (50 loc) · 1.45 KB
/
longreadqc.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include "tk.h"
int main_qcfq (int argc, char * argv[]);
int main_qcfa (int argc, char * argv[]);
int main_qcbam (int argc, char * argv[]);
int main_qcpaf (int argc, char * argv[]);
int main_filterfq (int argc, char * argv[]);
int usage()
{
printf(
"\n"
"Program: longreadqc (Quality control tool for long read sequencing)\n"
"\n"
"Usage: longreadqc fq quality control for FASTQ files\n"
" longreadqc filterfq filter FASTQ reads \n"
" longreadqc paf quality control for PAF file \n"
//" longreadqc fa quality control for fasta files\n"
//" longreadqc bam quality control for bam files\n"
);
return 0;
}
int main(int argc, char * argv[])
{
if (argc < 2) {
usage();
return 1;
}
if (strcmp(argv[1], "help") == 0 || strcmp(argv[1], "--help") == 0) {
usage();
return 0;
}
int ret = 0;
if(strcmp(argv[1], "fq") == 0){
ret = main_qcfq(argc-1, argv+1);
}else if (strcmp(argv[1], "fa") == 0){
ret = main_qcfa(argc-1, argv+1);
}else if (strcmp(argv[1], "paf") == 0){
ret = main_qcpaf(argc-1, argv+1);
}else if (strcmp(argv[1], "bam") == 0){
ret = main_qcbam(argc-1, argv+1);
}else if (strcmp(argv[1], "filterfq") == 0){
ret = main_filterfq(argc-1, argv+1);
}else{
usage();
return 0;
}
return ret;
}