]> git.donarmstrong.com Git - samtools.git/commitdiff
* samtools-0.1.2-17
authorHeng Li <lh3@live.co.uk>
Tue, 24 Mar 2009 10:36:38 +0000 (10:36 +0000)
committerHeng Li <lh3@live.co.uk>
Tue, 24 Mar 2009 10:36:38 +0000 (10:36 +0000)
 * incorporating Nils' changes
 * rename Makefile to Makefile.std and prepare to add the GNU building systerms (also by Nils)

Makefile [deleted file]
Makefile.std [new file with mode: 0644]
bam_sort.c
bam_tview.c
bamtk.c
misc/Makefile [deleted file]
misc/Makefile.std [new file with mode: 0644]
samtools.1

diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index d4a4101..0000000
--- a/Makefile
+++ /dev/null
@@ -1,64 +0,0 @@
-CC=                    gcc
-CXX=           g++
-CFLAGS=                -g -Wall -O2 -m64 #-arch ppc
-CXXFLAGS=      $(CFLAGS)
-DFLAGS=                -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 #-D_NO_RAZF #-D_NO_CURSES
-OBJS=          bam.o bam_import.o bam_pileup.o bam_lpileup.o bam_sort.o bam_index.o \
-                       razf.o bgzf.o faidx.o bam_tview.o bam_maqcns.o bam_aux.o bam_plcmd.o \
-                       bam_mate.o bam_rmdup.o glf.o bam_stat.o kstring.o
-PROG=          razip bgzip samtools
-INCLUDES=      
-LIBS=          -lm -lz
-SUBDIRS=       . misc
-
-.SUFFIXES:.c .o
-
-.c.o:
-               $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
-
-all-recur lib-recur clean-recur cleanlocal-recur install-recur:
-               @target=`echo $@ | sed s/-recur//`; \
-               wdir=`pwd`; \
-               list='$(SUBDIRS)'; for subdir in $$list; do \
-                       cd $$subdir; \
-                       $(MAKE) CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
-                               INCLUDES="$(INCLUDES)" LIBS="$(LIBS)" $$target || exit 1; \
-                       cd $$wdir; \
-               done;
-
-all:$(PROG)
-
-lib:libbam.a
-
-libbam.a:$(OBJS)
-               $(AR) -cru $@ $(OBJS)
-
-samtools:lib bamtk.o
-               $(CC) $(CFLAGS) -o $@ bamtk.o $(LIBS) -L. -lbam -lcurses
-
-razip:razip.o razf.o
-               $(CC) $(CFLAGS) -o $@ razf.o razip.o $(LIBS)
-
-bgzip:bgzip.o bgzf.o
-               $(CC) $(CFLAGS) -o $@ bgzf.o bgzip.o $(LIBS)
-
-razip.o:razf.h
-bam.o:bam.h razf.h bam_endian.h
-bam_import.o:bam.h kseq.h khash.h razf.h
-bam_pileup.o:bam.h razf.h ksort.h
-bam_plcmd.o:bam.h faidx.h bam_maqcns.h glf.h
-bam_index.o:bam.h khash.h ksort.h razf.h bam_endian.h
-bam_lpileup.o:bam.h ksort.h
-bam_tview.o:bam.h faidx.h bam_maqcns.h
-bam_maqcns.o:bam.h ksort.h bam_maqcns.h
-bam_sort.o:bam.h ksort.h razf.h
-razf.o:razf.h
-glf.o:glf.h
-
-faidx.o:faidx.h razf.h khash.h
-faidx_main.o:faidx.h razf.h
-
-cleanlocal:
-               rm -fr gmon.out *.o a.out *.dSYM $(PROG) *~ *.a
-
-clean:cleanlocal-recur
diff --git a/Makefile.std b/Makefile.std
new file mode 100644 (file)
index 0000000..d4a4101
--- /dev/null
@@ -0,0 +1,64 @@
+CC=                    gcc
+CXX=           g++
+CFLAGS=                -g -Wall -O2 -m64 #-arch ppc
+CXXFLAGS=      $(CFLAGS)
+DFLAGS=                -D_IOLIB=2 -D_FILE_OFFSET_BITS=64 #-D_NO_RAZF #-D_NO_CURSES
+OBJS=          bam.o bam_import.o bam_pileup.o bam_lpileup.o bam_sort.o bam_index.o \
+                       razf.o bgzf.o faidx.o bam_tview.o bam_maqcns.o bam_aux.o bam_plcmd.o \
+                       bam_mate.o bam_rmdup.o glf.o bam_stat.o kstring.o
+PROG=          razip bgzip samtools
+INCLUDES=      
+LIBS=          -lm -lz
+SUBDIRS=       . misc
+
+.SUFFIXES:.c .o
+
+.c.o:
+               $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
+
+all-recur lib-recur clean-recur cleanlocal-recur install-recur:
+               @target=`echo $@ | sed s/-recur//`; \
+               wdir=`pwd`; \
+               list='$(SUBDIRS)'; for subdir in $$list; do \
+                       cd $$subdir; \
+                       $(MAKE) CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
+                               INCLUDES="$(INCLUDES)" LIBS="$(LIBS)" $$target || exit 1; \
+                       cd $$wdir; \
+               done;
+
+all:$(PROG)
+
+lib:libbam.a
+
+libbam.a:$(OBJS)
+               $(AR) -cru $@ $(OBJS)
+
+samtools:lib bamtk.o
+               $(CC) $(CFLAGS) -o $@ bamtk.o $(LIBS) -L. -lbam -lcurses
+
+razip:razip.o razf.o
+               $(CC) $(CFLAGS) -o $@ razf.o razip.o $(LIBS)
+
+bgzip:bgzip.o bgzf.o
+               $(CC) $(CFLAGS) -o $@ bgzf.o bgzip.o $(LIBS)
+
+razip.o:razf.h
+bam.o:bam.h razf.h bam_endian.h
+bam_import.o:bam.h kseq.h khash.h razf.h
+bam_pileup.o:bam.h razf.h ksort.h
+bam_plcmd.o:bam.h faidx.h bam_maqcns.h glf.h
+bam_index.o:bam.h khash.h ksort.h razf.h bam_endian.h
+bam_lpileup.o:bam.h ksort.h
+bam_tview.o:bam.h faidx.h bam_maqcns.h
+bam_maqcns.o:bam.h ksort.h bam_maqcns.h
+bam_sort.o:bam.h ksort.h razf.h
+razf.o:razf.h
+glf.o:glf.h
+
+faidx.o:faidx.h razf.h khash.h
+faidx_main.o:faidx.h razf.h
+
+cleanlocal:
+               rm -fr gmon.out *.o a.out *.dSYM $(PROG) *~ *.a
+
+clean:cleanlocal-recur
index f089cdff396695c0cf43d21d09be695463e187c9..dbe7495a0f1a5e6646911ff8230c110e78d91b53 100644 (file)
@@ -221,7 +221,7 @@ int bam_sort(int argc, char *argv[])
                }
        }
        if (optind + 2 > argc) {
-               fprintf(stderr, "Usage: samtools sort [-n] [-m <maxMem>] <in.baf> <out.prefix>\n");
+               fprintf(stderr, "Usage: samtools sort [-n] [-m <maxMem>] <in.bam> <out.prefix>\n");
                return 1;
        }
        bam_sort_core(is_by_qname, argv[optind], argv[optind+1], max_mem);
