715e2acf2dd9ef6106cc42ce79c724e1e52ad62e
braney
  Thu Mar 12 09:14:28 2026 -0700
NoDots MAF alignment display for hgc mafClick, with i-row preservation and mafFrag -noDots flag

hgMaf.c: add hgMafFragHelperNoDots and public wrappers (hgMafFragNoDots,
hgBigMafFragNoDots, hgMafFragFromMafListNoDots) that return a list of maf
blocks containing only species with actual sequence — no dot-filled rows.
Blocks are broken when the species set changes; gaps between same-species
blocks are filled with native sequence for the reference and dashes for
others.  Preserve i-row data (leftStatus/rightStatus/leftLen/rightLen)
through the NoDots path so insert annotations appear in emitted blocks.
hgMaf.h: declare the new NoDots public functions.
mafClick.c: use NoDots path when mafClickMafFrag is enabled.  Fix block
numbering (aliIx was never incremented in useMafFrag path).  Use full
textSize for NoDots line width.  Use dots instead of spaces in diff mode
for both paths.  Fix species label width computation to check labelHash
consistently so long assembly names don't misalign sequences.  Strip
ref gap columns where no other species has sequence.
mafFrag: add -noDots option to invoke hgMafFragNoDots from the command line,
with 4 new tests (noDots, noDotsRev, noDotsOutName, noDotsLarger).
refs #21477

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

diff --git src/hg/lib/hgMaf.c src/hg/lib/hgMaf.c
index e69f969cc2c..f66dfbe525b 100644
--- src/hg/lib/hgMaf.c
+++ src/hg/lib/hgMaf.c
@@ -145,30 +145,34 @@
 }
 
 struct oneOrg
 /* Info on one organism. */
     {
     struct oneOrg *next;
     char *name;		/* Name - allocated in hash */
     int order;		/* Help sort organisms. */
     struct dyString *dy;	/* Associated alignment for this organism. */
     boolean hit;	/* Flag to see if hit this time around. */
     char *src;		/* Full src from first maf component (e.g. "mm10.chr5") */
     int start;		/* Start in source from first aligned block. */
     int end;		/* End in source (updated as we see more blocks). */
     int srcSize;	/* Source sequence size. */
     char strand;	/* Strand of alignment. */
+    char leftStatus;	/* i-row: syntenic status before this alignment. */
+    int leftLen;	/* i-row: length info for previous alignment. */
+    char rightStatus;	/* i-row: syntenic status after this alignment. */
+    int rightLen;	/* i-row: length info for following alignment. */
     };
 
 static int oneOrgCmp(const void *va, const void *vb)
 /* Compare to sort based on order. */
 {
 const struct oneOrg *a = *((struct oneOrg **)va);
 const struct oneOrg *b = *((struct oneOrg **)vb);
 return a->order - b->order;
 }
 
 static void fillInMissing(struct oneOrg *nativeOrg, struct oneOrg *orgList,
 	struct dnaSeq *native, int seqStart, int curPos, int aliStart)
 /* Fill in alignment strings in orgList with native sequence
  * for first organism, and dots for rest. */
 {
@@ -552,30 +556,615 @@
 	char *chrom,        /* Chromosome (in database genome) */
 	int start, int end, /* start/end in chromosome */
 	char strand,        /* Chromosome strand. */
 	struct mafAli *mafList, /* Pre-loaded list of maf alignments */
 	char *outName,      /* Optional name to use in first component */
 	struct slName *orderList /* Optional order of organisms. */
 	)
 /* Extract maf sequences for a region from a pre-loaded mafList.
  * Same behavior as hgMafFrag but takes mafList directly instead
  * of loading from database.  Caller should not free mafList
  * afterwards (it is consumed). */
 {
 return hgMafFragHelper(database, chrom, start, end, strand, mafList, outName, orderList);
 }
 
