8a0946dd6870f10cde056ba243f1fb4ec1fd16b4 angie Thu Feb 27 11:58:33 2014 -0800 Adding support for plain VCF custom tracks (as opposed to VCF+tabix),since users seem to want to upload VCF, and as long as the file is not too big it will work OK. This means adding a new track type vcf (as opposed to vcfTabix) and supporting it in hgTracks, hgTrackUi, hgc, hgTables and hgVai. (and others I've forgotten?) refs #12416 diff --git src/hg/hgTables/joining.c src/hg/hgTables/joining.c index 8a2f920..1bd5a64 100644 --- src/hg/hgTables/joining.c +++ src/hg/hgTables/joining.c @@ -296,41 +296,41 @@ { struct sqlConnection *conn = NULL; if (!trackHubDatabase(database)) conn = hAllocConn(dtfList->database); struct slName *fieldList = bigBedGetFields(dtfList->table, conn); makeOrderedCommaFieldList(fieldList, dtfList, dy); slFreeList(&fieldList); hFreeConn(&conn); } static void makeBamOrderedCommaFieldList(struct joinerDtf *dtfList, struct dyString *dy) /* Make comma-separated field list in same order as fields are in * big bed. */ { -struct slName *fieldList = bamGetFields(dtfList->table); +struct slName *fieldList = bamGetFields(); makeOrderedCommaFieldList(fieldList, dtfList, dy); slFreeList(&fieldList); } static void makeVcfOrderedCommaFieldList(struct joinerDtf *dtfList, struct dyString *dy) /* Make comma-separated field list in same order as fields are in * big bed. */ { -struct slName *fieldList = vcfGetFields(dtfList->table); +struct slName *fieldList = vcfGetFields(); makeOrderedCommaFieldList(fieldList, dtfList, dy); slFreeList(&fieldList); } struct tableJoiner /* List of fields in a single table. */ { struct tableJoiner *next; /* Next in list. */ char *database; /* Database we're in. Not alloced here. */ char *table; /* Table we're in. Not alloced here. */ struct joinerDtf *fieldList; /* Fields. */ struct slRef *keysOut; /* Keys that connect to output. * Value is joinerPair. */ boolean loaded; /* If true is loaded. */ @@ -1010,31 +1010,31 @@ } if (! doJoin) { struct sqlConnection *conn = NULL; if (!trackHubDatabase(database)) conn = hAllocConn(dtfList->database); struct dyString *dy = dyStringNew(0); if (isBigBed(database, dtfList->table, NULL, ctLookupName)) makeBigBedOrderedCommaFieldList(dtfList, dy); else if (isBamTable(dtfList->table)) makeBamOrderedCommaFieldList(dtfList, dy); - else if (isVcfTable(dtfList->table)) + else if (isVcfTable(dtfList->table, NULL)) makeVcfOrderedCommaFieldList(dtfList, dy); else if (isCustomTrack(dtfList->table)) makeCtOrderedCommaFieldList(dtfList, dy); else makeDbOrderedCommaFieldList(conn, dtfList->table, dtfList, dy); doTabOutTable(dtfList->database, dtfList->table, f, conn, dy->string); hFreeConn(&conn); } else { struct joiner *joiner = allJoiner; struct joinedTables *joined = joinedTablesCreate(joiner, primaryDb, primaryTable, dtfList, filterTables, 1000000, getRegions()); joinedTablesTabOutFile(joined, f); joinedTablesFree(&joined);