Skip to content

Commit

Permalink
Correct reverse complements of CG and AT
Browse files Browse the repository at this point in the history
6=S=CG and 9=W=AT are each their own complement.
This table can be generated and verified via a small script:

print join(", ", map {($_&1)<<3 | ($_&2)<<1 | ($_&4)>>1 | ($_&8)>>3} 0..15);

Fixes samtools/htslib#5
  • Loading branch information
jmarshall committed Oct 23, 2013
1 parent b294a1b commit 5bb1813
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sam_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ int main_import(int argc, char *argv[])
return ret;
}

int8_t seq_comp_table[16] = { 0, 8, 4, 12, 2, 10, 9, 14, 1, 6, 5, 13, 3, 11, 7, 15 };
int8_t seq_comp_table[16] = { 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 };

int main_bam2fq(int argc, char *argv[])
{
Expand Down

0 comments on commit 5bb1813

Please sign in to comment.