mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-10-09 09:08:11 +08:00
disable multiple assertions
This commit is contained in:
@@ -61,6 +61,7 @@ static ko_longopt_t long_options[] = {
|
|||||||
{ "path-max", ko_required_argument, 346},
|
{ "path-max", ko_required_argument, 346},
|
||||||
{ "path-min", ko_required_argument, 347},
|
{ "path-min", ko_required_argument, 347},
|
||||||
{ "trio-dual", ko_no_argument, 348},
|
{ "trio-dual", ko_no_argument, 348},
|
||||||
|
{ "ul-cut", ko_required_argument, 349},
|
||||||
// { "path-round", ko_required_argument, 348},
|
// { "path-round", ko_required_argument, 348},
|
||||||
{ 0, 0, 0 }
|
{ 0, 0, 0 }
|
||||||
};
|
};
|
||||||
@@ -174,6 +175,8 @@ void Print_H(hifiasm_opt_t* asm_opt)
|
|||||||
fprintf(stderr, " --path-min FLOAT\n");
|
fprintf(stderr, " --path-min FLOAT\n");
|
||||||
fprintf(stderr, " min path drop ratio [%.2g]; higher number may make the assembly cleaner\n", asm_opt->min_path_drop_rate);
|
fprintf(stderr, " min path drop ratio [%.2g]; higher number may make the assembly cleaner\n", asm_opt->min_path_drop_rate);
|
||||||
fprintf(stderr, " but may lead to more misassemblies\n");
|
fprintf(stderr, " but may lead to more misassemblies\n");
|
||||||
|
fprintf(stderr, " --ul-cut INT\n");
|
||||||
|
fprintf(stderr, " filter out <INT UL reads during the UL assembly [%d]\n", asm_opt->ul_min_base);
|
||||||
// fprintf(stderr, " --low-het enable it for genomes with very low het heterozygosity rate (<0.0001%%)\n");
|
// fprintf(stderr, " --low-het enable it for genomes with very low het heterozygosity rate (<0.0001%%)\n");
|
||||||
|
|
||||||
fprintf(stderr, "Example: ./hifiasm -o NA12878.asm -t 32 NA12878.fq.gz\n");
|
fprintf(stderr, "Example: ./hifiasm -o NA12878.asm -t 32 NA12878.fq.gz\n");
|
||||||
@@ -290,6 +293,7 @@ void init_opt(hifiasm_opt_t* asm_opt)
|
|||||||
asm_opt->hifi_pst_join = 1;
|
asm_opt->hifi_pst_join = 1;
|
||||||
asm_opt->ul_pst_join = 1;
|
asm_opt->ul_pst_join = 1;
|
||||||
asm_opt->trio_cov_het_ovlp = -1;
|
asm_opt->trio_cov_het_ovlp = -1;
|
||||||
|
asm_opt->ul_min_base = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void destory_enzyme(enzyme* f)
|
void destory_enzyme(enzyme* f)
|
||||||
@@ -835,6 +839,7 @@ int CommandLine_process(int argc, char *argv[], hifiasm_opt_t* asm_opt)
|
|||||||
else if (c == 346) asm_opt->max_path_drop_rate = atof(opt.arg);
|
else if (c == 346) asm_opt->max_path_drop_rate = atof(opt.arg);
|
||||||
else if (c == 347) asm_opt->min_path_drop_rate = atof(opt.arg);
|
else if (c == 347) asm_opt->min_path_drop_rate = atof(opt.arg);
|
||||||
else if (c == 348) asm_opt->trio_cov_het_ovlp = 1;
|
else if (c == 348) asm_opt->trio_cov_het_ovlp = 1;
|
||||||
|
else if (c == 349) asm_opt->ul_min_base = atol(opt.arg);
|
||||||
else if (c == 'l') { ///0: disable purge_dup; 1: purge containment; 2: purge overlap
|
else if (c == 'l') { ///0: disable purge_dup; 1: purge containment; 2: purge overlap
|
||||||
asm_opt->purge_level_primary = asm_opt->purge_level_trio = atoi(opt.arg);
|
asm_opt->purge_level_primary = asm_opt->purge_level_trio = atoi(opt.arg);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -5,7 +5,7 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define HA_VERSION "0.19.5-r593"
|
#define HA_VERSION "0.19.6-r595"
|
||||||
|
|
||||||
#define VERBOSE 0
|
#define VERBOSE 0
|
||||||
|
|
||||||
@@ -146,6 +146,7 @@ typedef struct {
|
|||||||
int32_t integer_correct_round;
|
int32_t integer_correct_round;
|
||||||
uint8_t dbg_ovec_cal;
|
uint8_t dbg_ovec_cal;
|
||||||
uint8_t hifi_pst_join, ul_pst_join;
|
uint8_t hifi_pst_join, ul_pst_join;
|
||||||
|
uint32_t ul_min_base;
|
||||||
} hifiasm_opt_t;
|
} hifiasm_opt_t;
|
||||||
|
|
||||||
extern hifiasm_opt_t asm_opt;
|
extern hifiasm_opt_t asm_opt;
|
||||||
|
|||||||
@@ -12692,7 +12692,7 @@ static void *worker_ul_scall_pipeline(void *data, int step, void *in) // callbac
|
|||||||
s->opt = p->opt; s->uu = p->uu; s->uopt = p->uopt; s->rg = p->rg;
|
s->opt = p->opt; s->uu = p->uu; s->uopt = p->uopt; s->rg = p->rg;
|
||||||
while ((ret = kseq_read(p->ks)) >= 0)
|
while ((ret = kseq_read(p->ks)) >= 0)
|
||||||
{
|
{
|
||||||
if (p->ks->seq.l < (uint64_t)p->opt->k) continue;
|
if ((p->ks->seq.l < (uint64_t)p->opt->k) || (p->ks->seq.l < asm_opt.ul_min_base)) continue;
|
||||||
if (s->n == s->m) {
|
if (s->n == s->m) {
|
||||||
s->m = s->m < 16? 16 : s->m + (s->n>>1);
|
s->m = s->m < 16? 16 : s->m + (s->n>>1);
|
||||||
REALLOC(s->len, s->m);
|
REALLOC(s->len, s->m);
|
||||||
@@ -12823,7 +12823,7 @@ static void *worker_ul_rescall_pipeline(void *data, int step, void *in) // callb
|
|||||||
s->opt = p->opt; s->uu = p->uu; s->uopt = p->uopt; s->rg = p->rg; s->mm = p->mm;
|
s->opt = p->opt; s->uu = p->uu; s->uopt = p->uopt; s->rg = p->rg; s->mm = p->mm;
|
||||||
while ((ret = kseq_read(p->ks)) >= 0)
|
while ((ret = kseq_read(p->ks)) >= 0)
|
||||||
{
|
{
|
||||||
if (p->ks->seq.l < (uint64_t)p->opt->k) continue;
|
if ((p->ks->seq.l < (uint64_t)p->opt->k) || (p->ks->seq.l < asm_opt.ul_min_base)) continue;
|
||||||
if (s->n == s->m) {
|
if (s->n == s->m) {
|
||||||
s->m = s->m < 16? 16 : s->m + (s->n>>1);
|
s->m = s->m < 16? 16 : s->m + (s->n>>1);
|
||||||
REALLOC(s->len, s->m);
|
REALLOC(s->len, s->m);
|
||||||
@@ -15956,7 +15956,7 @@ uint32_t refine_rid_chain(const asg_t *rg, mg_tbuf_t *b, ul_vec_t *rch, uint64_t
|
|||||||
{
|
{
|
||||||
if(rch->bb.n == 1 && rch->bb.a[0].base) return 1;///no alignment
|
if(rch->bb.n == 1 && rch->bb.a[0].base) return 1;///no alignment
|
||||||
if(rch->bb.n == 0) return 1;///no alignment
|
if(rch->bb.n == 0) return 1;///no alignment
|
||||||
uint64_t i, m, c[2], nc, cc, ni[2];
|
uint64_t i, m, c[2], nc, cc/**, ni[2]**/;
|
||||||
for (i = c[1] = rch->bb.n-1, m = nc = 0; i != (uint32_t)-1; i = rch->bb.a[i].pidx) {
|
for (i = c[1] = rch->bb.n-1, m = nc = 0; i != (uint32_t)-1; i = rch->bb.a[i].pidx) {
|
||||||
m++; c[0] = i; if(!(rg->seq[rch->bb.a[i].hid].del)) nc++;
|
m++; c[0] = i; if(!(rg->seq[rch->bb.a[i].hid].del)) nc++;
|
||||||
}
|
}
|
||||||
@@ -15967,16 +15967,14 @@ uint32_t refine_rid_chain(const asg_t *rg, mg_tbuf_t *b, ul_vec_t *rch, uint64_t
|
|||||||
if(rg->seq[rch->bb.a[i].hid].del) cc++;
|
if(rg->seq[rch->bb.a[i].hid].del) cc++;
|
||||||
else break;
|
else break;
|
||||||
}
|
}
|
||||||
ni[1] = i;
|
// ni[1] = i;
|
||||||
for (i = c[0]; i != (uint32_t)-1; i = rch->bb.a[i].aidx) {
|
for (i = c[0]; i != (uint32_t)-1; i = rch->bb.a[i].aidx) {
|
||||||
if(rg->seq[rch->bb.a[i].hid].del) cc++;
|
if(rg->seq[rch->bb.a[i].hid].del) cc++;
|
||||||
else break;
|
else break;
|
||||||
}
|
}
|
||||||
ni[0] = i;
|
// ni[0] = i;
|
||||||
if(nc + cc == m) return 1;
|
if(nc + cc == m) return 1;
|
||||||
assert(ni[1] > ni[0] && ni[0] != (uint32_t)-1 && ni[1] != (uint32_t)-1);
|
// assert(ni[1] > ni[0] && ni[0] != (uint32_t)-1 && ni[1] != (uint32_t)-1);
|
||||||
// fprintf(stderr, "[M::%s::%.*s(id:%ld), len:%u] aln::%lu, m::%lu, nc::%lu, cc::%lu\n", __func__,
|
|
||||||
// UL_INF.nid.a[ulid].n, UL_INF.nid.a[ulid].a, ulid, rch->rlen, (uint64_t)rch->bb.n, m, nc, cc);
|
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -16042,7 +16040,7 @@ uint32_t refine_contain_consensus_chain(const asg_t *rg, ul_vec_t *rch, R_to_U *
|
|||||||
if(!is_end) continue;
|
if(!is_end) continue;
|
||||||
i = m = k; occ = 0;
|
i = m = k; occ = 0;
|
||||||
while (i != ((uint32_t)-1)) {
|
while (i != ((uint32_t)-1)) {
|
||||||
assert(bu->a[i] == ((uint64_t)-1));
|
//assert(bu->a[i] == ((uint64_t)-1));
|
||||||
if(rg->seq[rch->bb.a[i].hid].del) {
|
if(rg->seq[rch->bb.a[i].hid].del) {
|
||||||
if(occ > 1) {
|
if(occ > 1) {
|
||||||
bu->a[m] = occ;
|
bu->a[m] = occ;
|
||||||
|
|||||||
Reference in New Issue
Block a user