0b52ad3ec2c6113bfdd692a58fee812b7dd0a7b2 kent Fri Feb 4 20:47:27 2011 -0800 Getting Table Browser to handle BAM files. This is ready for testing by folks other than me now. Should work for both built-in BAM files and BAM files from track data hubs. I've tested it more though via the hubs. Works mostly by converting bam->sam->array-of-strings and then slotting into the same code bigBed processing uses. diff --git src/hg/inc/samAlignment.h src/hg/inc/samAlignment.h index 8ef70d8..9375926 100644 --- src/hg/inc/samAlignment.h +++ src/hg/inc/samAlignment.h @@ -1,26 +1,26 @@ /* 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 #define SAMALIGNMENT_NUM_COLS 12 struct samAlignment -/* The fields of a SAM short read alignment. Follows conventions in SAM docs out of Sanger */ +/* 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 */ char *seq; /* Query template sequence */ char *qual; /* ASCII of Phred-scaled base QUALity+33. Just '*' if no quality scores */ char *tagTypeVals; /* Tab-delimited list of tag:type:value optional extra fields */ };