Commit Graph

17 Commits (main)

Author SHA1 Message Date
Heng Li 1bdd791539 r837: removed BAM support
This is not necessary.
2014-09-16 09:57:35 -04:00
Nils Homer 482a47a57e adding support for SAM/BAM output using htslib. Please turn on within
the Makefile.
2014-07-28 14:08:06 -04:00
Rob Davies 5c43a1fdc9 Removed more dependencies on utils.h
bamlite.c now includes some wrappers for gzopen/gzread/gzclose that print
messages when errors occur.  They do not attempt to quit the program but
pass on the return code.  bwaseqio.c now checks the return codes from
bam_open, bam_close and bam_read1.

Code in bwt_gen.c now checks for IO errors itself instead of using the
wrappers.  A benefit of this is it can now say which file had a problem.

Removed call to err_fatal_simple in is_bwt and unnecessary inclusion of
malloc_wrap.h in ksw.h.
2013-05-03 11:38:48 +01:00
Rob Davies 96e445d9e4 Reduce dependency on utils.h - new malloc wrapping scheme.
Remove xmalloc, xcalloc, xrealloc and xstrdup from utils.h and revert calls
to the normal malloc, calloc, realloc, strdup.  Add new files malloc_wrap.[ch]
with the wrapper functions.  malloc_wrap.h #defines malloc etc. to the
wrapper, but only if USE_MALLOC_WRAPPERS has been defined.

Put #include "malloc_wrap.h" in any file that uses *alloc or strdup.  This
is also in a #ifdef USE_MALLOC_WRAPPERS ... #endif block to make using the
wrappers optional.  Add -DUSE_MALLOC_WRAPPERS into the makefile so they
should normally get added.

This is an improvement on the previous method as we now don't need to
worry about stray function calls that were not changed to the wrapped version
and the code will still work even if the wrapping is disabled.

Other possible methods of doing this are using malloc_hook (glibc-specific),
adding -include malloc_wrap.h to the gcc command-line (somewhat
gcc-specific) or making our own malloc function and using dlopen (scary).
This way is probably the most portable.
2013-05-02 15:12:01 +01:00
Rob Davies 3d33ab063e Merge branch 'master' into master_fixes
Merged to master version b621d3a

Conflicts:
	Makefile
	bntseq.c
	bwa.c
	bwase.c
	bwaseqio.c
	bwtaln.c
	bwtindex.c
	bwtio.c
	bwtmisc.c
	bwtsw2_aux.c
	cs2nt.c
	fastmap.c
	khash.h
	kseq.h
	ksw.c
	kvec.h
	simple_dp.c
	utils.c
	utils.h
2013-03-01 09:37:46 +00:00
Heng Li 5a0b32bfd2 updated to the latest kseq.h 2013-02-06 14:38:40 -05:00
Rob Davies 55f1b36534 New wrapper for gzclose; added err_fflush calls and made it call fsync too.
Added a new utils.c wrapper err_gzclose and changed gzclose calls to use it.

Put in some more err_fflush calls before files being written are closed.

Made err_fflush call fsync.  This is useful for remote filesystems where
errors may not be reported on fflush or fclose as problems at the server
end may only be detected after they have returned.  If bwa is being used
only to write to local filesystems, calling fsync is not really necessary.
To disable it, comment out #define FSYNC_ON_FLUSH in utils.c.
2013-01-03 16:57:37 +00:00
Rob Davies b081ac9b8b Use wrapper functions to catch system errors
Use the wrapper functions in utils.c plus a few extra bits of error
checking code to catch system errors and exit non-zero when they occur.
2012-12-16 10:34:57 +00:00
Heng Li 717959e819 fixed a minor issue in trimming 2011-11-24 10:39:41 -05:00
Heng Li dec584d50b fixed a long-existing bug in trimming 2011-11-23 23:11:50 -05:00
Roel Kluin db59a605d1 Remove sequences marked to be filtered by Casava-1.8 with bwa aln -Y
In Casava 1.8 the fastq output changed. e.g.

@EAS139:136:FC706VJ:2:5:1000:12850 1:Y:18:ATCACG
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+
BBBBCCCC?<A?BC?7@@???????DBBA@@@@A@@

The part after the space, treated as comment by bwa, contains the fields:
<read number>:<is filtered>:<control number>:<barcode sequence>

With `Y' Casava indicates that a sequence should be filtered. This patch
enables bwa, with an -Y flag, to filter these sequences.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
2011-07-10 17:04:06 +02:00
Roel Kluin 8f115a8e00 Revert "In Casava 1.8 the fastq output changed, the name had a space which bwa"
This reverts commit 36cd4f9882.

The comment shouldn't be included in the sequence name.
2011-07-10 16:40:42 +02:00
RoelKluin 36cd4f9882 In Casava 1.8 the fastq output changed, the name had a space which bwa
wasn't parsing correctly. This patch fixes that and enables bwa to filter
sequences marked by Casava, removing this tag from the output.

Signed-off-by: RoelKluin <roel.kluin@gmail.com>
2011-07-08 16:49:09 +02:00
Heng Li a74523a68d increase maximum barcode length limit to 63bp 2011-06-09 17:17:13 -04:00
Heng Li 51d354cd28 Added barcode support 2011-01-15 15:35:39 -05:00
Heng Li 10721ca602 Added an option to accept Illumina 1.3+ fastq 2011-01-15 14:07:08 -05:00
Heng Li 007c3eb75d Imported from my local bwa repository, the master repository. 2011-01-13 20:52:12 -05:00