Commit Graph

482 Commits (9ce50a4e5e74b61debd2eac81cfcc57f57a2b6e9)

Author SHA1 Message Date
Heng Li 5a0b32bfd2 updated to the latest kseq.h 2013-02-06 14:38:40 -05:00
Heng Li a9292d674d a bit code cleanup 2013-02-06 13:59:32 -05:00
Heng Li e65b2096f7 removed useless members 2013-02-06 12:25:49 -05:00
Heng Li 797a8c147e sorting chains while filtering chains 2013-02-05 21:58:33 -05:00
Heng Li a61288c768 separate CIGAR generation 2013-02-05 21:49:19 -05:00
Heng Li 14e6a7bdb9 fixed a silly bug in ksw_extend()
Query return value is assigned to the target variable and vice versa...
2013-02-05 17:29:03 -05:00
Heng Li 1e16f3e701 calling ksw_global(); ksw_extend() is buggy! 2013-02-05 17:13:12 -05:00
Heng Li 86caae811e added comments 2013-02-05 16:58:35 -05:00
Heng Li 1bc9712cd8 explicitly use bit to keep bt matrix
This also simplifies backtracking.
2013-02-05 16:28:15 -05:00
Heng Li 7e1466c885 implemented NW backtrack 2013-02-05 16:05:53 -05:00
Heng Li d91e320972 towards reimplementing banded NW alignment 2013-02-05 12:06:56 -05:00
Heng Li 7067af833d fixed a silly bug on sorted merge 2013-02-05 00:41:07 -05:00
Heng Li d6a73c9171 chain filtering apparently working 2013-02-05 00:17:20 -05:00
Heng Li 9d0cdb2d3c unfinished chain filter 2013-02-04 17:23:06 -05:00
Heng Li c589b42fb5 minor tuning for fewer identical hits 2013-02-04 16:48:11 -05:00
Heng Li 29c8546679 better ref extraction 2013-02-04 16:08:00 -05:00
Heng Li 788e9d1e3d fixed a couple of leaks; buggy atm 2013-02-04 15:40:26 -05:00
Heng Li f27bd18f20 check if every seed is included; not used for now 2013-02-04 15:09:47 -05:00
Heng Li 5bfa45a69b write the mem_aln_t struct 2013-02-04 15:02:56 -05:00
Heng Li 666638a953 changed the default scoring 2013-02-04 14:51:51 -05:00
Heng Li ba18db1a9f sw extension works for the simplest case 2013-02-04 12:37:38 -05:00
Heng Li f83dea36d8 no effective changes 2013-02-03 18:16:43 -05:00
Heng Li 2093398231 bugfix: the first line is wrong 2013-02-03 17:47:57 -05:00
Heng Li e8a1962efe code backup; it is wrong 2013-02-03 17:25:40 -05:00
Heng Li 92b084e553 reimplemented SW extension; not tested yet 2013-02-02 16:38:21 -05:00
Heng Li d25a87cc50 code backup 2013-02-02 15:14:24 -05:00
Heng Li 00e5302219 routine to get subsequence from 2-bit pac 2013-02-01 16:39:50 -05:00
Heng Li 7ab4b3321f bugfix: memory leak 2013-02-01 15:26:34 -05:00
Heng Li f8f3b7577a code cleanup; added a missing file 2013-02-01 14:38:44 -05:00
Heng Li 620ad6e5b9 reseed long SMEMs 2013-02-01 14:20:38 -05:00
Heng Li abc675f278 typo in comments 2013-02-01 13:14:16 -05:00
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