70d4208efa11f262ba5591198214c9ccdc6b54ae
angie
  Mon Aug 22 22:24:05 2011 -0700
Feature #3707 (VCF+tabix support in hgTables):Basic hgTables support for VCF, modeled after BAM code.  Tested all fields,
selected fields, bed output; filter, intersection, schema
on 3 flavors of vcfTabix:
ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/release/20101123/interim_phase1_release/ALL.chr17.phase1.projectConsensus.genotypes.vcf.gz
ftp://ftp-trace.ncbi.nlm.nih.gov/1000genomes/ftp/release/20100804/AFR.dindel.20100804.sites.vcf.gz
ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606/VCF/v4.0/ByChromosomeNoGeno/00-All.vcf.gz

diff --git src/hg/hgTables/hgTables.h src/hg/hgTables/hgTables.h
index 64fd78f..b693f54 100644
--- src/hg/hgTables/hgTables.h
+++ src/hg/hgTables/hgTables.h
@@ -801,49 +801,82 @@
 struct sqlFieldType *sqlFieldTypesFromAs(struct asObject *as);
 /* Convert asObject to list of sqlFieldTypes */
 
 /* BAM stuff from bam.c */
 
 struct asObject *bamAsObj();
 /* Return asObject describing fields of BAM */
 
 boolean isBamTable(char *table);
 /* Return TRUE if table corresponds to a BAM file. */
 
 struct slName *bamGetFields(char *table);
 /* Get fields of bam as simple name list. */
 
 struct sqlFieldType *bamListFieldsAndTypes();
-/* Get fields of bigBed as list of sqlFieldType. */
+/* Get fields of BAM as list of sqlFieldType. */
 
 struct hTableInfo *bamToHti(char *table);
 /* Get standard fields of BAM into hti structure. */
 
 void showSchemaBam(char *table);
 /* Show schema on bam. */
 
 void bamTabOut(char *db, char *table, struct sqlConnection *conn, char *fields, FILE *f);
 /* Print out selected fields from BAM.  If fields is NULL, then print out all fields. */
 
 struct bed *bamGetFilteredBedsOnRegions(struct sqlConnection *conn, 
 	char *db, char *table, struct region *regionList, struct lm *lm, 
 	int *retFieldCount);
 /* Get list of beds from BAM, in all regions, that pass filtering. */
 
 struct slName *randomBamIds(char *table, struct sqlConnection *conn, int count);
 /* Return some semi-random qName based IDs from a BAM file. */
 
+/* VCF (Variant Call Format) stuff from vcf.c */
+
+extern char *vcfDataLineAutoSqlString;
+
+struct asObject *vcfAsObj();
+/* Return asObject describing fields of VCF */
+
+boolean isVcfTable(char *table);
+/* Return TRUE if table corresponds to a VCF file. */
+
+struct slName *vcfGetFields(char *table);
+/* Get fields of VCF as simple name list. */
+
+struct sqlFieldType *vcfListFieldsAndTypes();
+/* Get fields of VCF as list of sqlFieldType. */
+
+struct hTableInfo *vcfToHti(char *table);
+/* Get standard fields of VCF into hti structure. */
+
+void showSchemaVcf(char *table);
+/* Show schema on VCF. */
+
+void vcfTabOut(char *db, char *table, struct sqlConnection *conn, char *fields, FILE *f);
+/* Print out selected fields from VCF.  If fields is NULL, then print out all fields. */
+
+struct bed *vcfGetFilteredBedsOnRegions(struct sqlConnection *conn,
+					char *db, char *table, struct region *regionList,
+					struct lm *lm, int *retFieldCount);
+/* Get list of beds from VCF, in all regions, that pass filtering. */
+
+struct slName *randomVcfIds(char *table, struct sqlConnection *conn, int count);
+/* Return some semi-random IDs from a VCF file. */
+
 /* ----------- 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. */