7f5b0b5cf3ed7efc0f9e84aa5bdcc097473c7584 kent Thu Feb 3 21:18:16 2011 -0800 Some preliminary work putting proper bam support in table browser. Still quite a ways to go, but have implemented a way to get a list of alignments in 'sam' format out of a BAM. This I think contains all the info. diff --git src/hg/hgTables/hgTables.h src/hg/hgTables/hgTables.h index cc9a422..ae18b6a 100644 --- src/hg/hgTables/hgTables.h +++ src/hg/hgTables/hgTables.h @@ -766,30 +766,39 @@ struct sqlFieldType *bigBedListFieldsAndTypes(char *table, struct sqlConnection *conn); /* Get fields of bigBed as list of sqlFieldType. */ struct bed *bigBedGetFilteredBedsOnRegions(struct sqlConnection *conn, char *db, char *table, struct region *regionList, struct lm *lm, int *retFieldCount); /* Get list of beds from bigBed, in all regions, that pass filtering. */ void bigBedTabOut(char *db, char *table, struct sqlConnection *conn, char *fields, FILE *f); /* Print out selected fields from Big Bed. If fields is NULL, then print out all fields. */ void showSchemaBigBed(char *table); /* Show schema on bigBed. */ +/* BAM stuff from bam.c */ + +boolean isBamTable(char *table); +/* Return TRUE if table corresponds to a BAM file. */ + +char *bamFileName(char *table, struct sqlConnection *conn); +/* Return file name associated with BAM. This handles differences whether it's + * a custom or built-in track. Do a freeMem on returned string when done. */ + /* ----------- Custom track stuff. -------------- */ struct customTrack *getCustomTracks(); /* Get custom track list. */ struct customTrack *ctLookupName(char *name); /* Lookup name in custom track list */ void removeNamedCustom(struct customTrack **pList, char *name); /* Remove named custom track from list if it's on there. */ void flushCustomTracks(); /* Flush custom track list. */ struct slName *getBedFields(int fieldCount); /* Get list of fields for bed of given size. */