be destroyed in the first place.
*/
int sam_header_parse(bam_header_t *h);
+ int32_t bam_get_tid(const bam_header_t *header, const char *seq_name);
/*!
@abstract Parse @RG lines a update a header struct
bam_index_t *idx;
bam_header_t *header;
bamFile fp;
- int i, no_stats = 0;
+ int i;
if (argc < 2) {
fprintf(stderr, "Usage: samtools idxstats <in.bam>\n");
return 1;
k = kh_get(i, h, BAM_MAX_BIN);
if (k != kh_end(h))
printf("\t%llu\t%llu", (long long)kh_val(h, k).list[1].u, (long long)kh_val(h, k).list[1].v);
- else no_stats = 1;
+ else printf("\t0\t0");
putchar('\n');
}
- printf("*\t0");
- if (!no_stats) printf("\t0\t%llu", (long long)idx->n_no_coor);
- putchar('\n');
+ printf("*\t0\t0\t%llu\n", (long long)idx->n_no_coor);
bam_header_destroy(header);
bam_index_destroy(idx);
return 0;
CC= gcc
CXX= g++
-CFLAGS= -g -Wall -O2 -m64 #-arch ppc
+CFLAGS= -g -Wall #-O2 #-m64 #-arch ppc
CXXFLAGS= $(CFLAGS)
DFLAGS= -D_FILE_OFFSET_BITS=64
OBJS=
-PROG= md5sum-lite md5fa maq2sam-short maq2sam-long wgsim
+PROG= md5sum-lite md5fa maq2sam-short maq2sam-long wgsim afs2
INCLUDES= -I..
SUBDIRS= .
lib:
+afs2:afs2.o
+ $(CC) $(CFLAGS) -o $@ afs2.o -lm -lz -L.. -lbam
+
wgsim:wgsim.o
$(CC) $(CFLAGS) -o $@ wgsim.o -lm
md5fa.o:md5.h md5fa.c
$(CC) $(CFLAGS) -c -I.. -o $@ md5fa.c
+afs2.o:afs2.c ../bam.h
+ $(CC) $(CFLAGS) -c -I.. -o $@ afs2.c
+
cleanlocal:
rm -fr gmon.out *.o a.out *.exe *.dSYM $(PROG) *~ *.a