c20579fc7c537c1736650125c5d264357d2cfa78
angie
  Mon Sep 18 13:15:16 2017 -0700
Big search & replace: use https instead of http for NCBI URLs.  refs #17793

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 53642dd..01eeef5 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -275,56 +275,56 @@
 void printLines(FILE *f, char *s, int lineSize);
 
 char mousedb[] = "mm3";
 
 #define NUMTRACKS 9
 int prevColor[NUMTRACKS]; /* used to optimize color change html commands */
 int currentColor[NUMTRACKS]; /* used to optimize color change html commands */
 int maxShade = 9;	/* Highest shade in a color gradient. */
 Color shadesOfGray[10+1];	/* 10 shades of gray from white to black */
 
 Color shadesOfRed[16];
 boolean exprBedColorsMade = FALSE; /* Have the shades of red been made? */
 int maxRGBShade = 16;
 
 struct bed *sageExpList = NULL;
-char ncbiOmimUrl[255] = {"http://www.ncbi.nlm.nih.gov/omim/"};
+char ncbiOmimUrl[255] = {"https://www.ncbi.nlm.nih.gov/omim/"};
 
 struct palInfo
 {
     char *chrom;
     int left;
     int right;
     char *rnaName;
 };
 
 /* See this NCBI web doc for more info about entrezFormat:
- * http://www.ncbi.nlm.nih.gov/entrez/query/static/linking.html */
-char *entrezFormat = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Search&db=%s&term=%s&doptcmdl=%s&tool=genome.ucsc.edu";
-char *entrezPureSearchFormat = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=%s&details_term=%s[%s] ";
-char *ncbiGeneFormat = "http://www.ncbi.nlm.nih.gov/gene/%s";
-char *entrezUidFormat = "http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=%s&list_uids=%d&dopt=%s&tool=genome.ucsc.edu";
+ * https://www.ncbi.nlm.nih.gov/entrez/query/static/linking.html */
+char *entrezFormat = "https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Search&db=%s&term=%s&doptcmdl=%s&tool=genome.ucsc.edu";
+char *entrezPureSearchFormat = "https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=PureSearch&db=%s&details_term=%s[%s] ";
+char *ncbiGeneFormat = "https://www.ncbi.nlm.nih.gov/gene/%s";
+char *entrezUidFormat = "https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=%s&list_uids=%d&dopt=%s&tool=genome.ucsc.edu";
 /* db=unists is not mentioned in NCBI's doc... so stick with this usage: */
-char *unistsnameScript = "http://www.ncbi.nlm.nih.gov:80/entrez/query.fcgi?db=unists";
-char *unistsScript = "http://www.ncbi.nlm.nih.gov/genome/sts/sts.cgi?uid=";
+char *unistsnameScript = "https://www.ncbi.nlm.nih.gov:80/entrez/query.fcgi?db=unists";
+char *unistsScript = "https://www.ncbi.nlm.nih.gov/genome/sts/sts.cgi?uid=";
 char *gdbScript = "http://www.gdb.org/gdb-bin/genera/accno?accessionNum=";
-char *cloneDbScript = "http://www.ncbi.nlm.nih.gov/clone?term=";
-char *traceScript = "http://www.ncbi.nlm.nih.gov/Traces/trace.cgi?cmd=retrieve&val=";
+char *cloneDbScript = "https://www.ncbi.nlm.nih.gov/clone?term=";
+char *traceScript = "https://www.ncbi.nlm.nih.gov/Traces/trace.cgi?cmd=retrieve&val=";
 char *genMapDbScript = "http://genomics.med.upenn.edu/perl/genmapdb/byclonesearch.pl?clone=";
 char *uniprotFormat = "http://www.uniprot.org/uniprot/%s";
-char *dbSnpFormat = "http://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?type=rs&rs=%s";
-char *clinVarFormat = "http://www.ncbi.nlm.nih.gov/clinvar/?term=%s[clv_acc]";
+char *dbSnpFormat = "https://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?type=rs&rs=%s";
+char *clinVarFormat = "https://www.ncbi.nlm.nih.gov/clinvar/?term=%s[clv_acc]";
 
 /* variables for gv tables */
 char *gvPrevCat = NULL;
 char *gvPrevType = NULL;
 
 /* initialized by getCtList() if necessary: */
 struct customTrack *theCtList = NULL;
 
 /* getDNA stuff actually works when the database doesn't exist! */
 boolean dbIsFound = FALSE;
 
 /* forwards */
 char *getPredMRnaProtSeq(struct genePred *gp);
 void doAltGraphXDetails(struct trackDb *tdb, char *item);
 
