e70152e44cc66cc599ff6b699eb8adc07f3e656a
kent
  Sat May 24 21:09:34 2014 -0700
Adding Copyright NNNN Regents of the University of California to all files I believe with reasonable certainty were developed under UCSC employ or as part of Genome Browser copyright assignment.
diff --git src/hg/hgTracks/switchGear.c src/hg/hgTracks/switchGear.c
index 2c620b3..c091f9f 100644
--- src/hg/hgTracks/switchGear.c
+++ src/hg/hgTracks/switchGear.c
@@ -1,76 +1,79 @@
 /* Module for SwitchGear Genomics tracks. */
 
+/* Copyright (C) 2010 The Regents of the University of California 
+ * See README in this or parent directory for licensing information. */
+
 #include "common.h"
 #include "hgTracks.h"
 #include "switchGear.h"
 
 struct slList *switchDbTssLoadConduit(char **row)
 {
 return (struct slList *)switchDbTssLoad(row);
 }
 
 boolean switchDbTssFilterPseudo(struct slList *slItem)
 /* "Include pseudogenes" checkbox filter. */
 {
 struct switchDbTss *item = (struct switchDbTss *)slItem;
 boolean includePseudo = cartUsualBoolean(cart, "switchDbTss.pseudo", FALSE);
 if (item == NULL)
     return FALSE;
 if (!includePseudo && (item->isPseudo == 1))
     return FALSE;
 return TRUE;
 }
 
 struct linkedFeatures *lfFromSwitchDbTss(struct slList *item)
 /* Translate a switchDbTss thing into a linkedFeatures. */
 {
 struct switchDbTss *tss = (struct switchDbTss *)item;
 struct linkedFeatures *lf;
 struct simpleFeature *sf;
 AllocVar(lf);
 lf->start = tss->chromStart;
 lf->end = tss->chromEnd;
 lf->tallStart = tss->chromStart;
 lf->tallEnd = tss->chromEnd;
 lf->filterColor = -1;
 lf->orientation = orientFromChar(tss->strand[0]);
 lf->grayIx = grayInRange((int)tss->confScore, 0, 100);
 lf->name = cloneString(tss->name);
 AllocVar(sf);
 sf->start = tss->chromStart;
 sf->end = tss->chromEnd;
 sf->grayIx = lf->grayIx;
 lf->components = sf;
 lf->codons = CloneVar(sf);
 return lf;
 }
 
 void loadItemsSwitchDbTss(struct track *tg)
 /* Load switchDbTss items into a linkedFeatures list. */
 {
 char optionScoreStr[128]; /* Option -  score filter */
 safef(optionScoreStr, sizeof(optionScoreStr), "%s.scoreFilter",
       tg->tdb->track);
 if (!cartVarExists(cart, optionScoreStr))
     cartSetInt(cart, optionScoreStr, SWITCHDBTSS_FILTER); 
 loadLinkedFeaturesWithLoaders(tg, switchDbTssLoadConduit, lfFromSwitchDbTss, 
 			      "confScore", NULL, switchDbTssFilterPseudo);
 }
 
 Color switchDbTssItemColor(struct track *tg, void *item, struct hvGfx *hvg)
 /* Return color to switchDbTss item */
 {
 struct linkedFeatures *thisItem = item;
 int grayIx = thisItem->grayIx;
 if (grayIx == 1)
     grayIx++;
 return shadesOfBrown[grayIx];
 }
 
 void switchDbTssMethods(struct track *tg)
 /* Methods for switchDbTss track uses mostly linkedFeatures stuff. */
 {
 linkedFeaturesMethods(tg);
 tg->loadItems = loadItemsSwitchDbTss;
 tg->itemColor = switchDbTssItemColor;
 }