604d0f187addd191e1763f053a0e36aa720f05b6
kent
  Sat Apr 6 14:37:39 2013 -0700
Adding samToBed and samToOpenBed functions.
diff --git src/inc/bamFile.h src/inc/bamFile.h
index 4563773..c0392b9 100644
--- src/inc/bamFile.h
+++ src/inc/bamFile.h
@@ -133,16 +133,22 @@
 char *bamGetTagString(const bam1_t *bam, char *tag, char *buf, size_t bufSize);
 /* If bam's tags include the given 2-character tag, place the value into 
  * buf (zero-terminated, trunc'd if nec) and return a pointer to buf,
  * or NULL if tag is not present. */
 
 void bamUnpackAux(const bam1_t *bam, struct dyString *dy);
 /* Unpack the tag:type:val part of bam into dy */
 
 struct bamChromInfo *bamChromList(samfile_t *fh);
 /* Return list of chromosomes from bam header. We make no attempty to normalize chromosome names to UCSC format,
    so list may contain things like "1" for "chr1", "I" for "chrI", "MT" for "chrM" etc. */
 
 void bamChromInfoFreeList(struct bamChromInfo **pList);
 /* Free a list of dynamically allocated bamChromInfo's */
 
+void samToBed(char *samIn, char *bedOut);
+/* samToBed - Convert SAM file to a pretty simple minded bed file.. */
+
+void samToOpenBed(char *samIn, FILE *f);
+/* Like samToOpenBed, but the output is the already open file f. */
+
 #endif//ndef BAMFILE_H