11e45667d4e291b3038ccda729a1cdf5bcaf004a braney Mon Jul 11 15:46:54 2016 -0700 incorporate htslib in kent src, remove USE_BAM, USE_SAMTABIX, USE_TABIX defines, modify a bunch of makefiles to include kentSrc variable pointing to top of the tree. diff --git src/hg/hgTracks/vcfTrack.c src/hg/hgTracks/vcfTrack.c index 45d0c6b..20ca9cf 100644 --- src/hg/hgTracks/vcfTrack.c +++ src/hg/hgTracks/vcfTrack.c @@ -1138,31 +1138,30 @@ tg->mapsSelf = TRUE; tg->extraUiData = vcff; } static void indelTweakMapItem(struct track *tg, struct hvGfx *hvg, void *item, char *itemName, char *mapItemName, int start, int end, int x, int y, int width, int height) /* Pass the original vcf chromStart to pgSnpMapItem, so if we have trimmed an identical * first base from item's alleles and start, we will still pass the correct start to hgc. */ { struct pgSnpVcfStartEnd *psvs = item; pgSnpMapItem(tg, hvg, item, itemName, mapItemName, psvs->vcfStart, psvs->vcfEnd, x, y, width, height); } -#ifdef USE_TABIX static void vcfTabixLoadItems(struct track *tg) /* Load items in window from VCF file using its tabix index file. */ { char *fileOrUrl = NULL; /* Figure out url or file name. */ if (tg->parallelLoading) { /* do not use mysql during parallel-fetch load */ fileOrUrl = trackDbSetting(tg->tdb, "bigDataUrl"); } else { struct sqlConnection *conn = hAllocConnTrack(database, tg->tdb); fileOrUrl = bbiNameFromSettingOrTableChrom(tg->tdb, conn, tg->table, chromName); @@ -1208,57 +1207,30 @@ void vcfTabixMethods(struct track *track) /* Methods for VCF + tabix files. */ { knetUdcInstall(); pgSnpMethods(track); track->mapItem = indelTweakMapItem; // Disinherit next/prev flag and methods since we don't support next/prev: track->nextExonButtonable = FALSE; track->nextPrevExon = NULL; track->nextPrevItem = NULL; track->loadItems = vcfTabixLoadItems; track->canPack = TRUE; } -#else // no USE_TABIX: - -// If code was not built with USE_TABIX=1, but there are vcfTabix tracks, display a message -// in place of the tracks (instead of annoying "No track handler" warning messages). - -static void drawUseVcfTabixWarning(struct track *tg, int seqStart, int seqEnd, struct hvGfx *hvg, - int xOff, int yOff, int width, MgFont *font, Color color, - enum trackVisibility vis) -/* Draw a message saying that the code needs to be built with USE_TABIX=1. */ -{ -char message[512]; -safef(message, sizeof(message), - "Get tabix from samtools.sourceforge.net and recompile kent/src with USE_TABIX=1"); -Color yellow = hvGfxFindRgb(hvg, &undefinedYellowColor); -hvGfxBox(hvg, xOff, yOff, width, tg->heightPer, yellow); -hvGfxTextCentered(hvg, xOff, yOff, width, tg->heightPer, MG_BLACK, font, message); -} - -void vcfTabixMethods(struct track *track) -/* Methods for VCF alignment files, in absence of tabix lib. */ -{ -// NOP warning method to warn users that tabix is not installed. -messageLineMethods(track); -track->drawItems = drawUseVcfTabixWarning; -} - -#endif // no USE_TABIX static void vcfLoadItems(struct track *tg) /* Load items in window from VCF file. */ { int vcfMaxErr = -1; struct vcfFile *vcff = NULL; boolean hapClustEnabled = cartOrTdbBoolean(cart, tg->tdb, VCF_HAP_ENABLED_VAR, TRUE); if (slCount(windows)>1) hapClustEnabled = FALSE; // haplotype sorting display not currently available with multiple windows. char *table = tg->table; struct customTrack *ct = tg->customPt; struct sqlConnection *conn; if (ct == NULL) conn = hAllocConnTrack(database, tg->tdb); else