13dddf36dc0f43a27a792519213d87939b51d99c
angie
  Wed Jul 25 16:23:50 2018 -0700
Revert "Use the new annoStreamDb params rightJoinDtf and rightJoinMainField to restrict ncbiRefSeqPsl rows to only those that appear in the selected genePred table (e.g. ncbiRefSeqCurated)."

This reverts commit dd285f81141e45dabf1caf0f90723810f2c6f8a1.

diff --git src/hg/lib/annoStreamDbPslPlus.c src/hg/lib/annoStreamDbPslPlus.c
index 0516169..9ec4612 100644
--- src/hg/lib/annoStreamDbPslPlus.c
+++ src/hg/lib/annoStreamDbPslPlus.c
@@ -47,32 +47,31 @@
     char *gpTable;                      // Associated genePred (refGene, ncbiRefSeqCurated etc)
     struct annoStreamer *mySource;	// Internal source of PSL+CDS+seq info
     };
 
 // select p.*, c.cds, l.protAcc, l.name, e.path, s.file_offset, s.file_size 
 //   from (((ncbiRefSeqPsl p join ncbiRefSeqCurated n on p.qName = n.name)
 //          left join ncbiRefSeqCds c on p.qName = c.id)
 //         join ncbiRefSeqLink l on p.qName = l.mrnaAcc)
 //        left join (seqNcbiRefSeq s left join extNcbiRefSeq e on s.extFile = e.id) on p.qName = s.acc
 //   where p.tName = "chr1"
 //   order by p.tName, p.tStart
 //  limit 5;
 
 static char *ncbiRefSeqConfigJsonFormat =
     "{ \"naForMissing\": false,"
-    "  \"rightJoinDtf\": \"%s.\%s.name\","
-    "  \"rightJoinMainField\": \"qName\","
+    "  \"rightJoinTable\": \"%s\","
     "  \"relatedTables\": [ { \"table\": \"ncbiRefSeqCds\","
     "                         \"fields\": [\"cds\"] },"
     "                       { \"table\": \"ncbiRefSeqLink\","
     "                         \"fields\": [\"protAcc\", \"name\"] },"
     "                       { \"table\": \"extNcbiRefSeq\","
     "                         \"fields\": [\"path\"] },"
     "                       { \"table\": \"seqNcbiRefSeq\","
     "                         \"fields\": [\"file_offset\", \"file_size\"] } ] }";
 
 //select p.*,c.name,l.protAcc,l.name,e.path,s.file_offset,s.file_size, i.version
 //from refSeqAli p
 //  join (hgFixed.gbCdnaInfo i
 //        left join hgFixed.cds c on i.cds = c.id) on i.acc = p.qName
 //       left join (hgFixed.gbSeq s
 //                  join hgFixed.gbExtFile e on e.id = s.gbExtFile) on s.acc = p.qName
@@ -204,31 +203,31 @@
 struct annoStreamer *annoStreamDbPslPlusNew(struct annoAssembly *aa, char *gpTable, int maxOutRows,
                                             struct jsonElement *extraConfig)
 /* Create an annoStreamer (subclass) object that streams PSL, CDS and seqFile info.
  * gpTable is a genePred table that has associated PSL, CDS and sequence info
  * (i.e. refGene, ncbiRefSeq, ncbiRefSeqCurated or ncbiRefSeqPredicted). */
 {
 char *pslTable = NULL, *configJson = NULL;
 if (sameString("refGene", gpTable))
     {
     pslTable = "refSeqAli";
     configJson = refSeqAliConfigJson;
     }
 else if (startsWith("ncbiRefSeq", gpTable))
     {
     pslTable = "ncbiRefSeqPsl";
-    struct dyString *dy = dyStringCreate(ncbiRefSeqConfigJsonFormat, aa->name, gpTable);
+    struct dyString *dy = dyStringCreate(ncbiRefSeqConfigJsonFormat, gpTable);
     configJson = dyStringCannibalize(&dy);
     }
 else
     errAbort("annoStreamDbPslPlusNew: unrecognized table \"%s\"", gpTable);
 struct annoStreamDbPslPlus *self;
 AllocVar(self);
 // Get internal streamer for joining PSL with other tables.
 struct jsonElement *config = jsonParse(configJson);
 if (extraConfig)
     jsonObjectMerge(config, extraConfig);
 self->mySource = annoStreamDbNew(aa->name, pslTable, aa, maxOutRows, config);
 struct asObject *asObj = annoStreamDbPslPlusAsObj();
 if (extraConfig)
     asObjAppendExtraColumns(asObj, self->mySource->asObj);
 // Set up external streamer interface