bc3bbb2794e3067f0ff35ac2003fd69362e2ed58
angie
  Thu Mar 8 11:34:17 2018 -0800
Libified genePredToFakePsl's code for extracting PSL and CDS from genePred so I can use it to infer PSL+CDS from genePred tracks like Gencode for HGVS.
refs #21076

diff --git src/hg/inc/genePred.h src/hg/inc/genePred.h
index 6f09c4e..bba40c1 100644
--- src/hg/inc/genePred.h
+++ src/hg/inc/genePred.h
@@ -381,17 +381,24 @@
 
 /* options to genePredTranslate */
 #define GENEPRED_TRANSLATE_SELENO              0x01   /* Assume internal TGA code for selenocysteine and translate to `U' */
 #define GENEPRED_TRANSLATE_INCLUDE_STOP        0x02   /* If the CDS ends with a stop codon, represent it as a `*' */
 #define GENEPRED_TRANSLATE_STAR_INFRAME_STOPS  0x04   /* Use `*' instead of `X' for in-frame stop codons.
                                                        * This will result in selenocysteine's being `*', with only codons
                                                        * containing `N' being translated to `X'.  This doesn't include terminal
                                                        * stop */
 
 void genePredTranslate(struct genePred *gp, struct nibTwoCache* genomeSeqs, unsigned options,
                        char **protRet, char **cdsRet);
 /* Translate a genePred into a protein.  It can also return the CDS part of the
  * mRNA sequence. If the chrom is chrM, the mitochondrial translation tables are
  * used. If protRet or cdsRet is NULL, those sequences are not returned.
  */
-#endif /* GENEPRED_H */
 
+void genePredToCds(struct genePred *gp, struct genbankCds *cds);
+/* Fill in cds with transcript offsets computed from genePred. */
+
+struct psl *genePredToPsl(struct genePred *gp, int chromSize, int qSize);
+/* Convert a genePred to psl, assuming perfect concordance between target & query.
+ * If qSize is 0 then the number of aligned bases will be used as qSize. */
+
+#endif /* GENEPRED_H */