0a01f6a29963ba42555b02782532a5702b649f29
braney
  Fri Mar 10 10:18:36 2023 -0800
first cut at drawing base probability logos in wiggle tracks calculated
at run time using an associated MAF
related

diff --git src/hg/inc/hgMaf.h src/hg/inc/hgMaf.h
index 6ea52b2..beee708 100644
--- src/hg/inc/hgMaf.h
+++ src/hg/inc/hgMaf.h
@@ -39,30 +39,45 @@
 
 struct mafAli *mafLoadInRegion2(struct sqlConnection *conn,
         struct sqlConnection *conn2, char *table, char *chrom,
         int start, int end, char *file);
 /* Return list of alignments in region. */
 
 struct mafAli *mafLoadInRegion(struct sqlConnection *conn, char *table,
 	char *chrom, int start, int end);
 /* Return list of alignments in region. */
 
 struct mafAli *axtLoadAsMafInRegion(struct sqlConnection *conn, char *table,
 	char *chrom, int start, int end,
 	char *tPrefix, char *qPrefix, int tSize,  struct hash *qSizeHash);
 /* Return list of alignments in region from axt external file as a maf. */
 
+struct mafBaseProbs 
+// the probability of each nucleotide being in a certain colum
+    {
+    double aProb, cProb, gProb, tProb;
+    };
+
+struct mafBaseProbs *hgMafProbs(
+	char *database,     /* Database, must already have hSetDb to this */
+	char *track, 	    /* Name of MAF track */
+	char *chrom, 	    /* Chromosome (in database genome) */
+	int start, int end, /* start/end in chromosome */
+	char strand 	    /* Chromosome strand. */
+        );
+/* calculate the probability of each nucleotide in each column of a maf. */
+
 struct mafAli *hgMafFrag(
 	char *database,     /* Database, must already have hSetDb to this */
 	char *track, 	    /* Name of MAF track */
 	char *chrom, 	    /* Chromosome (in database genome) */
 	int start, int end, /* start/end in chromosome */
 	char strand, 	    /* Chromosome strand. */
 	char *outName, 	    /* Optional name to use in first component */
 	struct slName *orderList /* Optional order of organisms. */
 	);
 /* mafFrag- Extract maf sequences for a region from database.
  * This creates a somewhat unusual MAF that extends from start
  * to end whether or not there are actually alignments.  Where
  * there are no alignments (or alignments missing a species)
  * a . character fills in.   The score is always zero, and
  * the sources just indicate the species.  You can mafFree this