src/hg/inc/bamFile.h 1.7
1.7 2009/08/24 23:47:56 angie
Added bamIgnoreStrand, bamIsRc, bamShowCigarEnglish, bamShowTags. In hgc/bamClick.c, also added showOverlap.
Index: src/hg/inc/bamFile.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/inc/bamFile.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -b -B -U 4 -r1.6 -r1.7
--- src/hg/inc/bamFile.h 21 Aug 2009 22:52:35 -0000 1.6
+++ src/hg/inc/bamFile.h 24 Aug 2009 23:47:56 -0000 1.7
@@ -7,14 +7,22 @@
#define _IOLIB 2
#include "bam.h"
#include "sam.h"
+void bamIgnoreStrand();
+/* Change the behavior of this lib to disregard item strand.
+ * If called, this should be called before any other bam functions. */
+
void bamFetch(char *db, char *table, char *position, bam_fetch_f callbackFunc, void *callbackData);
/* Open the .bam file given in db.table, fetch items in the seq:start-end position range,
* and call callbackFunc on each bam item retrieved from the file plus callbackData.
* Note: if sequences in .bam file don't begin with "chr" but db's do, skip the "chr"
* at the beginning of the position. */
+boolean bamIsRc(const bam1_t *bam);
+/* Return TRUE if alignment is on - strand. If bamIgnoreStrand has been called,
+ * then this always returns FALSE. */
+
INLINE int bamUnpackCigarElement(unsigned int packed, char *retOp)
/* Given an unsigned int containing a number of bases and an offset into an
* array of BAM-enhanced-CIGAR ASCII characters (operations), store operation
* char into *retOp (retOp must not be NULL) and return the number of bases. */
@@ -39,8 +47,11 @@
char *bamGetCigar(const bam1_t *bam);
/* Return a BAM-enhanced CIGAR string, decoded from the packed encoding in bam. */
+void bamShowCigarEnglish(const bam1_t *bam);
+/* Print out cigar in English e.g. "20 (mis)Match, 1 Deletion, 3 (mis)Match" */
+
int bamGetTargetLength(const bam1_t *bam);
/* Tally up the alignment's length on the reference sequence from
* bam's packed-int CIGAR representation. */
@@ -49,5 +60,8 @@
bam1_t *bamClone(const bam1_t *bam);
/* Return a newly allocated copy of bam. */
+void bamShowTags(const bam1_t *bam);
+/* Print out tags in HTML: bold key, no type indicator for brevity. */
+
#endif//ndef BAMFILE_H