Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle cases where the same tag sequence is seen in both index reads #865

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bin/npg_qc_tag_sniff.pl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
q[?page%5Bnumber%5D=1&page%5Bsize%5D=500];

##no critic
our $VERSION = '0';
our $VERSION = '72.1.0';

sub usage {

Expand Down Expand Up @@ -200,12 +200,12 @@ sub showTags{
if ($revcomp) {
# revcomp match AND we are looking for revcomp matches AND we are looking for revcomp matches on this tag
if (@{$revcomps} && $revcomps->[$i]) {
$matches{$subtag}->{$id} = [$map_id,1,$original];
$matches{$subtag}->[$i]->{$id} = [$map_id,1,$original];
}
} else {
# not a revcomp match AND we are not looking for revcomp matches or we are not looking for revcomp matches on this tag
if (!@{$revcomps} || !$revcomps->[$i]) {
$matches{$subtag}->{$id} = [$map_id,0,$original];
$matches{$subtag}->[$i]->{$id} = [$map_id,0,$original];
}
}

Expand All @@ -222,8 +222,8 @@ sub showTags{
foreach my $i (0..$#subtags) {
my $subtag = $subtags[$i];
foreach my $id (sort {$a<=>$b} keys %{$groups[$i]}) {
if ( exists($matches{$subtag}->{$id}) ){
my ($map_id, $revcomp, $original) = @{$matches{$subtag}->{$id}};
if ( exists($matches{$subtag}->[$i]->{$id}) ){
my ($map_id, $revcomp, $original) = @{$matches{$subtag}->[$i]->{$id}};
print $revcomp ? REVERSE : q[];
printf "%2d(%3d %s) ", $id, $map_id, $original;
print $revcomp ? RESET : q[];
Expand Down
Loading