Commit Graph

50 Commits (main)

Author SHA1 Message Date
zzh 7d085962a2 开始改成sbwa那种batch模式 2024-03-07 18:23:21 +08: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 90ecd344ba Merge branch 'master' into master_fixes. Merged up to master r375.
Conflicts:
	bwt.c
2013-04-11 11:15:39 +01:00
Heng Li 47520134e7 r375: fixed compiling errors by the last change 2013-04-10 11:04:32 -04:00
Rob Davies 9228e48efd Merge branch 'master' into master_fixes
Conflicts:
	Makefile
2013-03-11 13:50:49 +00:00
Heng Li 017be45407 r342: bugfix in bwasw - AS is off by one
but I do not understand why the old code does not have the same problem.
2013-03-08 12:06:45 -05: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 e6c262594f bwa-sw: ditch stdaln 2013-03-05 10:12:38 -05:00
Heng Li 086c9d0e7d bwa-sw: use bwa_gen_cigar() for cigar generation 2013-03-05 09:54:49 -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 e613195e17 moved some common code to bwa.{c,h} 2013-02-23 15:30:46 -05:00
Heng Li 904c3205c0 removed a few unused variables
These variables have been assigned but never actually used. Reported by
gcc-4.7. Lower version cannot give such warnings.
2013-02-23 13:26:50 -05:00
Heng Li 95d18449b3 merge bseq.{h,c} to utils.{h,c}
I do not like many small files.
2013-02-12 10:36:15 -05:00
Heng Li a09db69037 In bwtsw, replace the batch seq-reader with bseq 2013-02-06 17:12:27 -05: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 292f9061ab r132: optionally copy FASTA/Q comment to SAM 2012-10-26 12:54:32 -04:00
Heng Li f44edd4fc9 r128: more conservative chaining filter 2012-06-28 14:51:02 -04:00
Heng Li 0ae318be0d resolve duphits after right extension as well 2012-06-28 13:32:58 -04:00
Heng Li cd818687ac r115: added -I and -S to bwasw 2012-04-17 20:43:43 -04:00
Heng Li cff473393c commented out debugging code 2012-04-02 12:05:15 -04:00
Heng Li 790df95e1a updated revision number 2012-04-02 11:43:32 -04:00
Heng Li 36f2fd6238 bugfix: incorrect bandwidth 2012-04-02 11:39:40 -04:00
Heng Li d3169804f6 debugging; bug persistant 2012-04-02 10:45:42 -04:00
Heng Li 173b93dfd4 debugging code: bwasw has a rare bug 2012-04-02 09:37:02 -04:00
Heng Li b5170e0efa output the NM tag 2011-11-24 11:51:38 -05:00
Heng Li 196b50dde3 optionally mark multi-part hits as secondary 2011-11-23 23:39:59 -05:00
Heng Li b17b6577ac removed a useless bwa-sw CMD option 2011-11-23 23:30:14 -05:00
Heng Li 107a9870ef incorrect mate pos in BWA-SW SE mode 2011-11-23 23:18:51 -05:00
Heng Li 8f89f55484 fixed a segfault when there are too few good bases. 2011-11-17 22:13:38 -05:00
Heng Li 8060693411 multithreading works again 2011-11-12 16:50:58 -05:00
Heng Li fa8cfe5567 bugfix: wrong mapping quality 2011-11-12 12:12:45 -05:00
Heng Li b42910ada6 proper mate information 2011-11-12 00:49:21 -05:00
Heng Li e06685db45 bwa-sw PE seems working (SAM is incorrect) 2011-11-07 00:51:43 -05:00
Heng Li c8c79ef024 mate rescue seems working (not MT) 2011-11-06 16:20:40 -05:00
Heng Li 17eaac5a21 compute insert size distribution 2011-11-05 23:17:52 -04:00
Heng Li a29b179045 further preparation for pairing 2011-11-05 14:31:30 -04:00
Heng Li 06687a33b9 bwasw: read and align two fastq at a time 2011-11-05 14:00:01 -04:00
Heng Li 8f3c780552 fixed a potential int overflow 2011-10-24 14:22:39 -04:00
Heng Li eed46e802a fixed a bug about reverse alignment 2011-10-24 14:09:05 -04:00
Heng Li b204437c7e fixed negative mapping quality; still byggy 2011-10-24 14:00:36 -04:00
Heng Li 8512b55ce3 bwasw works on a couple of sequences 2011-10-24 13:42:32 -04:00
Heng Li 4c43c5914d this is better; but still buggy 2011-10-24 11:50:11 -04:00
Heng Li 29c3acfb31 not segfault immediately; but buggy 2011-10-24 09:36:52 -04:00
Heng Li b3397a1f14 changes to bwa-sw for the 64-bit support; unfinish 2011-10-21 13:32:45 -04:00
Heng Li 1cb409aaf2 use forward-only pac to reduce memory 2011-10-21 12:03:14 -04:00
Heng Li 8d6b859bf8 speed up multi-threading 2011-04-07 17:26:08 -04: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