src/hg/inc/bamFile.h 1.14

1.14 2010/02/13 00:18:38 angie
Fix: handle soft-clipping when fetching query sequence.
Index: src/hg/inc/bamFile.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/inc/bamFile.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -b -B -U 4 -r1.13 -r1.14
--- src/hg/inc/bamFile.h	10 Dec 2009 15:02:12 -0000	1.13
+++ src/hg/inc/bamFile.h	13 Feb 2010 00:18:38 -0000	1.14
@@ -43,8 +43,14 @@
 *retOp = BAM_DOT_C_OPCODE_STRING[opcode];
 return n;
 }
 
+void bamGetSoftClipping(const bam1_t *bam, int *retLow, int *retHigh, int *retClippedQLen);
+/* If retLow is non-NULL, set it to the number of "soft-clipped" (skipped) bases at
+ * the beginning of the query sequence and quality; likewise for retHigh at end.
+ * For convenience, retClippedQLen is the original query length minus soft clipping
+ * (and the length of the query sequence that will be returned). */
+
 char *bamGetQuerySequence(const bam1_t *bam, boolean useStrand);
 /* Return the nucleotide sequence encoded in bam.  The BAM format 
  * reverse-complements query sequence when the alignment is on the - strand,
  * so if useStrand is given we rev-comp it back to restore the original query