src/hg/hgTracks/cds.h 1.20
1.20 2009/03/19 22:21:05 angie
Refactoring for performance issue raised by David: moved all baseColor work that was done at load-time to draw-time, and removed the freeing-by-default of original genePred and psl structs converted to lf. Now, when there are so many items in the window that limitVisibility kicks it down to dense mode, we don't waste time on baseColor stuff that won't be used. Also some refactoring for tidiness in cds.c: got rid of a couple unused function args.
Index: src/hg/hgTracks/cds.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/cds.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -b -B -U 4 -r1.19 -r1.20
--- src/hg/hgTracks/cds.h 20 Sep 2008 09:35:15 -0000 1.19
+++ src/hg/hgTracks/cds.h 19 Mar 2009 22:21:05 -0000 1.20
@@ -91,22 +91,21 @@
/* Determine what base/codon coloring option (if any) has been selected
* in trackDb/cart, and gate with zoom level. */
-struct simpleFeature *baseColorCodonsFromGenePred(char *chrom,
- struct linkedFeatures *lf, struct genePred *gp, unsigned *gaps,
- boolean useExonFrames, boolean colorStopStart);
+struct simpleFeature *baseColorCodonsFromGenePred(struct linkedFeatures *lf,
+ struct genePred *gp, boolean useExonFrames, boolean colorStopStart);
/* Given an lf and the genePred from which the lf was constructed,
* return a list of simpleFeature elements, one per codon (or partial
* codon if the codon falls on a gap boundary. If useExonFrames is true,
* use the frames portion of gp (which should be from a genePredExt);
* otherwise determine frame from genomic sequence. */
-void baseColorCodonsFromPsl(char *chromName, struct linkedFeatures *lf,
+struct simpleFeature *baseColorCodonsFromPsl(struct linkedFeatures *lf,
struct psl *psl, int sizeMul, boolean isXeno, int maxShade,
enum baseColorDrawOpt drawOpt, struct track *tg);
/* Given an lf and the psl from which the lf was constructed,
- * set lf->codons to a list of simpleFeature elements, one per codon (or partial
+ * return a list of simpleFeature elements, one per codon (or partial
* codon if the codon falls on a gap boundary. sizeMul, isXeno and maxShade
* are for defaulting to one-simpleFeature-per-exon if cds is not found. */