1045 |
|
|
1046 |
|
bool antisense_splice = false; |
1047 |
|
int sam_nm = 0; |
1048 |
< |
getSAMmismatches(buf, samcigar, mismatches, num_mismatches, sam_nm, antisense_splice); |
1048 |
> |
getSAMmismatches(buf, samcigar, mismatches, num_mismatches, sam_nm, antisense_splice); |
1049 |
|
|
1050 |
|
//############################################## |
1051 |
|
|
1170 |
|
} |
1171 |
|
} |
1172 |
|
|
1173 |
< |
//TODO: merge with the original cigar string |
1173 |
> |
//TODO: merge with the original cigar string |
1174 |
|
vector<CigarOp> splcigar; |
1175 |
|
spliceCigar(splcigar, samcigar, left_match_length, insertion_match_length, right_match_length, INS); |
1176 |
|
/* |
1213 |
|
|
1214 |
|
if ((sam_flag & 0x0010) == 0) //###### |
1215 |
|
{ |
1216 |
< |
if (left_splice_pos + seg_offset < _anchor_length) |
1217 |
< |
return false; |
1218 |
< |
} |
1219 |
< |
else |
1220 |
< |
{ |
1221 |
< |
if (right_splice_pos + seg_offset < _anchor_length) |
1222 |
< |
return false; |
1223 |
< |
} |
1216 |
> |
if (left_splice_pos + seg_offset < _anchor_length) |
1217 |
> |
return false; |
1218 |
> |
} |
1219 |
> |
else |
1220 |
> |
{ |
1221 |
> |
if (right_splice_pos + seg_offset < _anchor_length) |
1222 |
> |
return false; |
1223 |
> |
} |
1224 |
|
//uint32_t right = atoi(splice_toks[1].c_str()) + right_splice_pos; |
1225 |
|
//atoi(toks[right_window_edge_field].c_str()); |
1226 |
|
int gap_len = atoi(splice_toks[1].c_str()) - atoi(splice_toks[0].c_str()) - 1; |
1229 |
|
if (!(junction_strand == "rev" || junction_strand == "fwd")) |
1230 |
|
// || !(orientation == '-' || orientation == '+')) |
1231 |
|
{ |
1232 |
< |
fprintf(stderr, "Warning: found malformed splice record, skipping\n"); |
1233 |
< |
//fprintf(stderr, "junction_strand=%s, orientation='%c'\n", |
1234 |
< |
// junction_strand.c_str(), orientation); |
1235 |
< |
return false; |
1232 |
> |
fprintf(stderr, "Warning: found malformed splice record, skipping\n"); |
1233 |
> |
//fprintf(stderr, "junction_strand=%s, orientation='%c'\n", |
1234 |
> |
// junction_strand.c_str(), orientation); |
1235 |
> |
return false; |
1236 |
|
} |
1237 |
|
|
1238 |
|
int mismatches_in_anchor = 0; |
1249 |
|
// isn't the right place |
1250 |
|
vector<CigarOp> splcigar; |
1251 |
|
CigarOpCode opcode=(toks[num_extra_toks + junction_type_field] == "del")? DEL : REF_SKIP ; |
1252 |
< |
spliceCigar(splcigar, samcigar, left_splice_pos, gap_len, right_splice_pos, INS); |
1252 |
> |
spliceCigar(splcigar, samcigar, left_splice_pos, gap_len, right_splice_pos, opcode); |
1253 |
|
/* |
1254 |
|
splcigar.push_back(CigarOp(MATCH, left_splice_pos)); |
1255 |
|
if(toks[num_extra_toks + junction_type_field] == "del"){ |
1283 |
|
} |
1284 |
|
|
1285 |
|
|
1286 |
+ |
|
1287 |
|
bool BAMHitFactory::get_hit_from_buf(const char* orig_bwt_buf, |
1288 |
|
BowtieHit& bh, bool strip_slash, |
1289 |
|
char* name_out, char* name_tags, |
1601 |
|
case MATCH: |
1602 |
|
for (size_t m = 0; m < cigar[c].length; ++m) |
1603 |
|
{ |
1604 |
< |
if (DoC[j + m] < 0xFFFFFFFF) |
1604 |
> |
if (DoC[j + m] < VMAXINT32) |
1605 |
|
DoC[j + m]++; |
1606 |
|
} |
1607 |
|
//fall through this case to REF_SKIP is intentional |