Commit Graph

13 Commits (main)

Author SHA1 Message Date
zzh 364ee9756e 添加了共享内存支持,成功构建ert索引 2024-08-03 17:26:32 +08:00
Heng Li 89a5c0c5c8 moved BWTFree() into BWTIncFree()
BWTFree() is not for build. Only BWTIncFree() is needed.
2017-07-30 18:47:03 -04:00
Heng Li 0976272d99 Merge pull request #139 from jmarshall/fixes
Various collected fixes (updated versions of several existing PRs)
2017-07-30 18:36:07 -04:00
Heng Li 298284d754 r1144: output debugging message to stderr 2017-06-08 16:06:13 -04:00
Gwen Ives 6a5caf764f Fixed BWTIncFree() memory leaks
[Based on PR #37 with the additions below.]

Don't free non-malloced items in BWTFree().  If BWTCreate() is ever
called with a non-NULL decodeTable, BWTFree() will need to not free
decodeTable -- see FIXME comment.

Close packedFile in BWTIncConstructFromPacked() in the normal case.
Ignore it in error cases, as they immediately call exit() anyway.
2017-05-12 16:34:57 +01:00
Heng Li 1bba5ef20e r807: allow to change block size in bwt_gen
For a very large reference genome, the default is too small.
2014-08-25 10:31:54 -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
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 55059443bd print msg to stderr; output more in fastmap 2011-10-25 15:06:13 -04:00
Heng Li 66629512d9 more carefully computed the availableWords 2011-10-20 23:49:03 -04:00
Heng Li b96f180a15 move bwt_gen/* to the root directory 2011-10-20 11:56:24 -04:00