b622d147b7dbac52dbf3ba26928cd18e02d42bd8
braney
Sat Feb 26 12:34:37 2022 -0800
add support for using a bigBed as the chromAlias file
diff --git src/hg/hgTables/hic.c src/hg/hgTables/hic.c
index ab36720..cdbdb79 100644
--- src/hg/hgTables/hic.c
+++ src/hg/hgTables/hic.c
@@ -357,36 +357,35 @@
hPrintf("
%s | ", col->name);
++colIx;
}
hPrintf("\n");
struct hicMeta *fileInfo = NULL;
char *errMsg = hicLoadHeader(fileName, &fileInfo, database);
if (errMsg != NULL)
{
warn("%s", errMsg);
}
else
{
/* Print sample lines. */
- struct hash *chromAliasHash = chromAliasMakeLookupTable(database);
char *chrName = fileInfo->chromNames[1]; // Skip 0, which is "All"
- struct chromAlias *a = hashFindVal(chromAliasHash, chrName);
+ char *nativeChrom = chromAliasFindNative(chrName);
char *ucscChrName = NULL;
- if (a != NULL)
- ucscChrName = a->chrom;
+ if (nativeChrom != NULL)
+ ucscChrName = nativeChrom;
else
ucscChrName = chrName;
int maxRes = atoi(fileInfo->resolutions[0]);
struct interact *sampleList = NULL, *sample = NULL;
errMsg = hicLoadData(fileInfo, maxRes, "NONE", ucscChrName, 0, hChromSize(database, ucscChrName),
ucscChrName, 0, hChromSize(database, ucscChrName), &sampleList);
if (errMsg != NULL)
warn("%s", errMsg);
slSort(&sampleList, &hicCompare);
char *row[INTERACT_NUM_COLS];
char numBuf[HIC_NUM_BUF_SIZE];
int count = 0;
for (sample=sampleList; sample != NULL && count < 10; sample = sample->next, count++)