@@ -422,31 +422,31 @@
 
 static void printSwissProtVariationUrl(FILE *f, char *accession)
 /* Print URL for Swiss-Prot variation data on a protein. */
 {
 if (accession != NULL)
     {
     fprintf(f, "\"http://www.expasy.org/cgi-bin/get-sprot-variant.pl?%s\"", accession);
     }
 }
 
 static void printOmimUrl(FILE *f, char *term)
 /* Print URL for OMIM data on a protein. */
 {
 if (term != NULL)
     {
-    fprintf(f, "\"http://www.ncbi.nlm.nih.gov/omim/%s\"", term);
+    fprintf(f, "\"https://www.ncbi.nlm.nih.gov/omim/%s\"", term);
     }
 }
 
 static void printEntrezUniSTSUrl(FILE *f, char *name)
 /* Print URL for Entrez browser on a STS name. */
 {
 fprintf(f, "\"%s&term=%s\"", unistsnameScript, name);
 }
 
 static void printUnistsUrl(FILE *f, int id)
 /* Print URL for UniSTS record for an id. */
 {
 fprintf(f, "\"%s%d\"", unistsScript, id);
 }
 
@@ -4412,31 +4412,31 @@
 	if (grp != NULL && grp[0] != 0)
 	    {
 	    dyStringPrintf(url, "&hgta_group=%s", grp);
 	    dyStringPrintf(url, "&hgta_track=%s", track);
 	    dyStringPrintf(url, "&hgta_table=%s", track);
 	    }
 	}
     }
 return dyStringCannibalize(&url);
 }
 
 char *traceUrl(char *traceId)
 /* Make up URL for trace archive. */
 {
 struct dyString *url = dyStringNew(0);
-dyStringAppend(url, "http://www.ncbi.nlm.nih.gov/Traces/trace.cgi?");
+dyStringAppend(url, "https://www.ncbi.nlm.nih.gov/Traces/trace.cgi?");
 dyStringPrintf(url, "cmd=retrieve&size=1&val=%s&", traceId);
 dyStringAppend(url, "file=trace&dopt=trace");
 return dyStringCannibalize(&url);
 }
 
 void doGetDna1()
 /* Do first get DNA dialog. */
 {
 struct hTableInfo *hti = NULL;
 char *tbl = cgiUsualString("table", "");
 if (dbIsFound && tbl[0] != 0)
     {
     char rootName[256];
     char parsedChrom[32];
     hParseTableName(database, tbl, rootName, parsedChrom);
@@ -4822,31 +4822,31 @@
 	 "Places where the Genes and InterPro Domains overlap will be painted yellow "
 	 "(255,255,0).\n"
 	 "<LI>To get a level-of-coverage effect for tracks like Genes with "
 	 "multiple overlapping items, initially select a darker color such as deep "
 	 "green, RGB (0,64,0). Nucleotides covered by a single Gene will appear dark "
 	 "green, while regions covered with more Genes get progressively brighter &mdash; "
 	 "saturating at 4 Genes."
 	 "<LI>Another track can be used to mask unwanted features. Setting the "
 	 "InterPro track to RGB (255,255,255) will white-out Genes within InterPro "
 	 "domains. "
 	 "</UL>");
     puts("<H3>Further Details and Ideas</H3>");
     puts("<P>Copying and pasting the web page output to a text editor such as Word "
 	 "will retain upper case but lose colors and other formatting. That is still "
 	 "useful because other web tools such as "
-	 "<A HREF=\"http://www.ncbi.nlm.nih.gov/blast\" TARGET=_BLANK>NCBI Blast</A> "
+	 "<A HREF=\"https://www.ncbi.nlm.nih.gov/blast\" TARGET=_BLANK>NCBI Blast</A> "
 	 "can be set to ignore lower case.  To fully capture formatting such as color "
 	 "and underlining, view the output as \"source\" in your web browser, or download "
 	 "it, or copy the output page into an html editor.</P>");
     puts("<P>The default line width of 60 characters is standard, but if you have "
 	 "a reasonable sized monitor it's useful to set this higher - to 125 characters "
 	 "or more.  You can see more DNA at once this way, and fewer line breaks help "
 	 "in finding DNA strings using the web browser search function.</P>");
     }
 else
     {
     printf("<H3>Coloring Information and Examples</H3>\n");
     puts("The color values range from 0 (darkest) to 255 (lightest) and are additive.\n");
     puts("The examples below show a few ways to highlight individual tracks, "
 	 "and their interplay. It's good to keep it simple at first.  It's easy "
 	 "to make pretty, but completely cryptic, displays with this feature.");
@@ -4862,31 +4862,31 @@
 	 "(255,255,0).\n"
 	 "<LI>To get a level-of-coverage effect for tracks like Spliced Ests with "
 	 "multiple overlapping items, initially select a darker color such as deep "
 	 "green, RGB (0,64,0). Nucleotides covered by a single EST will appear dark "
 	 "green, while regions covered with more ESTs get progressively brighter &mdash; "
 	 "saturating at 4 ESTs."
 	 "<LI>Another track can be used to mask unwanted features. Setting the "
 	 "RepeatMasker track to RGB (255,255,255) will white-out Genscan predictions "
 	 "of LINEs but not mainstream host genes; masking with RefSeq Genes will show "
 	 "what is new in the gene prediction sector."
 	 "</UL>");
     puts("<H3>Further Details and Ideas</H3>");
     puts("<P>Copying and pasting the web page output to a text editor such as Word "
 	 "will retain upper case but lose colors and other formatting. That is still "
 	 "useful because other web tools such as "
-	 "<A HREF=\"http://www.ncbi.nlm.nih.gov/blast\" TARGET=_BLANK>NCBI Blast</A> "
+	 "<A HREF=\"https://www.ncbi.nlm.nih.gov/blast\" TARGET=_BLANK>NCBI Blast</A> "
 	 "can be set to ignore lower case.  To fully capture formatting such as color "
 	 "and underlining, view the output as \"source\" in your web browser, or download "
 	 "it, or copy the output page into an html editor.</P>");
     puts("<P>The default line width of 60 characters is standard, but if you have "
 	 "a reasonable sized monitor it's useful to set this higher - to 125 characters "
 	 "or more.  You can see more DNA at once this way, and fewer line breaks help "
 	 "in finding DNA strings using the web browser search function.</P>");
     puts("<P>Be careful about requesting complex formatting for a very large "
 	 "chromosomal region.  After all the html tags are added to the output page, "
 	 "the file size may exceed size limits that your browser, clipboard, and "
 	 "other software can safely display.  The tool will format 10 Mb and more, however.</P>");
     }
 trackDbFreeList(&tdbList);
 }
 