+static struct mafAli *makeNativeOnlyMaf(char *src, int srcSize,
+    int srcStart, int size, struct dnaSeq *native, int nativeOffset)
+/* Create a single-component maf block with just native sequence. */
+{
+struct mafAli *gapMaf;
+struct mafComp *mc;
+AllocVar(gapMaf);
+gapMaf->textSize = size;
+AllocVar(mc);
+mc->src = cloneString(src);
+mc->srcSize = srcSize;
+mc->strand = '+';
+mc->start = srcStart;
+mc->size = size;
+mc->text = cloneStringZ(native->dna + nativeOffset, size);
+gapMaf->components = mc;
+return gapMaf;
+}
+
+static char *extractOrgName(char *src, char *buf, int bufSize, struct hash *orderHash)
+/* Extract organism name from src (text before first dot).
+ * If orderHash is provided, try two-dot names if one-dot name not found.
+ * Returns pointer to organism name (may point into buf or src). */
+{
+char *e = strchr(src, '.');
+if (e == NULL)
+    return src;
+int len = e - src;
+if (len >= bufSize)
+    errAbort("organism/database name %s too long", src);
+memcpy(buf, src, len);
+buf[len] = 0;
+if (orderHash != NULL && hashLookup(orderHash, buf) == NULL)
+    {
+    /* Try two-dot name for organisms with dots in their names */
+    e = strchr(e + 1, '.');
+    if (e != NULL)
+	{
+	len = e - src;
+	if (len < bufSize)
+	    {
+	    memcpy(buf, src, len);
+	    buf[len] = 0;
+	    }
+	}
+    }
+return buf;
+}
+
+static void mergeBlockInto(struct mafAli *dest, struct mafAli *src,
+    struct hash *orderHash)
+/* Merge src block into dest by appending src's alignment columns.
+ * Species present in dest but not src get dashes for the src portion.
+ * Species present in src but not dest get dashes for the dest portion
+ * followed by their actual text from src. */
+{
+int destTextSize = dest->textSize;
+int srcTextSize = src->textSize;
+int newTextSize = destTextSize + srcTextSize;
+
+/* Build hash of src components by org name */
+struct hash *srcHash = newHash(8);
+struct mafComp *mc;
+for (mc = src->components; mc != NULL; mc = mc->next)
+    {
+    char buf[128];
+    char *orgName = extractOrgName(mc->src, buf, sizeof(buf), orderHash);
+    if (hashLookup(srcHash, orgName) == NULL)
+	hashAdd(srcHash, orgName, mc);
+    }
+
+/* Build hash of dest components by org name */
+struct hash *destHash = newHash(8);
+for (mc = dest->components; mc != NULL; mc = mc->next)
+    {
+    char buf[128];
+    char *orgName = extractOrgName(mc->src, buf, sizeof(buf), orderHash);
+    hashAdd(destHash, orgName, mc);
+    }
+
+/* Extend all dest components: append matching src text or dashes */
+for (mc = dest->components; mc != NULL; mc = mc->next)
+    {
+    char buf[128];
+    char *orgName = extractOrgName(mc->src, buf, sizeof(buf), orderHash);
+    struct mafComp *srcMc = hashFindVal(srcHash, orgName);
+
+    char *newText = needMem(newTextSize + 1);
+    memcpy(newText, mc->text, destTextSize);
+
+    if (srcMc != NULL)
+	{
+	memcpy(newText + destTextSize, srcMc->text, srcTextSize);
+	mc->size += srcMc->size;
+	}
+    else
+	{
+	memset(newText + destTextSize, '-', srcTextSize);
+	}
+    newText[newTextSize] = '\0';
+    freeMem(mc->text);
+    mc->text = newText;
+    }
+
+/* Add components that are only in src */
+for (mc = src->components; mc != NULL; mc = mc->next)
+    {
+    char buf[128];
+    char *orgName = extractOrgName(mc->src, buf, sizeof(buf), orderHash);
+    if (hashFindVal(destHash, orgName) != NULL)
+	continue;
+
+    struct mafComp *newMc;
+    AllocVar(newMc);
+    newMc->src = cloneString(mc->src);
+    newMc->srcSize = mc->srcSize;
+    newMc->strand = mc->strand;
+    newMc->start = mc->start;
+    newMc->size = mc->size;
+    char *newText = needMem(newTextSize + 1);
+    memset(newText, '-', destTextSize);
+    memcpy(newText + destTextSize, mc->text, srcTextSize);
+    newText[newTextSize] = '\0';
+    newMc->text = newText;
+    slAddTail(&dest->components, newMc);
+    hashAdd(destHash, orgName, newMc);
+    }
+
+dest->textSize = newTextSize;
+freeHash(&srcHash);
+freeHash(&destHash);
+}
+
+static struct mafAli *stitchSmallBlocks(struct mafAli *blockList,
+    struct hash *orderHash)
+/* Walk through blockList and merge any block with fewer than 6 reference
+ * bases into an adjacent block, adding dashes for missing species. */
+{
+struct mafAli *resultList = NULL;
+struct mafAli *prev = NULL;
+struct mafAli *maf, *next;
+
+for (maf = blockList; maf != NULL; maf = next)
+    {
+    next = maf->next;
+    maf->next = NULL;
+
+    if (prev != NULL
+	&& (prev->components->size < 6 || maf->components->size < 6))
+	{
+	mergeBlockInto(prev, maf, orderHash);
+	mafAliFree(&maf);
+	}
+    else
+	{
+	if (prev != NULL)
+	    slAddHead(&resultList, prev);
+	prev = maf;
+	}
+    }
+
+if (prev != NULL)
+    slAddHead(&resultList, prev);
+slReverse(&resultList);
+return resultList;
+}
+
+static char *computeSpeciesKey(struct mafAli *subMaf, struct hash *orderHash)
+/* Build a sorted, comma-separated string of non-reference organism names
+ * present in subMaf (after filtering by orderHash).  Used to detect when
+ * the species set changes between maf blocks. */
+{
+struct hash *seen = newHash(8);
+struct slName *speciesList = NULL;
+struct mafComp *mc;
+boolean isFirst = TRUE;
+for (mc = subMaf->components; mc != NULL; mc = mc->next)
+    {
+    if (isFirst) { isFirst = FALSE; continue; }
+    if ((mc->size == 0) || (mc->srcSize == 0) || (mc->text == NULL))
+	continue;
+    char buf[128];
+    char *orgName = extractOrgName(mc->src, buf, sizeof(buf), orderHash);
+    if (orderHash != NULL && hashLookup(orderHash, orgName) == NULL)
+	continue;
+    if (hashLookup(seen, orgName) != NULL)
+	continue;
+    hashAdd(seen, orgName, NULL);
+    slNameAddHead(&speciesList, orgName);
+    }
+slSort(&speciesList, slNameCmp);
+struct dyString *dy = dyStringNew(256);
+struct slName *sn;
+for (sn = speciesList; sn != NULL; sn = sn->next)
+    {
+    if (dy->stringSize > 0)
+	dyStringAppendC(dy, ',');
+    dyStringAppend(dy, sn->name);
+    }
+slNameFreeList(&speciesList);
+freeHash(&seen);
+return dyStringCannibalize(&dy);
+}
+
+static int orderInList(struct slName *orderList, char *name)
+/* Return the 0-based index of name in orderList, or slCount if not found. */
+{
+struct slName *sn;
+int ord = 0;
+for (sn = orderList; sn != NULL; sn = sn->next, ord++)
+    if (sameString(sn->name, name))
+	return ord;
+return ord;
+}
+
+static struct mafAli *emitBlock(struct oneOrg *orgList, int symCount)
+/* Create a mafAli from the current block's oneOrg list.
+ * Frees the dyStrings in each org. */
+{
+struct mafAli *outMaf;
+struct oneOrg *org;
+AllocVar(outMaf);
+outMaf->textSize = symCount;
+slSort(&orgList, oneOrgCmp);
+for (org = orgList; org != NULL; org = org->next)
+    {
+    struct mafComp *mc;
+    AllocVar(mc);
+    if (org->src != NULL)
+	{
+	mc->src = cloneString(org->src);
+	mc->srcSize = org->srcSize;
+	mc->strand = org->strand;
+	mc->start = org->start;
+	mc->size = org->end - org->start;
+	}
+    else
+	{
+	int size = countAlpha(org->dy->string);
+	mc->src = cloneString(org->name);
+	mc->srcSize = size;
+	mc->strand = '+';
+	mc->start = 0;
+	mc->size = size;
+	}
+    mc->text = cloneString(org->dy->string);
+    mc->leftStatus = org->leftStatus;
+    mc->leftLen = org->leftLen;
+    mc->rightStatus = org->rightStatus;
+    mc->rightLen = org->rightLen;
+    dyStringFree(&org->dy);
+    slAddHead(&outMaf->components, mc);
+    }
+slReverse(&outMaf->components);
+return outMaf;
+}
+
+static struct mafAli *hgMafFragHelperNoDots(
+	char *database,     /* Database, must already have hSetDb to this */
+	char *chrom,        /* Chromosome (in database genome) */
+	int start, int end, /* start/end in chromosome */
+	char strand,        /* Chromosome strand. */
+        struct mafAli *mafList,
+	char *outName,      /* Optional name to use in first component */
+	struct slName *orderList /* Optional order of organisms. */
+	)
+/* hgMafFragHelperNoDots - Extract maf sequences for a region from database.
+ * Unlike hgMafFragHelper, this never includes assemblies with no sequence.
+ * Instead of filling dots for missing species, it starts new maf blocks
+ * containing only the assemblies that have sequence.  Blocks are only
+ * broken when the set of species changes.  Gaps between maf blocks with
+ * the same species are filled with native sequence for the reference and
+ * dashes for other species.  There are never periods in the alignment. */
+{
+int chromSize = hChromSize(database, chrom);
+struct dnaSeq *native = hChromSeq(database, chrom, start, end);
+struct mafAli *maf;
+char masterSrc[128];
+int curPos = start;
+struct mafAli *resultList = NULL;
+struct hash *orderHash = NULL;
+char *firstSrc;
+int firstSrcSize;
+
+safef(masterSrc, sizeof(masterSrc), "%s.%s", database, chrom);
+mafCheckFirstComponentSrc(mafList, masterSrc);
+mafCheckFirstComponentStrand(mafList, '+');
+slSort(&mafList, mafCmp);
+
+/* Determine source name and size for first component */
+if (outName != NULL)
+    {
+    firstSrc = outName;
+    firstSrcSize = end - start;
+    }
+else
+    {
+    firstSrc = masterSrc;
+    firstSrcSize = chromSize;
+    }
+
+/* Build hash of ordered species if provided */
+if (orderList != NULL)
+    {
+    struct slName *name;
+    orderHash = newHash(10);
+    for (name = orderList; name != NULL; name = name->next)
+	hashAdd(orderHash, name->name, NULL);
+    }
+
+/* State for the current output block being built up */
+struct hash *curOrgHash = NULL;
+struct oneOrg *curOrgList = NULL, *nativeOrg = NULL;
+int curSymCount = 0;
+char *curSpeciesKey = NULL;
+
+for (maf = mafList; maf != NULL; maf = maf->next)
+    {
+    struct mafComp *mcMaster = maf->components;
+    struct mafAli *subMaf = NULL;
+
+    if (curPos >= mcMaster->start + mcMaster->size)
+	continue;
+
+    if (mafNeedSubset(maf, masterSrc, curPos, end))
+	{
+	subMaf = mafSubset(maf, masterSrc, curPos, end);
+	if (subMaf == NULL)
+	    continue;
+	}
+    else
+	subMaf = maf;
+
+    struct mafComp *subMaster = subMaf->components;
+
+    /* Compute species key for this maf block */
+    char *blockKey = computeSpeciesKey(subMaf, orderHash);
+    boolean sameSpecies = (curSpeciesKey != NULL
+	&& sameString(curSpeciesKey, blockKey));
+
+    if (!sameSpecies)
+	{
+	/* Species set changed — finalize current block if any */
+	if (curOrgList != NULL)
+	    {
+	    struct mafAli *outMaf = emitBlock(curOrgList, curSymCount);
+	    slAddHead(&resultList, outMaf);
+	    slFreeList(&curOrgList);
+	    freeHash(&curOrgHash);
+	    }
+
+	/* Create ref-only block for gap before this maf if any */
+	if (curPos < subMaster->start)
+	    {
+	    int gapSize = subMaster->start - curPos;
+	    int offset = curPos - start;
+	    int srcStart = (outName != NULL) ? offset : curPos;
+	    struct mafAli *gapMaf = makeNativeOnlyMaf(firstSrc, firstSrcSize,
+		srcStart, gapSize, native, offset);
+	    slAddHead(&resultList, gapMaf);
+	    }
+
+	/* Start new block */
+	freeMem(curSpeciesKey);
+	curSpeciesKey = blockKey;
+	curOrgHash = newHash(10);
+	curOrgList = NULL;
+	nativeOrg = NULL;
+	curSymCount = 0;
+
+	/* Create native/reference org */
+	struct oneOrg *org;
+	AllocVar(org);
+	slAddHead(&curOrgList, org);
+	hashAddSaveName(curOrgHash, database, org, &org->name);
+	org->dy = dyStringNew(native->size * 1.5);
+	org->order = 0;
+	nativeOrg = org;
+	org->src = cloneString(firstSrc);
+	org->srcSize = firstSrcSize;
+	org->strand = '+';
+	org->start = (outName != NULL) ? (subMaster->start - start)
+	                               : subMaster->start;
+	org->leftStatus = subMaster->leftStatus;
+	org->leftLen = subMaster->leftLen;
+	org->rightStatus = subMaster->rightStatus;
+	org->rightLen = subMaster->rightLen;
+
+	/* Create orgs for non-reference species in this block */
+	int order = 1;
+	struct mafComp *mc;
+	boolean isFirst = TRUE;
+	for (mc = subMaf->components; mc != NULL; mc = mc->next)
+	    {
+	    if (isFirst) { isFirst = FALSE; continue; }
+	    if ((mc->size == 0) || (mc->srcSize == 0) || (mc->text == NULL))
+		continue;
+	    char buf[128];
+	    char *orgName = extractOrgName(mc->src, buf, sizeof(buf), orderHash);
+	    if (orderHash != NULL && hashLookup(orderHash, orgName) == NULL)
+		continue;
+	    if (hashFindVal(curOrgHash, orgName) != NULL)
+		continue;
+	    AllocVar(org);
+	    slAddHead(&curOrgList, org);
+	    hashAddSaveName(curOrgHash, orgName, org, &org->name);
+	    org->dy = dyStringNew(native->size * 1.5);
+	    if (orderList != NULL)
+		org->order = orderInList(orderList, orgName);
+	    else
+		org->order = order;
+	    order++;
+	    org->src = cloneString(mc->src);
+	    org->start = mc->start;
+	    org->srcSize = mc->srcSize;
+	    org->strand = mc->strand;
+	    org->leftStatus = mc->leftStatus;
+	    org->leftLen = mc->leftLen;
+	    org->rightStatus = mc->rightStatus;
+	    org->rightLen = mc->rightLen;
+	    }
+	}
+    else
+	{
+	/* Same species set — fill gap with native/dashes */
+	freeMem(blockKey);
+	if (curPos < subMaster->start)
+	    {
+	    int gapSize = subMaster->start - curPos;
+	    int offset = curPos - start;
+	    dyStringAppendN(nativeOrg->dy, native->dna + offset, gapSize);
+	    struct oneOrg *org;
+	    for (org = curOrgList; org != NULL; org = org->next)
+		if (org != nativeOrg)
+		    dyStringAppendMultiC(org->dy, '-', gapSize);
+	    curSymCount += gapSize;
+	    }
+	}
+
+    /* Append aligned text from subMaf to current block */
+    dyStringAppendN(nativeOrg->dy, subMaster->text, subMaf->textSize);
+    nativeOrg->end = (outName != NULL)
+	? (subMaster->start + subMaster->size - start)
+	: (subMaster->start + subMaster->size);
+    nativeOrg->rightStatus = subMaster->rightStatus;
+    nativeOrg->rightLen = subMaster->rightLen;
+
+    struct mafComp *mc;
+    boolean isFirst = TRUE;
+    int order = 1;
+    for (mc = subMaf->components; mc != NULL; mc = mc->next, ++order)
+	{
+	if (isFirst) { isFirst = FALSE; continue; }
+	if ((mc->size == 0) || (mc->srcSize == 0) || (mc->text == NULL))
+	    continue;
+	char buf[128];
+	char *orgName = extractOrgName(mc->src, buf, sizeof(buf), orderHash);
+	if (orderHash != NULL && hashLookup(orderHash, orgName) == NULL)
+	    continue;
+	struct oneOrg *org = hashFindVal(curOrgHash, orgName);
+	if (org == NULL)
+	    continue;
+	org->hit = TRUE;
+	dyStringAppendN(org->dy, mc->text, subMaf->textSize);
+	org->end = mc->start + mc->size;
+	org->rightStatus = mc->rightStatus;
+	org->rightLen = mc->rightLen;
+	}
+
+    /* Safety: fill dashes for any org not hit (shouldn't happen normally) */
+    struct oneOrg *org;
+    for (org = curOrgList; org != NULL; org = org->next)
+	{
+	if (org != nativeOrg && !org->hit)
+	    dyStringAppendMultiC(org->dy, '-', subMaf->textSize);
+	org->hit = FALSE;
+	}
+
+    curSymCount += subMaf->textSize;
+    curPos = mcMaster->start + mcMaster->size;
+
+    if (subMaf != maf)
+	mafAliFree(&subMaf);
+    }
+
+/* Finalize last block */
+if (curOrgList != NULL)
+    {
+    struct mafAli *outMaf = emitBlock(curOrgList, curSymCount);
+    slAddHead(&resultList, outMaf);
+    slFreeList(&curOrgList);
+    freeHash(&curOrgHash);
+    }
+
+/* Trailing gap */
+if (curPos < end)
+    {
+    int gapSize = end - curPos;
+    int offset = curPos - start;
+    int srcStart = (outName != NULL) ? offset : curPos;
+    struct mafAli *gapMaf = makeNativeOnlyMaf(firstSrc, firstSrcSize,
+	srcStart, gapSize, native, offset);
+    slAddHead(&resultList, gapMaf);
+    }
+
+freeMem(curSpeciesKey);
+slReverse(&resultList);
+
+/* Merge small blocks (< 6 reference bases) into adjacent blocks */
+resultList = stitchSmallBlocks(resultList, orderHash);
+
+/* Handle reverse complement */
+if (strand == '-')
+    {
+    slReverse(&resultList);
+    for (maf = resultList; maf != NULL; maf = maf->next)
+	{
+	struct mafComp *mc;
+	for (mc = maf->components; mc != NULL; mc = mc->next)
+	    if (mc->text != NULL)
+		reverseComplement(mc->text, maf->textSize);
+	}
+    }
+
+mafAliFreeList(&mafList);
+freeHash(&orderHash);
+return resultList;
+}
+
+struct mafAli *hgBigMafFragNoDots(
+	char *database,     /* Database, must already have hSetDb to this */
+        struct bbiFile *bbi,
+	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. */
+	)
+/* hgBigMafFragNoDots - Extract maf sequences for a region from a bigMaf.
+ * Returns a list of maf blocks with no dots - each block only contains
+ * assemblies that have actual sequence. */
+{
+struct mafAli *mafList = bigMafLoadInRegion(bbi, chrom, start, end);
+return hgMafFragHelperNoDots(database, chrom, start, end, strand, mafList, outName, orderList);
+}
+
+struct mafAli *hgMafFragNoDots(
+	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. */
+	)
+/* hgMafFragNoDots - Extract maf sequences for a region from database.
+ * Returns a list of maf blocks with no dots - each block only contains
+ * assemblies that have actual sequence. */
+{
+struct sqlConnection *conn = hAllocConn(database);
+struct mafAli *mafList = mafLoadInRegion(conn, track, chrom, start, end);
+struct mafAli *ret = hgMafFragHelperNoDots(database, chrom, start, end, strand, mafList, outName, orderList);
+
+hFreeConn(&conn);
+
+return ret;
+}
+
+struct mafAli *hgMafFragFromMafListNoDots(
+	char *database,     /* Database, must already have hSetDb to this */
+	char *chrom,        /* Chromosome (in database genome) */
+	int start, int end, /* start/end in chromosome */
+	char strand,        /* Chromosome strand. */
+	struct mafAli *mafList, /* Pre-loaded list of maf alignments */
+	char *outName,      /* Optional name to use in first component */
+	struct slName *orderList /* Optional order of organisms. */
+	)
+/* Extract maf sequences for a region from a pre-loaded mafList.
+ * Returns a list of maf blocks with no dots - each block only contains
+ * assemblies that have actual sequence.  Caller should not free mafList
+ * afterwards (it is consumed). */
+{
+return hgMafFragHelperNoDots(database, chrom, start, end, strand, mafList, outName, orderList);
+}
+
 struct consWiggle *wigMafWiggles(char *db, struct trackDb *tdb)
 /* get conservation wiggle table names and labels from trackDb setting,
    ignoring those where table doesn't exist */
 {
 char *fields[20];
 int fieldCt;
 int i;
 char *wigTable, *wigLabel;
 struct consWiggle *wig, *wigList = NULL;
 char *setting = trackDbSetting(tdb, CONS_WIGGLE);
 if (!setting)
     return NULL;
 fieldCt = chopLine(cloneString(setting), fields);
 for (i = 0; i < fieldCt; i += 3)
     {