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/lib/samAlignment.sql src/hg/lib/samAlignment.sql index 0899148..21c1a26 100644 --- src/hg/lib/samAlignment.sql +++ src/hg/lib/samAlignment.sql @@ -1,21 +1,21 @@ # samAlignment.sql was originally generated by the autoSql program, which also # generated samAlignment.c and samAlignment.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. -#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. CREATE TABLE samAlignment ( qName varchar(255) not null, # Query template name - name of a read flag smallint unsigned not null, # Flags. 0x10 set for reverse complement. See SAM docs for others. rName varchar(255) not null, # Reference sequence name (often a chromosome) pos int unsigned not null, # 1 based position mapQ tinyint unsigned not null, # Mapping quality 0-255, 255 is best cigar varchar(255) not null, # CIGAR encoded alignment string. rNext varchar(255) not null, # Ref sequence for next (mate) read. '=' if same as rName, '*' if no mate pNext int not null, # Position (1-based) of next (mate) sequence. May be -1 or 0 if no mate tLen int not null, # Size of DNA template for mated pairs. -size for one of mate pairs seq varchar(255) not null, # Query template sequence qual varchar(255) not null, # ASCII of Phred-scaled base QUALity+33. Just '*' if no quality scores tagTypeVals varchar(255) not null, # Tab-delimited list of tag:type:value optional extra fields #Indices PRIMARY KEY(qName)