r1267: penalize introns without signals

This commit is contained in:
Heng Li
2025-04-07 09:51:33 -04:00
parent 3542a3d153
commit 9c3c4b1ce8
2 changed files with 8 additions and 4 deletions

View File

@@ -1031,8 +1031,12 @@ mm_reg1_t *mm_align_skeleton(void *km, const mm_mapopt_t *opt, const mm_idx_t *m
}
r = &regs[i];
r->p->trans_strand = trans_strand;
if (r->is_spliced && (trans_strand == 1 || trans_strand == 2))
r->p->dp_max += (opt->a + opt->b) + ((opt->a + opt->b) >> 1);
if (r->is_spliced) {
if (trans_strand == 1 || trans_strand == 2) // this is an *approximate* way to tell if there are splice signals.
r->p->dp_max += (opt->a + opt->b) + ((opt->a + opt->b) >> 1);
else if (trans_strand == 3)
r->p->dp_max -= opt->a + opt->b;
}
} else { // one round of alignment
mm_align1(km, opt, mi, qlen, qseq0, &regs[i], &r2, n_a, a, &ez, opt->flag);
if (opt->flag&MM_F_SPLICE)

View File

@@ -5,7 +5,7 @@
#include <stdio.h>
#include <sys/types.h>
#define MM_VERSION "2.28-r1266-dirty"
#define MM_VERSION "2.28-r1267-dirty"
#define MM_F_NO_DIAG (0x001LL) // no exact diagonal hit
#define MM_F_NO_DUAL (0x002LL) // skip pairs where query name is lexicographically larger than target name
@@ -119,7 +119,7 @@ typedef struct {
int32_t mlen, blen; // seeded exact match length; seeded alignment block length
int32_t n_sub; // number of suboptimal mappings
int32_t score0; // initial chaining score (before chain merging/spliting)
uint32_t mapq:8, split:2, rev:1, inv:1, sam_pri:1, proper_frag:1, pe_thru:1, seg_split:1, seg_id:8, split_inv:1, is_alt:1, strand_retained:1, is_spliced:1, is_spliced2:1, dummy:3;
uint32_t mapq:8, split:2, rev:1, inv:1, sam_pri:1, proper_frag:1, pe_thru:1, seg_split:1, seg_id:8, split_inv:1, is_alt:1, strand_retained:1, is_spliced:1, dummy:4;
uint32_t hash;
float div;
mm_extra_t *p;