Skip to content

Commit 9b99309

Browse files
committed
Support for X and = in CIGAR strings
1 parent a12da33 commit 9b99309

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wgsim_eval.pl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ sub alneval {
4848
my ($q, $is_correct, $chr, $left, $rght) = (int($t[4]/10), 1, $t[2], $t[3], $t[3]);
4949
$max_q = $q if ($q > $max_q);
5050
# right coordinate
51-
$_ = $t[5]; s/(\d+)[MDN]/$rght+=$1,'x'/eg;
51+
$_ = $t[5]; s/(\d+)[MDN=X]/$rght+=$1,'x'/eg;
5252
--$rght;
5353
# correct for clipping
5454
my ($left0, $rght0) = ($left, $rght);
@@ -287,7 +287,7 @@ sub uniqcmp_aux {
287287
my ($x, $nm) = (0, 0);
288288
$nm = $1 if (/NM:i:(\d+)/);
289289
$_ = $t[5];
290-
s/(\d+)[MI]/$x+=$1/eg;
290+
s/(\d+)[M=XI]/$x+=$1/eg;
291291
@{$a->{$t[0]}[$which]} = (($t[1]&0x10)? 1 : 0, $t[2], $t[3]-$l, $t[4], "$x:$nm", $x - $b * $nm);
292292
}
293293
close($fh);

0 commit comments

Comments
 (0)