032653c06fe43263c625613a538389fc2425976b
jcasper
  Tue Jul 16 17:16:51 2024 -0700
Updated hic straw library adapted for UCSC, with a udc-enabled curl substitute.  refs #33225

diff --git src/hg/lib/straw/new_straw.h src/hg/lib/straw/new_straw.h
index 45c65c6..53bb6a5 100644
--- src/hg/lib/straw/new_straw.h
+++ src/hg/lib/straw/new_straw.h
@@ -97,16 +97,31 @@
 
 std::vector<double> readNormalizationVector(std::istream &fin, indexEntry entry);
 
 std::vector<contactRecord>
 straw(const std::string& matrixType, const std::string& norm, const std::string& fname, const std::string& chr1loc,
       const std::string& chr2loc, const std::string &unit, int32_t binsize);
 
 std::vector<std::vector<float>>
 strawAsMatrix(const std::string &matrixType, const std::string &norm, const std::string &fileName,
               const std::string &chr1loc, const std::string &chr2loc, const std::string &unit, int32_t binsize);
 
 int64_t getNumRecordsForFile(const std::string& filename, int32_t binsize, bool interOnly);
 
 int64_t getNumRecordsForChromosomes(const std::string& filename, int32_t binsize, bool interOnly);
 
+/* Added at UCSC */
+void getHeaderFields(const std::string &filename, std::string &genome, std::vector<std::string> &chromNames,
+        std::vector<int> &chromSizes, std::vector<int> &bpResolutions, std::vector<int> &fragResolutions,
+        std::vector<std::string> &attributes);
+/* Fill in the provided fields with information from the header of the hic file in the supplied filename.
+ * fragResolutions is left empty for now, as we're not making use of it. */
+
+class strawException : public std::runtime_error {
+/* Simple exception wrapper class */
+    public:
+    strawException(const std::string& error):
+        std::runtime_error(error) {
+    }
+};
+
 #endif