index e71a3860eda0088d9ae3bdde9d073c8e71c80063..77d60a0a9cc18386121c2d2b74fc61b5b4a8fe72 100644 (file)
@@ -257,6 +257,7 @@ void tv_loop(tview_t *tv)
        tid = tv->curr_tid; pos = tv->left_pos;
        while (1) {
                int c = getch();
+               if(256 < c) {c = 1 + (c%256);} // Terminal was displaying ctrl-H as 263 via ssh from Mac OS X 10.5 computer 
                switch (c) {
                case '?': tv_win_help(tv); break;
                case '\033':
diff --git a/bamtk.c b/bamtk.c
index be37b63a5037bb92ef2de88ad865b301bff98d6f..6f0ff999d7124c9e0ed6ad656e16dd418a3ffdc7 100644 (file)
--- a/bamtk.c
+++ b/bamtk.c
@@ -3,7 +3,7 @@
 #include "bam.h"
 
 #ifndef PACKAGE_VERSION
-#define PACKAGE_VERSION "0.1.2-16"
+#define PACKAGE_VERSION "0.1.2-17"
 #endif
 
 int bam_taf2baf(int argc, char *argv[]);
diff --git a/misc/Makefile b/misc/Makefile
deleted file mode 100644 (file)
index 0f65881..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-CC=                    gcc
-CXX=           g++
-CFLAGS=                -g -Wall -O2 -m64 #-arch ppc
-CXXFLAGS=      $(CFLAGS)
-DFLAGS=                #-D_FILE_OFFSET_BITS=64
-OBJS=          
-PROG=          faidx md5sum-lite md5fa maq2sam-short maq2sam-long wgsim
-INCLUDES=      -I..
-LIBS=          -lm -lz
-SUBDIRS=       .
-
-.SUFFIXES:.c .o
-
-.c.o:
-               $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
-
-all:$(PROG)
-
-lib-recur all-recur clean-recur cleanlocal-recur install-recur:
-               @target=`echo $@ | sed s/-recur//`; \
-               wdir=`pwd`; \
-               list='$(SUBDIRS)'; for subdir in $$list; do \
-                       cd $$subdir; \
-                       $(MAKE) CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
-                               INCLUDES="$(INCLUDES)" $$target || exit 1; \
-                       cd $$wdir; \
-               done;
-
-lib:
-
-wgsim:wgsim.o
-               $(CC) $(CFLAGS) -o $@ wgsim.o -lm
-
-faidx:../faidx.c ../faidx.h
-               $(CC) $(CFLAGS) -D_NO_RAZF -DFAIDX_MAIN -o $@ ../faidx.c
-
-md5fa:md5.o md5fa.o md5.h ../kseq.h
-               $(CC) $(CFLAGS) -o $@ md5.o md5fa.o -lz
-
-md5sum-lite:md5sum-lite.o
-               $(CC) $(CFLAGS) -o $@ md5sum-lite.o
-
-md5sum-lite.o:md5.c md5.h
-               $(CC) -c $(CFLAGS) -DMD5SUM_MAIN -o $@ md5.c
-
-maq2sam-short:maq2sam.c
-               $(CC) $(CFLAGS) -o $@ maq2sam.c -lz
-
-maq2sam-long:maq2sam.c
-               $(CC) $(CFLAGS) -DMAQ_LONGREADS -o $@ maq2sam.c -lz
-
-md5fa.o:md5.h md5fa.c
-               $(CC) $(CFLAGS) -c -I.. -o $@ md5fa.c
-
-cleanlocal:
-               rm -fr gmon.out *.o a.out *.dSYM $(PROG) *~ *.a
-
-clean:cleanlocal-recur
diff --git a/misc/Makefile.std b/misc/Makefile.std
new file mode 100644 (file)
index 0000000..0f65881
--- /dev/null
@@ -0,0 +1,58 @@
+CC=                    gcc
+CXX=           g++
+CFLAGS=                -g -Wall -O2 -m64 #-arch ppc
+CXXFLAGS=      $(CFLAGS)
+DFLAGS=                #-D_FILE_OFFSET_BITS=64
+OBJS=          
+PROG=          faidx md5sum-lite md5fa maq2sam-short maq2sam-long wgsim
+INCLUDES=      -I..
+LIBS=          -lm -lz
+SUBDIRS=       .
+
+.SUFFIXES:.c .o
+
+.c.o:
+               $(CC) -c $(CFLAGS) $(DFLAGS) $(INCLUDES) $< -o $@
+
+all:$(PROG)
+
+lib-recur all-recur clean-recur cleanlocal-recur install-recur:
+               @target=`echo $@ | sed s/-recur//`; \
+               wdir=`pwd`; \
+               list='$(SUBDIRS)'; for subdir in $$list; do \
+                       cd $$subdir; \
+                       $(MAKE) CC="$(CC)" CXX="$(CXX)" DFLAGS="$(DFLAGS)" CFLAGS="$(CFLAGS)" \
+                               INCLUDES="$(INCLUDES)" $$target || exit 1; \
+                       cd $$wdir; \
+               done;
+
+lib:
+
+wgsim:wgsim.o
+               $(CC) $(CFLAGS) -o $@ wgsim.o -lm
+
+faidx:../faidx.c ../faidx.h
+               $(CC) $(CFLAGS) -D_NO_RAZF -DFAIDX_MAIN -o $@ ../faidx.c
+
+md5fa:md5.o md5fa.o md5.h ../kseq.h
+               $(CC) $(CFLAGS) -o $@ md5.o md5fa.o -lz
+
+md5sum-lite:md5sum-lite.o
+               $(CC) $(CFLAGS) -o $@ md5sum-lite.o
+
+md5sum-lite.o:md5.c md5.h
+               $(CC) -c $(CFLAGS) -DMD5SUM_MAIN -o $@ md5.c
+
+maq2sam-short:maq2sam.c
+               $(CC) $(CFLAGS) -o $@ maq2sam.c -lz
+
+maq2sam-long:maq2sam.c
+               $(CC) $(CFLAGS) -DMAQ_LONGREADS -o $@ maq2sam.c -lz
+
+md5fa.o:md5.h md5fa.c
+               $(CC) $(CFLAGS) -c -I.. -o $@ md5fa.c
+
+cleanlocal:
+               rm -fr gmon.out *.o a.out *.dSYM $(PROG) *~ *.a
+
+clean:cleanlocal-recur
index 1bf96e61358baa75e54abe03a04f20c1d3ade42f..6b1879aefcb6166ef22a2206122d10d1ece0f7a0 100644 (file)
@@ -96,7 +96,7 @@ will be created.
 
 .TP
 .B view
-samtools view [-b] <in.bam> [region1 [...]]
+samtools view [-bhH] <in.bam> [region1 [...]]
 
 Extract/print all or sub alignments in SAM or BAM format. If no region
 is specified, all the alignments will be printed; otherwise only
@@ -110,6 +110,12 @@ format: `chr2', `chr2:1000000' or `chr2:1,000,000-2,000,000'.
 .TP 8
 .B -b
 Output in the BAM format.
+.TP
+.B -h
+Include the header in the output.
+.TP
+.B -H
+Output the header only.
 .RE
 
 .TP
@@ -203,7 +209,7 @@ as in the default format we may not know the mapping quality.
 
 .TP
 .B -c
-Call the consensus sequnce using MAQ consensus model. Options
+Call the consensus sequence using MAQ consensus model. Options
 .B -T,
 .B -N
 and