Bgzf: - incorrect write endianness - check valid argument in bgzf.input_string - incorrect isize in block - incorrect update of current position in uncompressed buffer - output_char was always writing spaces Bam: - length of certain NULL terminated sequences - write of plain SAM header - added more tests
the BAM module now uses an special representation of alignment records, which is hardly parsed. The idea is to avoid unnecessary parsing like CIGAR, sequence or quality decoding if it's not necessary. Also added more tests, which check the contents of alignments.
We are making broad changes and it was difficult to do so since Tags depends on every module. Removing it and all the apps that depend on it will simplify development at this time. All affected files moved into a tmp/ directory, so we can still remember the code that needs to be re-incorporated.
as cigar_op is a private type, we need constructors to build them from BAM, which has a different encoding of CIGAR operations than SAM (so the parser does not help here) Also private row polymorphic types have switched from open to closed, to allow exhaustivity checks outside of the Sam module.
OPAM now has a binary distribution, so use that. Speedup might result from setting OPAMJOBS since Travis build machines have 2 cores. Avoiding installation of OCaml system compiler won’t help because we now have to install one at opam-init time instead. Also simplify pinning. No longer need to add future-dev repo due to new opam features.
We require the `zip` findlib package, which is not provided by camlzip 1.04 (as mentioned in #144). We could instead require `camlzip`, which would make us compatible with all versions of camlzip. However, it seems 1.05 is deprecating the `camlzip` findlib package name in favor of `zip` (because camlzip is defined as an alias to zip, the library file is zip.cma). Thus, might as well go with that.
[Sam.optional_field] is a private type and the only way to build a value is through the [Sam.parse_optional_field] function, which is not adequate when parsing BAM. Added a constructor for [optional_field] which takes [optional_field_value]s. This is also a private type, so invariant-checking constructors and parsers were added too.
comes with a test and a small (and particularly unfair) benchmark against the transform implementation.