bd141271e83f2418e2e76d44fc38e14887da3ee1
chinhli
  Fri Jun 10 08:53:15 2011 -0700
Bug #3301 aligned mRNAs are showing up in 'Unaligned mRNAs' search results
diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c
index 152eea4..abbfecc 100644
--- src/hg/lib/hgFind.c
+++ src/hg/lib/hgFind.c
@@ -1604,31 +1604,31 @@
 
 AllocVar(table);
 
 /* Examine all accessions to see if they fit criteria for
  * this table. Add all matching to the position list, and
  * remove from the accession list */
 for (el = *pAccList; el != NULL; el = el->next)
     {
     freez(&elToFree);
     acc = el->name;
 
     /* check if item matches xeno criterion */
     if (hTableExists(db, "gbStatus"))
 	{
 	safef(query, sizeof(query),
-	      "select (orgCat = 'native') from gbStatus where acc = '%s'", acc);
+          "select (orgCat = 'native' && srcDb != 'RefSeq') from gbStatus where acc = '%s'", acc); /* redmine #3301 */
 	if (isXeno == sqlQuickNum(conn, query))
 	    continue;
 	}
     else
 	{
 	int itemOrganismID = hashIntVal(accOrgHash, acc);
 	if (isXeno == (itemOrganismID == organismID))
 	    continue;
 	}
 
     /* check if item matches alignment criterion */
     if (aligns != (mrnaTableExists && mrnaAligns(conn, mrnaTable, acc)))
 	continue;
 
     /* item fits criteria, so enter in table */