src/hg/hgc/bamClick.c 1.4
1.4 2009/08/21 18:43:50 angie
Use the new ffShowSideBySide to display just the side-by-side read alignments, instead of ffShAliPart which expects to fill a page.
Index: src/hg/hgc/bamClick.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgc/bamClick.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -b -B -U 4 -r1.3 -r1.4
--- src/hg/hgc/bamClick.c 21 Aug 2009 05:27:29 -0000 1.3
+++ src/hg/hgc/bamClick.c 21 Aug 2009 18:43:50 -0000 1.4
@@ -23,24 +23,24 @@
/* Print out the properties of this alignment. */
{
const bam1_core_t *core = &bam->core;
char *itemName = bam1_qname(bam);
-int length = bamGetTargetLength(bam);
-int tStart = core->pos, tEnd = tStart+length;
+int tLength = bamGetTargetLength(bam);
+int tStart = core->pos, tEnd = tStart+tLength;
boolean isRc = ((core->flag & BAM_FREVERSE) != 0);
printPosOnChrom(seqName, tStart, tEnd, (isRc ? "-" : "+"), FALSE, itemName);
printf("<B>Flags: </B><tt>0x%02x</tt><BR>\n", core->flag);
printf("<B>Alignment Quality: </B>%d<BR>\n", core->qual);
printf("<B>CIGAR string: </B><tt>%s</tt><BR>\n", bamGetCigar(bam));
-puts("<BR>");
char nibName[HDB_MAX_PATH_STRING];
hNibForChrom(database, seqName, nibName);
struct dnaSeq *genoSeq = hFetchSeq(nibName, seqName, tStart, tEnd);
struct ffAli *ffa = bamToFfAli(bam, genoSeq, tStart);
char *qSeq = ffa->nStart;
-ffShAliPart(stdout, ffa,
- itemName, qSeq, strlen(qSeq), 0, genoSeq->name, genoSeq->dna, genoSeq->size, tStart,
- 8, FALSE, isRc, FALSE, TRUE, TRUE, TRUE, TRUE, 0, 0, tStart, tEnd);
+printf("<BR><B>Alignment of %s to %s:%d-%d%s:</B><BR>\n", itemName,
+ seqName, tStart+1, tEnd, (isRc ? " (reverse complemented)" : ""));
+ffShowSideBySide(stdout, ffa, qSeq, 0, genoSeq->dna, tStart, tLength, 0, tLength, 8, isRc,
+ FALSE);
//TODO: show flags properly, show tags, maybe display quality scores
}
static int oneBam(const bam1_t *bam, void *data)