53b5272717c4018db1917c5a5f9453d4780804b2 markd Sun Aug 16 22:02:43 2015 -0400 added inline function to get PSL block starts to match ones to get block ends (no redmine) diff --git src/inc/psl.h src/inc/psl.h index c9a9d1d..ef54630 100644 --- src/inc/psl.h +++ src/inc/psl.h @@ -296,30 +296,42 @@ struct psl* pslFromGff3Cigar(char *qName, int qSize, int qStart, int qEnd, char *tName, int tSize, int tStart, int tEnd, char* strand, char *cigar); /* create a PSL from a GFF3-style cigar formatted alignment */ int pslRangeTreeOverlap(struct psl *psl, struct rbTree *rangeTree); /* Return amount that psl overlaps (on target side) with rangeTree. */ float pslIdent(struct psl *psl); /* computer fraction identity */ float pslQueryAligned(struct psl *psl); /* compute fraction of query that was aligned */ +INLINE unsigned pslQStart(struct psl *psl, int blkIdx) +/* return query start for the given block */ +{ +return psl->qStarts[blkIdx]; +} + +INLINE unsigned pslTStart(struct psl *psl, int blkIdx) +/* return target start for the given block */ +{ +return psl->tStarts[blkIdx]; +} + INLINE unsigned pslQEnd(struct psl *psl, int blkIdx) /* return query end for the given block */ { return psl->qStarts[blkIdx] + psl->blockSizes[blkIdx]; } INLINE unsigned pslTEnd(struct psl *psl, int blkIdx) /* return target end for the given block */ { return psl->tStarts[blkIdx] + psl->blockSizes[blkIdx]; } struct psl* pslClone(struct psl *psl); /* clone a psl */