4d80894351b62c4daa432279691a9ef73717d86b
braney
  Wed Oct 29 08:57:35 2025 -0700
allow mafGene to use bigMaf and twoBit instead of database

diff --git src/hg/inc/mafGene.h src/hg/inc/mafGene.h
index 24982433b08..31854442f2d 100644
--- src/hg/inc/mafGene.h
+++ src/hg/inc/mafGene.h
@@ -1,18 +1,31 @@
 /* Copyright (C) 2012 The Regents of the University of California 
  * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
 
 
 /* options */
 #define MAFGENE_EXONS		(1 << 0)
 #define MAFGENE_NOTRANS		(1 << 1)
 #define MAFGENE_OUTBLANK	(1 << 2)
 #define MAFGENE_OUTTABLE	(1 << 3)
 #define MAFGENE_INCLUDEUTR	(1 << 4)
 #define MAFGENE_UNIQUEAA	(1 << 5)
 
+// struct to allow us to keep these files open and cache chrom sequence
+struct mafFileCache 
+{
+struct twoBitFile *tbf;
+struct bbiFile *bbi;
+char *chrom;
+struct dnaSeq *dnaSeq;
+};
+
 /* output a FASTA alignment from the given mafTable
  * for a given genePred
  */
 void mafGeneOutPred(FILE *f, struct genePred *pred, char *dbName, 
     char *mafTable,  struct slName *speciesNameList, unsigned options,
     int numCols);
+
+void mafGeneOutPredExt(FILE *f, struct genePred *pred, char *dbName, 
+    char *mafTable,  struct slName *speciesNameList, unsigned options,
+    int numCols, struct mafFileCache *mafFileCache);