d86ddf032b97d2014a9a97b79dd9f66d9b07db13
jcasper
  Thu Jul 25 15:36:52 2024 -0700
Also need to commit these for the new Hi-C setup! refs #33225

diff --git src/hg/lib/hic.c src/hg/lib/hic.c
index 6dfd4a5..64d63a1 100644
--- src/hg/lib/hic.c
+++ src/hg/lib/hic.c
@@ -23,55 +23,58 @@
     char workingName[size];
     safef(workingName, sizeof(workingName), "%s", ucscName);
     touppers(workingName);
     if (startsWith("CHR", workingName))
         offset = 3;
     safencpy(mangledUcscName, size, workingName+offset, strlen(workingName+offset));
 }
 
 
 char *hicLoadHeader(char *filename, struct hicMeta **header, char *ucscAssembly)
 /* Create a hicMeta structure for the supplied Hi-C file.  If
  * the return value is non-NULL, it points to a string containing
  * an error message that explains why the retrieval failed. */
 {
 char *genome;
-char **chromosomes, **bpResolutions, **attributes;
-int *chromSizes, nChroms, nBpRes, nAttributes;
+char **chromosomes, **bpResolutions, **attributes, **normOptions;
+int *chromSizes, nChroms, nBpRes, nAttributes, nNormOptions;
 
 Straw *newStraw = NULL;
 char *errMsg = cStrawOpen(filename, &newStraw);
 if (errMsg != NULL)
     return errMsg;
-errMsg = cStrawHeader(newStraw, &genome, &chromosomes, &chromSizes, &nChroms, &bpResolutions, &nBpRes, NULL, NULL, &attributes, &nAttributes);
+errMsg = cStrawHeader(newStraw, &genome, &chromosomes, &chromSizes, &nChroms, &bpResolutions,
+        &nBpRes, NULL, NULL, &attributes, &nAttributes, &normOptions, &nNormOptions);
 if (errMsg != NULL)
     return errMsg;
 
 struct hicMeta *newMeta = NULL;
 AllocVar(newMeta);
 newMeta->strawObj = newStraw;
 newMeta->fileAssembly = genome;
 newMeta->nRes = nBpRes;
 newMeta->resolutions = bpResolutions;
 newMeta->nChroms = nChroms;
 newMeta->chromNames = chromosomes;
 newMeta->chromSizes = chromSizes;
 newMeta->ucscToAlias = NULL;
 newMeta->ucscAssembly = cloneString(ucscAssembly);
 newMeta->filename = cloneString(filename);
 newMeta->attributes = attributes;
 newMeta->nAttributes = nAttributes;
+newMeta->normOptions = normOptions;
+newMeta->nNormOptions = nNormOptions;
 
 *header = newMeta;
 
 struct slName *ucscNameList = NULL, *ucscName = NULL;
 if (newMeta->ucscAssembly != NULL)
     ucscNameList = hAllChromNames(newMeta->ucscAssembly);
 
 struct slName *hicChromNames = slNameListFromStringArray(chromosomes, nChroms);
 struct hash *hicChromHash = hashSetFromSlNameList(hicChromNames);
 struct hash *ucscToHicName = newHash(0);
 
 // For each UCSC chrom name, try to find a .hic file chromosome to fetch annotation from.
 for (ucscName = ucscNameList; ucscName != NULL; ucscName = ucscName->next)
     {
     struct slName *aliases;