mirror of
https://github.com/chhylp123/hifiasm.git
synced 2026-09-16 05:07:55 +08:00
Compare commits
26 Commits
hifiasm_de
...
0.19.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ac574adc7 | ||
|
|
7f6d36b2c4 | ||
|
|
40e2a48706 | ||
|
|
e974b22ac0 | ||
|
|
94a284b430 | ||
|
|
30d2ee065e | ||
|
|
d91fc50058 | ||
|
|
abff5fae04 | ||
|
|
2cc990ed22 | ||
|
|
5bddae4ae9 | ||
|
|
fbfcf72eb3 | ||
|
|
b49b4a6cc7 | ||
|
|
00959dfdd9 | ||
|
|
00ad7458c3 | ||
|
|
b763e1ff76 | ||
|
|
7bb366688e | ||
|
|
f69166ee3b | ||
|
|
fa663a9680 | ||
|
|
8a00c6c5f4 | ||
|
|
ad4ff5550b | ||
|
|
dd5f368fe6 | ||
|
|
27f77dca29 | ||
|
|
026cf97d61 | ||
|
|
1dd82e7729 | ||
|
|
6c91e8b0a7 | ||
|
|
7280f132b1 |
17
Correct.cpp
17
Correct.cpp
@@ -290,7 +290,7 @@ int* r_extra_begin, int* r_extra_end, long long* r_y_start, long long* r_y_lengt
|
||||
|
||||
///since Window_Len == x_len + (threshold << 1)
|
||||
if(y_start < 0 || currentIDLen <= y_start ||
|
||||
currentIDLen - y_start + 2 * threshold + THRESHOLD_MAX_SIZE < Window_Len)///if ylen is too small
|
||||
currentIDLen - y_start + 2 * threshold + THRESHOLD_MAX_SIZE < Window_Len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -1770,9 +1770,9 @@ inline int move_gap_greedy(char* path, int path_i, int path_length, char* x, int
|
||||
|
||||
/**
|
||||
*
|
||||
GGCG-TGTGCCTGT [Y]
|
||||
GGCG-TGTGCCTGT
|
||||
*
|
||||
GGCAATGTGCCTGT [X]
|
||||
GGCAATGTGCCTGT
|
||||
*
|
||||
00013000000000
|
||||
**/
|
||||
@@ -1782,7 +1782,7 @@ inline int move_gap_greedy(char* path, int path_i, int path_length, char* x, int
|
||||
char oper = path[path_i];
|
||||
|
||||
|
||||
if(oper == 3)///there are more x; path[] is in reverse order
|
||||
if(oper == 3)///there are more x
|
||||
{
|
||||
path_i++;
|
||||
y_i--;
|
||||
@@ -3197,7 +3197,7 @@ inline void recalcate_window_advance(overlap_region_alloc* overlap_list, All_rea
|
||||
// z->w_list.a[i].x_start, z->w_list.a[i].x_end, w_e);
|
||||
// }
|
||||
assert(z->w_list.a[i].x_end == w_e);
|
||||
total_y_start = z->w_list.a[i].y_end + 1 - z->w_list.a[i].extra_begin;///since y_end has extra_begin
|
||||
total_y_start = z->w_list.a[i].y_end + 1 - z->w_list.a[i].extra_begin;
|
||||
for (k = w_id + 1; k < nw; k++) {
|
||||
if(w_idx[k] != (uint64_t)-1) break;
|
||||
w_s = w_e + 1;
|
||||
@@ -9287,7 +9287,7 @@ int insert_snp_ee(haplotype_evdience_alloc* h, haplotype_evdience* a, uint64_t a
|
||||
uint32_t is_homopolymer = (uint32_t)-1;
|
||||
if(occ_0 == 0 || diff <= 1) return 0;
|
||||
for (i = m = 0; i < 4; i++) {
|
||||
if(occ_1[i] >= 2){///Improve: it would be better to double check the bases around this snp at different overlapped reads to make sure this snp is real, instead of by chance
|
||||
if(occ_1[i] >= 2){
|
||||
if(!km) kv_pushp(SnpStats, h->snp_stat, &p);
|
||||
else kv_pushp_km(km, SnpStats, h->snp_stat, &p);
|
||||
p->id = h->snp_stat.n-1;
|
||||
@@ -9674,7 +9674,7 @@ void correct_overlap(overlap_region_alloc* overlap_list, All_reads* R_INF,
|
||||
|
||||
int flag = 0;
|
||||
|
||||
while(get_Window(&w_inf, &window_start, &window_end) && flag != -2)///Improve: discard alignments with too many diff early
|
||||
while(get_Window(&w_inf, &window_start, &window_end) && flag != -2)
|
||||
{
|
||||
dumy->length = 0;
|
||||
dumy->lengthNT = 0;
|
||||
@@ -9700,12 +9700,9 @@ void correct_overlap(overlap_region_alloc* overlap_list, All_reads* R_INF,
|
||||
|
||||
// recalcate_window(overlap_list, R_INF, g_read, dumy, overlap_read);
|
||||
// partition_overlaps(overlap_list, R_INF, g_read, dumy, hap, force_repeat);
|
||||
///Improve: we should also use the base quality to avoid additional base-pair dp or even for the chaining
|
||||
//////Improve: we may also consider to do quick conesensus among candidate overlapped reads to make sure if inforamtive sites are real
|
||||
recalcate_window_advance(overlap_list, R_INF, NULL, g_read, dumy, overlap_read, v_idx, w_inf.window_length, asm_opt.max_ov_diff_ec, asm_opt.max_ov_diff_final);
|
||||
// fprintf(stderr, "[M::%s-beg] occ[0]->%lu, occ[1]->%lu, occ[2]->%lu, occ[3]->%lu\n", __func__,
|
||||
// ovlp_occ(overlap_list, 0), ovlp_occ(overlap_list, 1), ovlp_occ(overlap_list, 2), ovlp_occ(overlap_list, 3));
|
||||
///Improve: only keeps specific number of trans overlaps to save memory
|
||||
partition_overlaps_advance(overlap_list, R_INF, g_read, overlap_read, dumy, hap, force_repeat);
|
||||
// fprintf(stderr, "[M::%s-after] occ[0]->%lu, occ[1]->%lu, occ[2]->%lu, occ[3]->%lu\n", __func__,
|
||||
// ovlp_occ(overlap_list, 0), ovlp_occ(overlap_list, 1), ovlp_occ(overlap_list, 2), ovlp_occ(overlap_list, 3));
|
||||
|
||||
@@ -1134,7 +1134,7 @@ void calculate_overlap_region_by_chaining(Candidates_list* candidates, overlap_r
|
||||
{
|
||||
continue;
|
||||
}
|
||||
///Improve: direct filter out too sparse chain before chaining
|
||||
|
||||
chain_DP(candidates->list + sub_region_beg,
|
||||
sub_region_end - sub_region_beg + 1, &(candidates->chainDP), f_cigar, band_width_threshold,
|
||||
25, /**Get_READ_LENGTH((*R_INF), (*f_cigar).x_id)**/readLength,
|
||||
|
||||
@@ -126,7 +126,7 @@ void ha_get_new_candidates(ha_abuf_t *ab, int64_t rid, UC_Read *ucr, overlap_reg
|
||||
ha_mz1_t *z = &ab->mz.a[i];
|
||||
seed1_t *s = &ab->seed[i];
|
||||
for (j = 0; j < s->n; ++j) {
|
||||
const ha_idxpos_t *y = &s->a[j];///Improve: filter out y->rid == rid
|
||||
const ha_idxpos_t *y = &s->a[j];
|
||||
anchor1_t *an = &ab->a[k++];
|
||||
uint8_t rev = z->rev == y->rev? 0 : 1;
|
||||
an->other_off = y->pos;
|
||||
@@ -152,7 +152,7 @@ void ha_get_new_candidates(ha_abuf_t *ab, int64_t rid, UC_Read *ucr, overlap_reg
|
||||
cl->size = ab->m_a;
|
||||
REALLOC(cl->list, cl->size);
|
||||
}
|
||||
for (k = 0; k < ab->n_a; ++k) {///Improve: direct use ab->a instead of cl->list
|
||||
for (k = 0; k < ab->n_a; ++k) {
|
||||
k_mer_hit *p = &cl->list[k];
|
||||
p->readID = ab->a[k].srt >> 33;
|
||||
p->strand = ab->a[k].srt >> 32 & 1;
|
||||
@@ -184,7 +184,7 @@ void ha_get_new_candidates(ha_abuf_t *ab, int64_t rid, UC_Read *ucr, overlap_reg
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((int)overlap_list->length > max_n_chain) {///Improve: use HEAP to directly avoid chaining with too small scores
|
||||
if ((int)overlap_list->length > max_n_chain) {
|
||||
int32_t w, n[4], s[4];
|
||||
n[0] = n[1] = n[2] = n[3] = 0, s[0] = s[1] = s[2] = s[3] = 0;
|
||||
ks_introsort_or_ss(overlap_list->length, overlap_list->list);
|
||||
|
||||
Reference in New Issue
Block a user