Commit Graph

25 Commits (96e445d9e43e7d4a4cb32a1681098a6e7a170561)

Author SHA1 Message Date
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 0aa7e0a402 Ensure exit status of 1 if given invalid options or index files are not found.
Added missing default cases in option scanning.
Ensure exit value is 1 if bwa_idx_load or bwa_idx_infer_prefix fail.
These changes extend the previous one, which only fixed the mem aligner.
2013-04-29 13:58:28 +01:00
Rob Davies aabd990e8f Merge branch 'master' into master_fixes
Conflicts:
	Makefile
	bwape.c
	bwase.c
	bwtsw2_aux.c
	stdaln.c
2013-03-08 16:46:45 +00:00
Heng Li 98f8966750 r329: ditch stdaln.{c,h}; no changes to bwa-mem
stdaln.{c,h} was written ten years ago. Its local and SW extension code are
actually buggy (though that rarely happens and usually does not affect the
results too much). ksw.{c,h} is more concise, potentially faster, less buggy,
and richer in features.
2013-03-05 12:00:24 -05: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 cfa7165036 cleanup index loading code 2013-02-23 16:10:48 -05:00
Heng Li 6ad5a3c086 removed color-space support
which has been broken since 0.6.x
2013-02-12 10:21:17 -05: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 a1abfe9977 API: aln seems working 2012-04-07 00:23:01 -04:00
Heng Li d33abf127f check *.64.bwt first and then *.bwt 2012-03-29 14:45:00 -04:00
Heng Li bdc953cad9 Tim's suggestion suffix file name with .64 2012-03-29 12:22:51 -04:00
Heng Li dec584d50b fixed a long-existing bug in trimming 2011-11-23 23:11:50 -05:00
Heng Li 2f3cdcd55b bugfix: bwa-short MT does not work (by Peter) 2011-11-12 16:54:38 -05:00
Heng Li 098f44cd51 nothing 2011-10-20 16:26:14 -04:00
Heng Li 156852b1dd no change 2011-10-20 16:15:16 -04:00
Heng Li 2d2db5d50f aln seems working 2011-10-20 16:13:35 -04: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 243e735431 applied patches from Alec Wysoker 2011-05-04 09:46:50 -04:00
Heng Li 8d6b859bf8 speed up multi-threading 2011-04-07 17:26:08 -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 5e30884730 Update to the latest modfication 0.5.9rc1-2. Update ChangeLog 2011-01-13 20:54:10 -05:00
Heng Li 007c3eb75d Imported from my local bwa repository, the master repository. 2011-01-13 20:52:12 -05:00