Created
May 5, 2020 22:32
-
-
Save timo/4fecd3851edca8fb286d9db3cf7c2ef1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --cc Come on, sister/script/benchmark2.p6 | |
index 8d9e789,79038c3..0000000 | |
--- a/Come on, sister/script/benchmark2.p6 | |
+++ b/Come on, sister/script/benchmark2.p6 | |
@@@ -30,10 -30,10 +30,10 @@@ class Sam | |
$!seq = $!seq.substr($0) | |
if $!CIGAR~~s/^(\d+)S//; # clip the sequence field | |
$!seq = $!seq.substr(0, * - $0) | |
-- if $!CIGAR~~s/(\d+)S$//; # clip the sequence field | |
++ if $!CIGAR.ends-with("S") && $!CIGAR~~s/(\d+)S$//; # clip the sequence field | |
$!end = $!start - 1; # calculate the end of the alignment | |
- $!end += $!CIGAR.match(/ (\d+) <!before I> /, :g).sum; # <!beforer XXX>: https://docs.perl6.org/language/regexes#Capture_markers:_%3C(_)%3E | |
- $!end += $_ for $!CIGAR.comb(/ \d+ )> <-[I]> /); # <!beforer XXX>: https://docs.perl6.org/language/regexes#Capture_markers:_%3C(_)%3E | |
++ $!end += $!CIGAR.comb(/ \d+ )> <-[I]> /).sum; # <!beforer XXX>: https://docs.perl6.org/language/regexes#Capture_markers:_%3C(_)%3E | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment