Commit Graph

1001 Commits (main)

Author SHA1 Message Date
Heng Li 86f2e134ba no effective changes 2013-02-01 12:57:48 -05:00
Heng Li 5d372cef65 bugfix: wrong B-tree comparison 2013-01-31 16:39:24 -05:00
Heng Li 8977737460 basic chaining working
Definitely suboptimal in a lot of corner cases...
2013-01-31 16:26:05 -05:00
Heng Li 6c19c9640c code backup 2013-01-31 15:55:22 -05:00
Heng Li 91debf412b move smem iterators to bwamem.{c,h} 2013-01-31 13:59:48 -05:00
Heng Li 5a4a0c4173 a bit refactoring for further changes 2013-01-31 12:34:05 -05:00
Heng Li 6de74888fd bugfix: min_intv not working in SMEM 2013-01-31 12:12:58 -05:00
Heng Li 543c719a54 fixed a couple of unimportant bugs in SMEM 2013-01-31 11:53:07 -05:00
Heng Li 6641788d38 preparation for further changes 2013-01-31 11:42:31 -05:00
Rob Davies 4f4e998d7f Added wrappers for fputc and fputs; more efficient sequence printing
Added wrappers err_fputc and err_fputs to catch failures in fput and fputs.
Macros err_putchar and err_puts call the new wrappers and can be used in
place of putchar and puts.

To avoid having to make millions of function calls when printing out
sequences, the code to print them in bwa_print_sam1 using putchar has
been replaced by a new version in bwa_print_seq that puts the sequence
into a buffer and then outputs the lot with err_fwrite.  In testing, the
new code was slightly faster than the old version, with the added benefit
that it will stop promptly if IO problems are detected.
2013-01-09 14:43:36 +00: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
Rob Davies 752ce69b78 Added more wrappers for functions that make system calls
Added the following wrappers that check the results of system calls
and exit non-zero if something went wrong.  This is so bwa can be more
robust against system failures (e.g. IO errors from remote storage, or
running out of memory).  The existing and new wrappers have also been
modified so that they no longer try to dump core on failure.  In most cases
the resulting core files are not useful (especially if bwa was compiled
with optimization turned on) so just pollute whatever directories they
got written to.

Wrappers for memory allocation functions:

xcalloc
xmalloc
xrealloc
xstrdup

New wrappers for IO functions:

err_fread_noeof   (also dies on EOF)
err_gzread
err_fseek
err_rewind
err_ftell
2012-12-16 10:05:32 +00:00
Heng Li 292f9061ab r132: optionally copy FASTA/Q comment to SAM 2012-10-26 12:54:32 -04:00
Heng Li 3abfd0743a r131: r128 plus remote changes 2012-06-28 14:52:18 -04:00
Heng Li fa51f029b9 Merge branch 'master' of github.com:lh3/bwa 2012-06-28 14:51:51 -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 f89649ee26 Merge pull request #11 from sjackman/inline
Do not inline functions used externally
2012-06-26 07:02:49 -07:00
Shaun Jackman 84d34e1d0b Do not inline functions used externally
Compiling using CLANG gives the following errors:
Undefined symbols for architecture x86_64:
  "_bwt_occ", referenced from:
      _bwt_cal_sa in bwt.o
      _bwt_sa in bwt.o
  "_bwt_2occ", referenced from:
      _bwt_match_exact in bwt.o
      _bwt_match_exact_alt in bwt.o
      _bwt_cal_width in bwtaln.o
  "_bwt_2occ4", referenced from:
      _bwt_match_gap in bwtgap.o
      _bsw2_core in bwtsw2_core.o
  "_bwtl_2occ4", referenced from:
      _bsw2_core in bwtsw2_core.o
2012-06-25 12:48:43 -07:00
Heng Li 09ee115dcc r126: release bwa-0.6.2 2012-06-19 13:29:44 -04:00
Heng Li 29ed2d8287 rename the "api" branch as "master" 2012-06-19 13:13:29 -04:00
Heng Li d97ff6bf72 r124: updated version number 2012-04-17 20:45:07 -04:00
Heng Li 72f1a95448 Merge branch 'master' into api 2012-04-17 20:44:30 -04:00
Heng Li cd818687ac r115: added -I and -S to bwasw 2012-04-17 20:43:43 -04:00
Heng Li 4f61e2b7f5 unnecessary large .sai output 2012-04-17 19:31:37 -04:00
Heng Li 9c486fa41e updated APIs abit 2012-04-08 00:55:52 -04:00
Heng Li 3b5a9e5595 simplified bwa_se() interface 2012-04-08 00:12:34 -04:00
Heng Li ca93a71e6e complete single-end alignment 2012-04-08 00:02:06 -04:00
Heng Li 080726cb47 preliminary doc 2012-04-07 22:50:07 -04:00
Heng Li 1cef219667 compute CIGAR; rev seq not working 2012-04-07 22:00:03 -04:00
Heng Li 66154ff5d2 towards refined gapped; unfinished 2012-04-07 01:25:39 -04:00
Heng Li a1abfe9977 API: aln seems working 2012-04-07 00:23:01 -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 d33abf127f check *.64.bwt first and then *.bwt 2012-03-29 14:45:00 -04:00
Heng Li c875085b2b do not use .64 suffix by default 2012-03-29 12:31:01 -04:00
Heng Li bdc953cad9 Tim's suggestion suffix file name with .64 2012-03-29 12:22:51 -04:00
Heng Li a471f1918b bugfix: long-existing out-of-boundary bug 2012-03-19 13:45:09 -04:00
Heng Li 91a4a0c8ea Release bwa-0.6.1 2011-11-28 09:52:07 -05:00
Heng Li 64e353ce49 bugfix: bwa-sw PE segfault in rare case 2011-11-28 09:12:21 -05:00
Heng Li bf65b6463a fastmap: optionally output the original query seq 2011-11-24 19:44:21 -05:00
Heng Li 150bfbdef4 fixed a deadlock; SMEM iterator 2011-11-24 19:15:14 -05:00
Heng Li b5170e0efa output the NM tag 2011-11-24 11:51:38 -05:00
Heng Li 717959e819 fixed a minor issue in trimming 2011-11-24 10:39:41 -05:00
Heng Li eeedda105d perhaps improves samse/sampe 2011-11-24 01:22:02 -05:00
Heng Li 196b50dde3 optionally mark multi-part hits as secondary 2011-11-23 23:39:59 -05:00