final DP-based assembly

This commit is contained in:
Haoyu Cheng
2019-11-13 20:18:11 -05:00
parent d6c6a1fa11
commit ada03ea388
22 changed files with 19432 additions and 1178 deletions

View File

@@ -9,6 +9,7 @@ char* read_file_name = NULL;
char* output_file_name = NULL;
int thread_num = 1;
int k_mer_length = 40;
int coverage = -1;
//int k_mer_min_freq = 9;
int k_mer_min_freq = 3;
//int k_mer_min_freq = 2;
@@ -16,7 +17,10 @@ int k_mer_max_freq = 66;
int load_index_from_disk = 0;
int write_index_to_disk = 0;
int number_of_round = 1;
int read_graph = 0;
int c_round = 4;
int adapterLen = 0;
char* required_read_name = NULL;
double Get_T(void)
{
@@ -28,6 +32,8 @@ double Get_T(void)
void Print_H()
{
fprintf(stderr, "Incorrect options.\n");
fprintf(stderr, "./ccs_assembly -w -l -q NA12878_chr1_10M.fq -o output_NA12878_v11_2.fa -c 31 -k 40 -t 32 -r 2 -a 4 -z 0\n");
}
@@ -50,7 +56,7 @@ int CommandLine_process (int argc, char *argv[])
ketopt_t opt = KETOPT_INIT;
int i, c;
while ((c = ketopt(&opt, argc, argv, 1, "ht:o:q:k:lwm:n:r:", longopts)) >= 0) {
while ((c = ketopt(&opt, argc, argv, 1, "ht:o:q:k:lwm:n:r:c:a:b:z:", longopts)) >= 0) {
if (c == 100 || c == 'h') Print_H();
else if (c == 103 || c == 't') thread_num = atoi(opt.arg);
else if (c == 102 || c == 'o') output_file_name = opt.arg;
@@ -61,6 +67,10 @@ int CommandLine_process (int argc, char *argv[])
else if (c == 'k') k_mer_length = atoi(opt.arg);
else if (c == 'l') load_index_from_disk = 1;
else if (c == 'w') write_index_to_disk = 1;
else if (c == 'c') coverage = atoi(opt.arg);
else if (c == 'a') c_round = atoi(opt.arg);
else if (c == 'z') adapterLen = atoi(opt.arg);
else if (c == 'b') required_read_name = opt.arg;
else if (c == '?') printf("unknown opt: -%c\n", opt.opt? opt.opt : ':');
else if (c == ':') printf("missing arg: -%c\n", opt.opt? opt.opt : ':');
}
@@ -72,6 +82,13 @@ int CommandLine_process (int argc, char *argv[])
return 0;
}
if(coverage == -1)
{
fprintf(stdout, "Please set -c!\n");
Print_H();
return 0;
}
return 1;
}