05c89b00677e24821ea01e20b95f2c1b0263b1f4
aamp
  Sat Jul 16 08:48:52 2011 -0700
removed open, fetch, exists functions to make way for removing udcFUSE stuff
diff --git src/hg/lib/hgBam.c src/hg/lib/hgBam.c
index 585326a..c71e53d 100644
--- src/hg/lib/hgBam.c
+++ src/hg/lib/hgBam.c
@@ -34,56 +34,30 @@
     else
 	safef(query, sizeof(query), "select fileName from %s where seqName = 'chr%s'",
 	      table, bamSeqName);
     fileName = sqlQuickString(conn, query);
     }
 if (fileName == NULL)
     {
     if (checkSeqName)
 	errAbort("Missing fileName for seqName '%s' in %s table", bamSeqName, table);
     else
 	errAbort("Missing fileName in %s table", table);
     }
 return fileName;
 }
 
-boolean bamFileExists(char *fileOrUrl)
-/* Return TRUE if we can successfully open the bam file and its index file. */
-{
-char *udcFuseRoot = cfgOption("udcFuse.mountPoint");
-return bamFileExistsUdc(fileOrUrl, udcFuseRoot);
-}
-samfile_t *bamOpen(char *fileOrUrl, char **retBamFileName)
-/* Return an open bam file, dealing with FUSE caching if need be. 
- * Return parameter if NON-null will return the file name after FUSing */
-{
-char *udcFuseRoot = cfgOption("udcFuse.mountPoint");
-return bamOpenUdc(fileOrUrl, retBamFileName, udcFuseRoot);
-}
-
-void bamFetch(char *fileOrUrl, char *position, bam_fetch_f callbackFunc, void *callbackData,
-		     samfile_t **pSamFile)
-/* Open the .bam file, fetch items in the seq:start-end position range,
- * and call callbackFunc on each bam item retrieved from the file plus callbackData.
- * This handles BAM files with "chr"-less sequence names, e.g. from Ensembl. 
- * The pSamFile parameter is optional.  If non-NULL it will be filled in, just for
- * the benefit of the callback function, with the open samFile.  */
-{
-char *udcFuseRoot = cfgOption("udcFuse.mountPoint");
-bamFetchUdc(fileOrUrl, position, callbackFunc, callbackData, pSamFile, udcFuseRoot);
-}
-
 struct ffAli *bamToFfAli(const bam1_t *bam, struct dnaSeq *target, int targetOffset,
 			 boolean useStrand, char **retQSeq)
 /* Convert from bam to ffAli format.  If retQSeq is non-null, set it to the 
  * query sequence into which ffAli needle pointers point. (Adapted from psl.c's pslToFfAli.) */
 {
 struct ffAli *ffList = NULL, *ff;
 const bam1_core_t *core = &bam->core;
 boolean isRc = useStrand && bamIsRc(bam);
 DNA *needle = (DNA *)bamGetQuerySequence(bam, useStrand);
 if (retQSeq)
     *retQSeq = needle;
 if (isRc)
     reverseComplement(target->dna, target->size);
 DNA *haystack = target->dna;
 unsigned int *cigarPacked = bam1_cigar(bam);
@@ -253,44 +227,30 @@
 return helper.samList;
 }
 
 #else
 // If we're not compiling with samtools, make stub routines so compile won't fail:
 
 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'). */
 {
 errAbort(COMPILE_WITH_SAMTOOLS, "bamFileNameFromTable");
 return NULL;
 }
 
-boolean bamFileExists(char *fileOrUrl)
-/* Return TRUE if we can successfully open the bam file and its index file. */
-{
-errAbort(COMPILE_WITH_SAMTOOLS, "bamFileExists");
-return FALSE;
-}
-
-samfile_t *bamOpen(char *fileOrUrl, char **retBamFileName)
-/* Return an open bam file, dealing with some FUSE caching if need be. */
-{
-errAbort(COMPILE_WITH_SAMTOOLS, "bamOpen");
-return FALSE;
-}
-
 struct samAlignment *bamFetchSamAlignment(char *fileOrUrl, char *chrom, int start, int end,
 	struct lm *lm)
 /* Fetch region as a list of samAlignments - which is more or less an unpacked
  * bam record.  Results is allocated out of lm, since it tends to be large... */
 {
 errAbort(COMPILE_WITH_SAMTOOLS, "bamFetchSamAlignment");
 return NULL;
 }
 
 struct samAlignment *bamReadNextSamAlignments(samfile_t *fh, int count, struct lm *lm)
 /* Read next count alignments in SAM format, allocated in lm.  May return less than
  * count at end of file. */
 {
 errAbort(COMPILE_WITH_SAMTOOLS, "bamReadNextSamAlignments");
 return NULL;