060ada2535fca719656219c1214a3e1c16490693
tdreszer
  Wed Nov 9 16:06:41 2011 -0800
Moved as code in hgTables down to lib and access it from hgc and hgTrackUi.  This is to remove 'extraFields' support as per Jim's request in redmine 5883 and 5582
diff --git src/hg/inc/samAlignment.h src/hg/inc/samAlignment.h
index b7fc223..2b6838f 100644
--- src/hg/inc/samAlignment.h
+++ src/hg/inc/samAlignment.h
@@ -1,22 +1,24 @@
 /* samAlignment.h was originally generated by the autoSql program, which also 
  * generated samAlignment.c and samAlignment.sql.  This header links the database and
  * the RAM representation of objects. */
 
 #ifndef SAMALIGNMENT_H
 #define SAMALIGNMENT_H
 
+#include "asParse.h"
+
 #define SAMALIGNMENT_NUM_COLS 12
 
 struct samAlignment
 /* The fields of a SAM short read alignment, the text version of BAM. */
     {
     struct samAlignment *next;  /* Next in singly linked list. */
     char *qName;	/* Query template name - name of a read */
     unsigned short flag;	/* Flags.  0x10 set for reverse complement.  See SAM docs for others. */
     char *rName;	/* Reference sequence name (often a chromosome) */
     unsigned pos;	/* 1 based position */
     unsigned char mapQ;	/* Mapping quality 0-255, 255 is best */
     char *cigar;	/* CIGAR encoded alignment string. */
     char *rNext;	/* Ref sequence for next (mate) read. '=' if same as rName, '*' if no mate */
     int pNext;	/* Position (1-based) of next (mate) sequence. May be -1 or 0 if no mate */
     int tLen;	/* Size of DNA template for mated pairs.  -size for one of mate pairs */
@@ -56,19 +58,21 @@
 
 void samAlignmentFreeList(struct samAlignment **pList);
 /* Free a list of dynamically allocated samAlignment's */
 
 void samAlignmentOutput(struct samAlignment *el, FILE *f, char sep, char lastSep);
 /* Print out samAlignment.  Separate fields with sep. Follow last field with lastSep. */
 
 #define samAlignmentTabOut(el,f) samAlignmentOutput(el,f,'\t','\n');
 /* Print out samAlignment as a line in a tab-separated file. */
 
 #define samAlignmentCommaOut(el,f) samAlignmentOutput(el,f,',',',');
 /* Print out samAlignment as a comma separated list including final comma. */
 
 /* -------------------------------- End autoSql Generated Code -------------------------------- */
 
-extern char *samAlignmentAutoSqlString;
-/* SQL for samAlignment */
+struct asObject *samAsObj();
+// Return asObject describing fields of SAM/BAM
+#define bamAsObj() samAsObj()
+
 #endif /* SAMALIGNMENT_H */