447843e8a6310fa7a837c2f1790dea8a093e9cf7
angie
  Wed Sep 20 13:20:53 2017 -0700
NCBI RefSeq: link out to MGI IDs for mouse.  Use the human-specific hgnc column of ncbiRefSeqLink table.  In hgc, if contents of hgnc start with "MGI:" then label as MGI instead of HGNC.  In ncbiRefSeqOther bigBed, omit extra columns that have no values (like OMIM and HGNC for mouse, and MGI for human); auto-generate ncbiRefSeqOther.as accordingly.  refs #18997

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 01eeef5..f0c9bcf 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -11922,31 +11922,37 @@
     printf("<a href='https://www.ncbi.nlm.nih.gov/nuccore/%s' target=_blank>", nrl->mrnaAcc);
     printf("%s</a><br>\n", nrl->mrnaAcc);
     }
 if (differentWord(nrl->genbank, "") && differentWord(nrl->genbank,nrl->id))
     {
     printf("<b>Genbank:</b> ");
     printf("<a href='https://www.ncbi.nlm.nih.gov/nuccore/%s' target=_blank>", nrl->genbank);
     printf("%s</a><br>\n", nrl->genbank);
     }
 if (differentWord(nrl->protAcc, ""))
     {
     printf("<b>Protein:</b> ");
     printf("<a href='https://www.ncbi.nlm.nih.gov/protein/%s' target=_blank>", nrl->protAcc);
     printf("%s</a><br>\n", nrl->protAcc);
     }
-if (differentWord(nrl->hgnc, ""))
+if (startsWith("MGI", nrl->hgnc))
+    {
+    printf("<b>MGI:</b> "
+           "<a href=\"http://www.informatics.jax.org/marker/%s\" target=_blank>%s</a><br>\n",
+           nrl->hgnc, nrl->hgnc);
+    }
+else if (differentWord(nrl->hgnc, ""))
     {
     printf("<b>HGNC:</b> ");
     printf("<a href='http://www.genenames.org/cgi-bin/gene_symbol_report?hgnc_id=HGNC:%s' target=_blank>", nrl->hgnc);
     printf("%s</a><br>\n", nrl->hgnc);
     }
 
 if (differentWord(nrl->locusLinkId, ""))
     {
     printf("<b>Entrez Gene:</b> ");
     printf("<a href='https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%s' TARGET=_blank>",
            nrl->locusLinkId);
     printf("%s</a><br>\n", nrl->locusLinkId);
     }
 
 if (differentWord(nrl->name,""))