29356d0b9520b11bb46d22f5c70b8b1a275b5116 kent Tue Dec 27 12:06:35 2016 -0800 Removing bamChromInfo structure and the routines to free it. The routine that made it got deleted a while back for some reason, so I'm just tidying up. diff --git src/inc/bamFile.h src/inc/bamFile.h index 91883ba..d11dc14 100644 --- src/inc/bamFile.h +++ src/inc/bamFile.h @@ -16,37 +16,30 @@ typedef hts_idx_t bam_index_t; typedef bam_hdr_t bam_header_t; typedef int (*bam_fetch_f)(const bam1_t *bam, void *data, bam_hdr_t *header) ; #define samopen(a,b,c) sam_open(a,b) #define samclose(a) sam_close(a) #define bam1_qname bam_get_qname #define bam1_qual bam_get_qual #define bam1_aux bam_get_aux #define bam1_cigar bam_get_cigar #define bam1_seq bam_get_seq #define bam1_seqi bam_seqi #define bam_nt16_rev_table seq_nt16_str #define data_len l_data -struct bamChromInfo - { - struct bamChromInfo *next; - char *name; /* Chromosome name */ - bits32 size; /* Chromosome size in bases */ - }; - boolean bamFileExists(char *bamFileName); /* Return TRUE if we can successfully open the bam file and its index file. */ void bamFileAndIndexMustExist(char *fileOrUrl, char *baiFileOrUrl); /* Open both a bam file and its accompanying index or errAbort; this is what it * takes for diagnostic info to propagate up through errCatches in calling code. * The parameter baiFileOrUrl can be NULL, defaults of .bai. */ samfile_t *bamOpen(char *fileOrUrl, char **retBamFileName); /* Return an open bam file as well as the filename of the bam. */ samfile_t *bamMustOpenLocal(char *fileName, char *mode, void *extraHeader); /* Open up sam or bam file or die trying. The mode parameter is * "r" - open SAM to read * "rb" - open BAM to read @@ -155,33 +148,26 @@ bam1_t *bamClone(const bam1_t *bam); /* Return a newly allocated copy of bam. */ void bamShowTags(const bam1_t *bam); /* Print out tags in HTML: bold key, no type indicator for brevity. */ char *bamGetTagString(const bam1_t *bam, char *tag, char *buf, size_t bufSize); /* If bam's tags include the given 2-character tag, place the value into * buf (zero-terminated, trunc'd if nec) and return a pointer to buf, * or NULL if tag is not present. */ void bamUnpackAux(const bam1_t *bam, struct dyString *dy); /* Unpack the tag:type:val part of bam into dy */ -struct bamChromInfo *bamChromList(samfile_t *fh); -/* Return list of chromosomes from bam header. We make no attempty to normalize chromosome names to UCSC format, - so list may contain things like "1" for "chr1", "I" for "chrI", "MT" for "chrM" etc. */ - -void bamChromInfoFreeList(struct bamChromInfo **pList); -/* Free a list of dynamically allocated bamChromInfo's */ - void samToBed(char *samIn, char *bedOut); /* samToBed - Convert SAM file to a pretty simple minded bed file.. */ void samToOpenBed(char *samIn, FILE *f); /* Like samToOpenBed, but the output is the already open file f. */ struct psl *bamToPslUnscored(const bam1_t *bam, const bam_hdr_t *hdr); /* Translate BAM's numeric CIGAR encoding into PSL sufficient for cds.c (just coords, * no scoring info) */ #endif//ndef BAMFILE_H