Skip to content

Commit

Permalink
Fix XG handling on non-bismark/bison aligner
Browse files Browse the repository at this point in the history
  • Loading branch information
dpryan79 committed Apr 20, 2016
1 parent 14ad01c commit 99010c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version 0.1.10:
* Added the --version/-v option.
* Fixed the -h/--help option, which actually wasn't recognized before!
* Added the --minDepth option.
* Fixed handling of the `XG` auxiliary tag, since some aligners other than bismark are using it (and for different purposes). This is the single biggest annoyance of custom auxiliary tags.

Version 0.1.9:

Expand Down
2 changes: 2 additions & 0 deletions common.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ inline int isCHH(char *seq, int pos, int seqlen) {

int getStrand(bam1_t *b) {
char *XG = (char *) bam_aux_get(b, "XG");
//Only bismark uses the XG tag like this. Some other aligners use it for other purposes...
if(XG != NULL && *(XG+1) != 'C' && *(XG+1) != 'G') XG = NULL;
if(XG == NULL) { //Can't handle non-directional libraries!
if(b->core.flag & BAM_FPAIRED) {
if((b->core.flag & 0x50) == 0x50) return 2; //Read1, reverse comp. == OB
Expand Down

0 comments on commit 99010c1

Please sign in to comment.