92ece3cd72148ce76aabda9d08dbd9618ff9792d
larrym
  Tue Feb 8 21:42:08 2011 -0800
add utility routines for zoomToCodon and zoomToExon
diff --git src/hg/inc/genePred.h src/hg/inc/genePred.h
index 176b4f3..2066a11 100644
--- src/hg/inc/genePred.h
+++ src/hg/inc/genePred.h
@@ -278,17 +278,26 @@
 /* create a new gene with space for the specified number of exons allocated.
  * genePredGrow maybe used to expand this space if needed. */
 
 void genePredGrow(struct genePred *gp, unsigned *exonSpacePtr);
 /* Increase memory allocated to a psl to hold more exons.  exonSpacePtr
  * should point the the current maximum number of exons and will be
  * updated to with the new amount of space. */
 
 struct rbTree *genePredToRangeTree(struct genePred *gp, boolean cdsOnly);
 /* Convert genePred into a range tree. */
 
 void gpPartOutAsBed(struct genePred *gp, int start, int end, FILE *f, 
 	char *type, int id, int minSize);
 /* Write out part of gp as bed12. */
 
+boolean codonToPos(struct genePred *gp, unsigned num, int *start, int *end);
+// map 1-based codon to genomic coordinates. If the codon crosses an exon junction, we return just the beginning (LHS) of the codon.
+// Returns true if we find the codon in given gene predition; start and end are set to appropriate three base region.
+
+boolean exonToPos(struct genePred *gp, unsigned num, int *start, int *end);
+// map 1-based exon number to genomic coordinates.
+// Returns true if we find the exon in given gene predition; start and end are set to appropriate region.
+
+
 #endif /* GENEPRED_H */