d86dc87199b35d264f963e032a75bfdf96db8c81 angie Tue Feb 15 10:47:40 2011 -0800 Tweaked comment describing bamFileNameFromTable(). diff --git src/hg/lib/bamFile.c src/hg/lib/bamFile.c index e8fd1f0..b1db8e2 100644 --- src/hg/lib/bamFile.c +++ src/hg/lib/bamFile.c @@ -1,31 +1,31 @@ /* bamFile -- interface to binary alignment format files using Heng Li's samtools lib. */ #include "common.h" #include "hdb.h" #include "bamFile.h" #ifdef USE_BAM #include "htmshell.h" #include "hgConfig.h" #include "udc.h" #include "samAlignment.h" char *bamFileNameFromTable(struct sqlConnection *conn, char *table, char *bamSeqName) /* Return file name from table. If table has a seqName column, then grab the - * row associated with bamSeqName (which is not nec. in chromInfo, e.g. - * bam file might have '1' not 'chr1'). */ + * row associated with bamSeqName (which can be e.g. '1' not 'chr1' if that is the + * case in the bam file). */ { boolean checkSeqName = (sqlFieldIndex(conn, table, "seqName") >= 0); if (checkSeqName && bamSeqName == NULL) errAbort("bamFileNameFromTable: table %s has seqName column, but NULL seqName passed in", table); char query[512]; if (checkSeqName) safef(query, sizeof(query), "select fileName from %s where seqName = '%s'", table, bamSeqName); else safef(query, sizeof(query), "select fileName from %s", table); char *fileName = sqlQuickString(conn, query); if (fileName == NULL && checkSeqName) { if (startsWith("chr", bamSeqName))