Skip to content

Commit

Permalink
[view] Support extra int type encodings for auxiliary tags (PR #1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriuo committed Feb 8, 2021
1 parent 4d05eaa commit 2257c57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sam_view.c
@@ -1,6 +1,6 @@
/* sam_view.c -- SAM<->BAM<->CRAM conversion.
Copyright (C) 2009-2020 Genome Research Ltd.
Copyright (C) 2009-2021 Genome Research Ltd.
Portions copyright (C) 2009, 2011, 2012 Broad Institute.
Author: Heng Li <lh3@sanger.ac.uk>
Expand Down Expand Up @@ -107,7 +107,7 @@ static int process_aln(const sam_hdr_t *h, bam1_t *b, samview_settings_t* settin
if (s) {
if (settings->tvhash) {
char t[32], *val;
if (*s == 'i' || *s == 'I' || *s == 'c' || *s == 'C') {
if (*s == 'i' || *s == 'I' || *s == 's' || *s == 'S' || *s == 'c' || *s == 'C') {
int ret = snprintf(t, 32, "%"PRId64, bam_aux2i(s));
if (ret > 0) val = t;
else return 1;
Expand Down
2 changes: 1 addition & 1 deletion test/test.pl
Expand Up @@ -1198,7 +1198,7 @@ sub filter_sam
if ($tag_values) {
my $tag_value = '';
for my $i (11 .. $#sam) {
last if (($tag_value) = $sam[$i] =~ /^${tag}:[ZiIcC]:(.*)/);
last if (($tag_value) = $sam[$i] =~ /^${tag}:[ZiIsScC]:(.*)/);
}
next if (!exists($tag_values->{$tag_value||""}));
}
Expand Down

0 comments on commit 2257c57

Please sign in to comment.