@@ -5815,31 +5815,31 @@
 	printEntrezEstUrl(stdout, acc);
     else
 	printEntrezNucleotideUrl(stdout, acc);
     printf("\" TARGET=_blank>%s</A></H2>\n", acc);
 
     printf("<B>Description:</B> %s<BR>\n", description);
     if (gbWarn != NULL)
         printGbWarn(acc, gbWarn);
 
     medlineLinkedLine("Gene", geneName, geneName);
     medlineProductLinkedLine("Product", productName);
     dyStringClear(dy);
     gbToEntrezAuthor(author, dy);
     medlineLinkedLine("Author", author, dy->string);
     printf("<B>Organism:</B> ");
-    printf("<A href=\"http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Undef&name=%s&lvl=0&srchmode=1\" TARGET=_blank>",
+    printf("<A href=\"https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Undef&name=%s&lvl=0&srchmode=1\" TARGET=_blank>",
 	   cgiEncode(orgFullName));
     printf("%s</A><BR>\n", orgFullName);
     printf("<B>Tissue:</B> %s<BR>\n", tissue);
     printf("<B>Development stage:</B> %s<BR>\n", development);
     printf("<B>Cell line:</B> %s<BR>\n", cell);
     printf("<B>Sex:</B> %s<BR>\n", sex);
     printf("<B>Library:</B> %s<BR>\n", library);
     printf("<B>Clone:</B> %s<BR>\n", clone);
     if (isEst)
         {
         printf("<B>Read direction: </B>");
         if (direction[0] != '0')
             printf("%s' (guessed from GenBank description)<BR>\n", direction);
         else
             printf("unknown (can't guess from GenBank description)<BR>");
@@ -6649,31 +6649,31 @@
 char *accession1, *accession2, *spanner, *variation, *varEvidence,
     *contact, *remark, *comment;
 // char *evaluation;  unused variable
 char *secondAcc, *secondAccVer;
 char *tmpString;
 int first;
 
 cartWebStart(cart, database, "%s", fragName);
 hFindSplitTable(database, seqName, tdb->table, splitTable, &hasBin);
 sqlSafef(query, sizeof query, "select * from %s where frag = '%s' and chromStart = %d",
 	splitTable, fragName, start);
 sr = sqlMustGetResult(conn, query);
 row = sqlNextRow(sr);
 agpFragStaticLoad(row+hasBin, &frag);
 
-printf("<B>Entrez nucleotide:</B><A TARGET=_blank HREF='http://www.ncbi.nlm.nih.gov/nuccore/%s'> %s</A><BR>\n", fragName, fragName);
+printf("<B>Entrez nucleotide:</B><A TARGET=_blank HREF='https://www.ncbi.nlm.nih.gov/nuccore/%s'> %s</A><BR>\n", fragName, fragName);
 printf("<B>Clone Fragment ID:</B> %s<BR>\n", frag.frag);
 printf("<B>Clone Fragment Type:</B> %s<BR>\n", frag.type);
 printf("<B>Clone Bases:</B> %d-%d<BR>\n", frag.fragStart+1, frag.fragEnd);
 
 if (hTableExists(database, "contigAcc"))
     {
     sqlSafef(query2, sizeof query2, "select * from contigAcc where contig = '%s'", frag.frag);
     if ((sr2 = sqlGetResult(conn2, query2)))
         {
         row = sqlNextRow(sr2);
         if (row)
             {
             contigAccStaticLoad(row, &contigAcc);
             printf("<B>Genbank Accession: <A HREF=");
             printEntrezNucleotideUrl(stdout, contigAcc.acc);
@@ -9745,31 +9745,31 @@
     printf("<A HREF=\"%s%s%s\" target=_blank>",
     "http://www.hugenavigator.net/HuGENavigator/searchSummary.do?firstQuery=",
            itemName,
     "&publitSearchType=now&whichContinue=firststart&check=n&dbType=publit&Mysubmit=go");
     printf("%s</B></A>\n", itemName);
 
     sqlSafef(query, sizeof(query),
           "select distinct g.omimId, o.title from gadAll g, hgFixed.omimTitle o where g.geneSymbol='%s' and g.omimId <>'.' and g.omimId=o.omimId",
           itemName);
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
     if (row != NULL) printf("<BR><B>OMIM: </B>");
     while (row != NULL)
         {
 	printf("<A HREF=\"%s%s\" target=_blank>",
-		"http://www.ncbi.nlm.nih.gov/omim/", row[0]);
+		"https://www.ncbi.nlm.nih.gov/omim/", row[0]);
 	printf("%s</B></A> %s\n", row[0], row[1]);
 	row = sqlNextRow(sr);
         }
     sqlFreeResult(&sr);
 
     /* List disease classes associated with the gene */
     sqlSafef(query, sizeof(query),
           "select distinct diseaseClass from gadAll where geneSymbol='%s' and association = 'Y' order by diseaseClass",
     itemName);
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
 
     if (row != NULL)
         {
         diseaseClass = row[0];
@@ -11167,31 +11167,31 @@
 	printf("&nbsp;&nbsp; Status: <B>%s</B>", row[0]);
 	}
     sqlFreeResult(&sr);
     }
 puts("<BR>");
 
 if (rl->omimId != 0)
     {
     printf("<B>OMIM:</B> <A HREF=\"");
     printEntrezOMIMUrl(stdout, rl->omimId);
     printf("\" TARGET=_blank>%d</A><BR>\n", rl->omimId);
     }
 if (rl->locusLinkId != 0)
     {
     printf("<B>Entrez Gene:</B> ");
-    printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%d\" TARGET=_blank>",
+    printf("<A HREF=\"https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%d\" TARGET=_blank>",
            rl->locusLinkId);
     printf("%d</A><BR>\n", rl->locusLinkId);
     }
 
 htmlHorizontalLine();
 
 /* print alignments that track was based on */
 {
 char *aliTbl = (sameString(tdb->table, "rgdGene") ? "refSeqAli" : "xenoRGDAli");
 struct psl *pslList = getAlignments(conn, aliTbl, rl->mrnaAcc);
 printf("<H3>mRNA/Genomic Alignments</H3>");
 printAlignments(pslList, start, "htcCdnaAli", aliTbl, rl->mrnaAcc);
 }
 
 htmlHorizontalLine();
@@ -11519,31 +11519,31 @@
 
 cdsCmpl = getRefSeqCdsCompleteness(conn, sqlRnaName);
 if (cdsCmpl != NULL)
     {
     printf("<B>CDS:</B> %s<BR>", cdsCmpl);
     }
 if (rl->omimId != 0)
     {
     printf("<B>OMIM:</B> <A HREF=\"");
     printEntrezOMIMUrl(stdout, rl->omimId);
     printf("\" TARGET=_blank>%d</A><BR>\n", rl->omimId);
     }
 if (rl->locusLinkId != 0)
     {
     printf("<B>Entrez Gene:</B> ");
-    printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%d\" TARGET=_blank>",
+    printf("<A HREF=\"https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%d\" TARGET=_blank>",
            rl->locusLinkId);
     printf("%d</A><BR>\n", rl->locusLinkId);
 
     if ( (strstr(database, "mm") != NULL) && hTableExists(database, "MGIid"))
         {
         char *mgiID;
 	sqlSafef(query, sizeof(query), "select MGIid from MGIid where LLid = '%d';",
 		rl->locusLinkId);
 
 	sr = sqlGetResult(conn, query);
 	if ((row = sqlNextRow(sr)) != NULL)
 	    {
 	    printf("<B>Mouse Genome Informatics:</B> ");
 	    mgiID = cloneString(row[0]);
 
@@ -11602,31 +11602,31 @@
     sqlSafef(query, sizeof(query), "select * from jaxOrtholog where humanSymbol='%s'", sqlRlName);
     sr = sqlGetResult(conn, query);
     while ((row = sqlNextRow(sr)) != NULL)
         {
 	jaxOrthologStaticLoad(row, &jo);
 	printf("<B>MGI Mouse Ortholog:</B> ");
 	printf("<A HREF=\"http://www.informatics.jax.org/searches/accession_report.cgi?id=%s\" target=_BLANK>", jo.mgiId);
 	printf("%s</A><BR>\n", jo.mouseSymbol);
 	}
     sqlFreeResult(&sr);
     }
 if (startsWith("hg", database))
     {
     printf("\n");
     printf("<B>AceView:</B> ");
-    printf("<A HREF = \"http://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=human&l=%s\" TARGET=_blank>",
+    printf("<A HREF = \"https://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=human&l=%s\" TARGET=_blank>",
 	   rl->name);
     printf("%s</A><BR>\n", rl->name);
     }
 prGRShortRefGene(rl->name);
 
 }
 
 void prKnownGeneInfo(struct sqlConnection *conn, char *rnaName,
                    char *sqlRnaName, struct refLink *rl)
 /* print basic details information and links for a Known Gene */
 {
 struct sqlResult *sr;
 char **row;
 char query[256];
 int ver = gbCdnaGetVersion(conn, rl->mrnaAcc);
@@ -11656,31 +11656,31 @@
 
 cdsCmpl = getRefSeqCdsCompleteness(conn, sqlRnaName);
 if (cdsCmpl != NULL)
     {
     printf("<B>CDS:</B> %s<BR>", cdsCmpl);
     }
 if (rl->omimId != 0)
     {
     printf("<B>OMIM:</B> <A HREF=\"");
     printEntrezOMIMUrl(stdout, rl->omimId);
     printf("\" TARGET=_blank>%d</A><BR>\n", rl->omimId);
     }
 if (rl->locusLinkId != 0)
     {
     printf("<B>Entrez Gene:</B> ");
-    printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%d\" TARGET=_blank>",
+    printf("<A HREF=\"https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%d\" TARGET=_blank>",
            rl->locusLinkId);
     printf("%d</A><BR>\n", rl->locusLinkId);
 
     if ( (strstr(database, "mm") != NULL) && hTableExists(database, "MGIid"))
         {
         char *mgiID;
 	sqlSafef(query, sizeof(query), "select MGIid from MGIid where LLid = '%d';",
 		rl->locusLinkId);
 
 	sr = sqlGetResult(conn, query);
 	if ((row = sqlNextRow(sr)) != NULL)
 	    {
 	    printf("<B>Mouse Genome Informatics:</B> ");
 	    mgiID = cloneString(row[0]);
 
@@ -11907,67 +11907,67 @@
     printf("<b>ncRNA class:</b> %s<br>\n", nrl->ncrna_class);
     }
 if (differentWord(nrl->note, ""))
     {
     printf("<b>Other notes:</b> %s<br>\n", nrl->note);
     }
 if (differentWord(nrl->omimId, ""))
     {
     printf("<b>OMIM:</b> <a href='");
     printEntrezOMIMUrl(stdout, sqlSigned(nrl->omimId));
     printf("' target=_blank>%s</a><br>\n", nrl->omimId);
     }
 if (differentWord(nrl->mrnaAcc, "") && differentWord(nrl->mrnaAcc,nrl->id))
     {
     printf("<b>mRNA:</b> ");
-    printf("<a href='http://www.ncbi.nlm.nih.gov/nuccore/%s' target=_blank>", nrl->mrnaAcc);
+    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='http://www.ncbi.nlm.nih.gov/nuccore/%s' target=_blank>", nrl->genbank);
+    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='http://www.ncbi.nlm.nih.gov/protein/%s' target=_blank>", nrl->protAcc);
+    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, ""))
     {
     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='http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gene&cmd=Retrieve&dopt=Graphics&list_uids=%s' TARGET=_blank>",
+    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,""))
     {
     printGeneCards(nrl->name);
     if (startsWith("hg", database))
         {
         printf("<b>AceView:</b> ");
-        printf("<a href = 'http://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=human&l=%s' target=_blank>",
+        printf("<a href = 'https://www.ncbi.nlm.nih.gov/IEB/Research/Acembly/av.cgi?db=human&l=%s' target=_blank>",
 	   nrl->name);
         printf("%s</a><br>\n", nrl->name);
         }
     }
 if ((trackVersion != NULL) && !isEmpty(trackVersion->version))
     {
     printf("<B>Annotation Release:</B> <A href='%s' TARGET=_blank> %s <BR></A>", trackVersion->comment, trackVersion->version);
     }
 
 htmlHorizontalLine();
 if (differentWord("", nrl->description))
     {
     printf("Summary of <b>%s</b><br>\n%s<br>\n", nrl->name, nrl->description);
     htmlHorizontalLine();
     }
@@ -13633,31 +13633,31 @@
 char *tiNum = strrchr(itemName, '|');
 boolean hasBin;
 char table[64];
 
 /* Print heading info including link to NCBI. */
 if (tiNum != NULL)
     ++tiNum;
 cartWebStart(cart, database, "%s", itemName);
 printf("<H1>Information on Mouse %s %s</H1>",
        (tiNum == NULL ? "Contig" : "Read"), itemName);
 
 /* Print links to NCBI and to sequence. */
 if (tiNum != NULL)
     {
     printf("Link to ");
-    printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/Traces/trace.cgi?val=%s\" TARGET=_blank>", tiNum);
+    printf("<A HREF=\"https://www.ncbi.nlm.nih.gov/Traces/trace.cgi?val=%s\" TARGET=_blank>", tiNum);
     printf("NCBI Trace Repository for %s\n</A><BR>\n", itemName);
     }
 printf("Get ");
 printf("<A HREF=\"%s&g=htcExtSeq&c=%s&l=%d&r=%d&i=%s\">",
        hgcPathAndSettings(), seqName, winStart, winEnd, itemName);
 printf("Mouse DNA</A><BR>\n");
 
 /* Print info about mate pair. */
 if (tiNum != NULL && sqlTableExists(conn, "mouseTraceInfo"))
     {
     char buf[256];
     char *templateId;
     boolean gotMate = FALSE;
     sqlSafef(query, sizeof query, "select templateId from mouseTraceInfo where ti = '%s'", itemName);
     templateId = sqlQuickQuery(conn, query, buf, sizeof(buf));
@@ -14922,31 +14922,31 @@
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
     if (row != NULL)
 	{
 	infoRow = stsInfoMouseNewLoad(row);
 	printf("<TABLE>\n");
 	printf("<TR><TH ALIGN=left>Chromosome:</TH><TD>%s</TD></TR>\n", seqName);
 	printf("<TR><TH ALIGN=left>Start:</TH><TD>%d</TD></TR>\n",start+1);
 	printf("<TR><TH ALIGN=left>End:</TH><TD>%d</TD></TR>\n",end);
 	printf("</TABLE>\n");
         htmlHorizontalLine();
         printf("<TABLE>\n");
         printf("<TR><TH ALIGN=left>UCSC STS Marker ID:</TH><TD>%d</TD></TR>\n", infoRow->identNo);
         if (infoRow->UiStsId != 0)
             printf("<TR><TH ALIGN=left>UniSts Marker ID:</TH><TD>"
-                   "<A HREF=\"http://www.ncbi.nlm.nih.gov/genome/sts/sts.cgi?uid=%d\" "
+                   "<A HREF=\"https://www.ncbi.nlm.nih.gov/genome/sts/sts.cgi?uid=%d\" "
                    "TARGET=_BLANK>%d</A></TD></TR>\n", infoRow->UiStsId, infoRow->UiStsId);
         if (infoRow->MGIId != 0)
             printf("<TR><TH ALIGN=left>MGI Marker ID:</TH><TD><B>"
                    "<A HREF=\"http://www.informatics.jax.org/searches/marker_report.cgi?"
                    "accID=MGI%c3A%d\" TARGET=_BLANK>%d</A></TD></TR>\n",
                    sChar,infoRow->MGIId,infoRow->MGIId );
         if (strcmp(infoRow->MGIName, ""))
             printf("<TR><TH ALIGN=left>MGI Marker Name:</TH><TD>%s</TD></TR>\n", infoRow->MGIName);
         printf("</TABLE>\n");
         htmlHorizontalLine();
 	/* Print out primer information */
 	printf("<TABLE>\n");
 	printf("<TR><TH ALIGN=left>Left Primer:</TH><TD>%s</TD></TR>\n",infoRow->primer1);
 	printf("<TR><TH ALIGN=left>Right Primer:</TH><TD>%s</TD></TR>\n",infoRow->primer2);
 	printf("<TR><TH ALIGN=left>Distance:</TH><TD>%s bps</TD></TR>\n",infoRow->distance);
@@ -15104,31 +15104,31 @@
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
     if (row != NULL)
 	{
 	infoRow = stsInfoRatLoad(row);
 	printf("<TABLE>\n");
 	printf("<TR><TH ALIGN=left>Chromosome:</TH><TD>%s</TD></TR>\n", seqName);
 	printf("<TR><TH ALIGN=left>Start:</TH><TD>%d</TD></TR>\n",start+1);
 	printf("<TR><TH ALIGN=left>End:</TH><TD>%d</TD></TR>\n",end);
 	printf("</TABLE>\n");
         htmlHorizontalLine();
         printf("<TABLE>\n");
         printf("<TR><TH ALIGN=left>UCSC STS Marker ID:</TH><TD>%d</TD></TR>\n", infoRow->identNo);
         if (infoRow->UiStsId != 0)
             printf("<TR><TH ALIGN=left>UniSts Marker ID:</TH><TD>"
-                   "<A HREF=\"http://www.ncbi.nlm.nih.gov/genome/sts/sts.cgi?uid=%d\" "
+                   "<A HREF=\"https://www.ncbi.nlm.nih.gov/genome/sts/sts.cgi?uid=%d\" "
                    "TARGET=_BLANK>%d</A></TD></TR>\n", infoRow->UiStsId, infoRow->UiStsId);
         if (infoRow->RGDId != 0)
             printf("<TR><TH ALIGN=left>RGD Marker ID:</TH><TD><B>"
                    "<A HREF=\"http://rgd.mcw.edu/tools/query/query.cgi?id=%d\" "
                    "TARGET=_BLANK>%d</A></TD></TR>\n", infoRow->RGDId,infoRow->RGDId );
         if (strcmp(infoRow->RGDName, ""))
             printf("<TR><TH ALIGN=left>RGD Marker Name:</TH><TD>%s</TD></TR>\n", infoRow->RGDName);
         printf("</TABLE>\n");
         htmlHorizontalLine();
 	/* Print out primer information */
 	printf("<TABLE>\n");
 	printf("<TR><TH ALIGN=left>Left Primer:</TH><TD>%s</TD></TR>\n",infoRow->primer1);
 	printf("<TR><TH ALIGN=left>Right Primer:</TH><TD>%s</TD></TR>\n",infoRow->primer2);
 	printf("<TR><TH ALIGN=left>Distance:</TH><TD>%s bps</TD></TR>\n",infoRow->distance);
 	printf("</TABLE>\n");
@@ -15804,49 +15804,49 @@
 	sqlSafef(query, sizeof(query),
 	      "select * "
 	      "from   dbSnpRs%s "
 	      "where  rsId = '%s'", dbOrg, name);
     else
 	sqlSafef(query, sizeof(query),
 	      "select * "
 	      "from   dbSnpRs%s "
 	      "where  rsId = '%s'", dbOrg, rsId);
     snp = dbSnpRsLoadByQuery(hgFixed, query);
     if (snp != NULL)
 	{
 	printf("<BR>\n");
 	if(snp->avHetSE>0)
 	    {
-	    printf("<B><A HREF=\"http://www.ncbi.nlm.nih.gov/SNP/Hetfreq.html\" target=\"_blank\">");
+	    printf("<B><A HREF=\"https://www.ncbi.nlm.nih.gov/SNP/Hetfreq.html\" target=\"_blank\">");
 	    printf("Average Heterozygosity</A>:</B> %f<BR>\n",snp->avHet);
-	    printf("<B><A HREF=\"http://www.ncbi.nlm.nih.gov/SNP/Hetfreq.html\" target=\"_blank\">");
+	    printf("<B><A HREF=\"https://www.ncbi.nlm.nih.gov/SNP/Hetfreq.html\" target=\"_blank\">");
 	    printf("Standard Error of Avg. Het.</A>: </B> %f<BR>\n", snp->avHetSE);
 	    }
 	else
 	    {
-	    printf("<B><A HREF=\"http://www.ncbi.nlm.nih.gov/SNP/Hetfreq.html\" target=\"_blank\">");
+	    printf("<B><A HREF=\"https://www.ncbi.nlm.nih.gov/SNP/Hetfreq.html\" target=\"_blank\">");
 	    printf("Average Heterozygosity</A>:</B> Not Known<BR>\n");
-	    printf("<B><A HREF=\"http://www.ncbi.nlm.nih.gov/SNP/Hetfreq.html\" target=\"_blank\">");
+	    printf("<B><A HREF=\"https://www.ncbi.nlm.nih.gov/SNP/Hetfreq.html\" target=\"_blank\">");
 	    printf("Standard Error of Avg. Het.</A>: </B> Not Known<BR>\n");
             }
-//      printf("<B><A HREF=\"http://www.ncbi.nlm.nih.gov/SNP/snp_legend.cgi?legend=snpFxnColor\" "
+//      printf("<B><A HREF=\"https://www.ncbi.nlm.nih.gov/SNP/snp_legend.cgi?legend=snpFxnColor\" "
 //             "target=\"_blank\">");
 //      printf("Functional Status</A>:</B> <span style='font-family:Courier;'>%s<BR></span>\n",
 //             snp->func);
         printf("<B>Functional Status:</B> <span style='font-family:Courier;'>%s<BR></span>\n",
                snp->func);
-        printf("<B><A HREF=\"http://www.ncbi.nlm.nih.gov/SNP/snp_legend.cgi?legend=validation\" "
+        printf("<B><A HREF=\"https://www.ncbi.nlm.nih.gov/SNP/snp_legend.cgi?legend=validation\" "
                "target=\"_blank\">");
         printf("Validation Status</A>:</B> <span style='font-family:Courier;'>%s<BR></span>\n",
                snp->valid);
 //      printf("<B>Validation Status:</B> <span style='font-family:Courier;'>%s<BR></span>\n",
 //             snp->valid);
         printf("<B>Allele1:          </B> <span style='font-family:Courier;'>%s<BR></span>\n",
                snp->allele1);
         printf("<B>Allele2:          </B> <span style='font-family:Courier;'>%s<BR>\n",
                snp->allele2);
         printf("<B>Sequence in Assembly</B>:&nbsp;%s<BR>\n", snp->assembly);
         printf("<B>Alternate Sequence</B>:&nbsp;&nbsp;&nbsp;%s<BR></span>\n", snp->alternate);
         }
     dbSnpRsFree(&snp);
     }
 sqlDisconnect(&hgFixed);
@@ -15883,31 +15883,31 @@
 	  "       rl.locusLinkID, "
 	  "       rl.name         "
 	  "from   knownGene  kg,  "
 	  "       %s         rl,  "
 	  "       %s         snp, "
 	  "       mrnaRefseq mrs  "
 	  "where  snp.chrom  = kg.chrom       "
 	  "  and  kg.name    = mrs.mrna       "
 	  "  and  mrs.refSeq = rl.mrnaAcc     "
 	  "  and  kg.txStart < snp.chromStart "
 	  "  and  kg.txEnd   > snp.chromEnd   "
 	  "  and  snp.name   = '%s'",refLinkTable, table, name);
     sr = sqlGetResult(conn, query);
     while ((row = sqlNextRow(sr)) != NULL)
 	{
-	printf("<BR><A HREF=\"http://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?");
+	printf("<BR><A HREF=\"https://www.ncbi.nlm.nih.gov/SNP/snp_ref.cgi?");
 	printf("geneId=%s\" TARGET=_blank>Entrez Gene for ", row[0]);
 	printf("%s</A><BR>\n", row[1]);
 	}
     sqlFreeResult(&sr);
     }
 hFreeConn(&conn);
 }
 
 void doSnpOld(struct trackDb *tdb, char *itemName)
 /* Put up info on a SNP. */
 {
 char *snpTable = tdb->table;
 struct snp snp;
 struct snpMap snpMap;
 int start = cartInt(cart, "o");
@@ -17956,31 +17956,31 @@
 		   highlightCodonBase(anno->codons[i], anno->frame));
 	    }
 	}
     sqlFreeResult(&sr);
     }
 hFreeConn(&conn);
 }
 
 void printSnp132ExtraColumns(struct trackDb *tdb, struct snp132Ext *snp)
 /* Print columns new in snp132 */
 {
 // Skip exceptions column; handled below in writeSnpExceptionWithVersion
 printf("<TR><TD><B><A HREF=\"#Submitters\">Submitter Handles</A>&nbsp;&nbsp;</TD><TD></B>");
 int i;
 for (i=0;  i < snp->submitterCount;  i++)
-    printf("%s<A HREF=\"http://www.ncbi.nlm.nih.gov/SNP/snp_viewTable.cgi?h=%s\" TARGET=_BLANK>"
+    printf("%s<A HREF=\"https://www.ncbi.nlm.nih.gov/SNP/snp_viewTable.cgi?h=%s\" TARGET=_BLANK>"
 	   "%s</A>", (i > 0 ? ", " : ""), snp->submitters[i], snp->submitters[i]);
 printf("</TD></TR>\n");
 if (snp->alleleFreqCount > 0)
     {
     boolean gotNonIntN = FALSE;
     double total2NDbl = 0.0;
     for (i = 0;  i < snp->alleleFreqCount;  i++)
         total2NDbl += snp->alleleNs[i];
     int total2N = round(total2NDbl);
     printf("<TR><TD><B><A HREF=\"#AlleleFreq\">Allele Frequencies</A>&nbsp;&nbsp;</B></TD><TD>");
     for (i = 0;  i < snp->alleleFreqCount;  i++)
 	{
 	printf("%s%s: %.3f%% ", (i > 0 ? "; " : ""), snp->alleles[i], (snp->alleleFreqs[i]*100.0));
 	// alleleNs should be integers (counts of chromosomes in which allele was observed)
 	// but dbSNP extrapolates them from reported frequency and reported sample count,
@@ -19292,31 +19292,31 @@
 int start = cartInt(cart, "o");
 struct gbProtAnn *gbProtAnn;
 
 genericHeader(tdb, item);
 sqlSafef(query, sizeof query, "select * from gbProtAnn where name = '%s' and chrom = '%s' and chromStart = %d",
         item, seqName, start);
 sr = sqlGetResult(conn, query);
 if ((row = sqlNextRow(sr)) != NULL)
     {
     gbProtAnn = gbProtAnnLoad(row);
     printCustomUrl(tdb, item, TRUE);
     printf("<B>Product:</B> %s<BR>\n", gbProtAnn->product);
     if (gbProtAnn->note[0] != 0)
 	printf("<B>Note:</B> %s <BR>\n", gbProtAnn->note);
     printf("<B>GenBank Protein: </B>");
-    printf("<A HREF=\"http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?val=%s\"",
+    printf("<A HREF=\"https://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?val=%s\"",
 	    gbProtAnn->proteinId);
     printf(" TARGET=_blank>%s</A><BR>\n", gbProtAnn->proteinId);
 
     htmlHorizontalLine();
     showSAM_T02(gbProtAnn->proteinId);
 
     printPos(seqName, gbProtAnn->chromStart, gbProtAnn->chromEnd, "+", TRUE,
 	     gbProtAnn->name);
     }
 printTrackHtml(tdb);
 
 sqlFreeResult(&sr);
 hFreeConn(&conn);
 }
 
@@ -20503,31 +20503,31 @@
     }
 featureCount= slCount(sgList);
 printf("<basefont size=-1>\n");
 printf("<table cellspacing=0 style='border:1px solid black;'>\n");
 printf("<tr>\n");
 printf("<th align=center>Sage Experiment</th>\n");
 printf("<th align=center>Tissue</th>\n");
 printf("<th align=center colspan=%d valign=top>Uni-Gene Clusters<br>(<b>Median</b> [Ave &plusmn Stdev])</th>\n",featureCount);
 printf("</tr>\n<tr><td>&nbsp</td><td>&nbsp</td>\n");
 for(sg = sgList; sg != NULL; sg = sg->next)
     {
     char buff[32];
     char url[256];
     safef(buff, sizeof buff, "Hs.%d", sg->uni);
     printf("<td valign=top align=center>\n");
-    safef(url, sizeof url, "http://www.ncbi.nlm.nih.gov/SAGE/SAGEcid.cgi?cid=%d&org=Hs",sg->uni);
+    safef(url, sizeof url, "https://www.ncbi.nlm.nih.gov/SAGE/SAGEcid.cgi?cid=%d&org=Hs",sg->uni);
     printTableHeaderName(buff, itemName, url);
     printf("</td>");
     }
 printf("</tr>\n");
 /* for each experiment write out the name and then all of the values */
 for(se=seList;se!=NULL;se=se->next)
     {
     char *tmp;
     tmp = strstr(se->exp,"_");
     if(++count%2)
 	printf("<tr>\n");
     else
 	printf("<tr bgcolor=\"#bababa\">\n");
     printf("<td align=left>");
     printf("%s</td>\n", tmp ? (tmp+1) : se->exp);