[med-svn] [Git][med-team/libbiod][master] 11 commits: New upstream version

Andreas Tille gitlab at salsa.debian.org
Wed Nov 20 11:05:36 GMT 2019



Andreas Tille pushed to branch master at Debian Med / libbiod


Commits:
2a303c13 by Andreas Tille at 2019-11-19T13:01:46Z
New upstream version

- - - - -
1d50f083 by Andreas Tille at 2019-11-19T13:01:47Z
New upstream version 0.2.3
- - - - -
0f7f51a1 by Andreas Tille at 2019-11-19T13:01:52Z
Update upstream source from tag 'upstream/0.2.3'

Update to upstream version '0.2.3'
with Debian dir 17f4556e110ad929726a72e63e5770585892d505
- - - - -
462ce278 by Andreas Tille at 2019-11-19T13:01:55Z
Standards-Version: 4.4.1

- - - - -
a4e9ab08 by Andreas Tille at 2019-11-19T14:02:32Z
Adapt patch

- - - - -
8571a76c by Andreas Tille at 2019-11-19T14:03:32Z
Cleanup changelog

- - - - -
070dbc9d by Andreas Tille at 2019-11-20T09:52:00Z
Use latest HEAD just for testing

- - - - -
1ca886fe by Andreas Tille at 2019-11-20T09:52:32Z
New upstream version 0.2.3+git20191120.b8eecef
- - - - -
5b855ef0 by Andreas Tille at 2019-11-20T09:52:34Z
Update upstream source from tag 'upstream/0.2.3+git20191120.b8eecef'

Update to upstream version '0.2.3+git20191120.b8eecef'
with Debian dir 98c213997f795f6a789e97313e6cae6d3387a4b9
- - - - -
c959627c by Andreas Tille at 2019-11-20T09:54:09Z
Adapt patches

- - - - -
121e2c09 by Andreas Tille at 2019-11-20T09:59:17Z
Force making library

- - - - -


14 changed files:

- Makefile
- README.md
- RELEASE-NOTES.md
- bio/core/bgzf/block.d
- bio/core/decompress.d
- debian/changelog
- debian/control
- debian/patches/fix_clean_target.patch
- − debian/patches/fix_linking_zlib.patch
- debian/patches/series
- debian/rules
- debian/watch
- dub.json
- test/unittests.d


Changes:

=====================================
Makefile
=====================================
@@ -1,7 +1,9 @@
 # Simple Makefile
+#
+#   make sharedlibrary  : make shared library
 
 D_COMPILER=ldc2
-DFLAGS = -wi -g -relocation-model=pic -unittest -main -Icontrib/undead
+DFLAGS = -wi -g -relocation-model=pic -Icontrib/undead -L-lz
 
 ifndef GUIX
   ifdef GUIX_ENVIRONMENT
@@ -15,30 +17,32 @@ endif
 DLIBS       = $(LIBRARY_PATH)/libphobos2-ldc.a $(LIBRARY_PATH)/libdruntime-ldc.a
 DLIBS_DEBUG = $(LIBRARY_PATH)/libphobos2-ldc-debug.a $(LIBRARY_PATH)/libdruntime-ldc-debug.a
 
-SRC         = $(wildcard contrib/undead/*.d) contrib/undead/*/*.d $(wildcard bio/*.d bio/*/*.d bio/*/*/*.d bio/*/*/*/*.d bio/*/*/*/*/*.d bio/*/*/*/*/*/*.d)
+SRC         = $(wildcard contrib/undead/*.d) contrib/undead/*/*.d $(wildcard bio/*.d bio/*/*.d bio/*/*/*.d bio/*/*/*/*.d bio/*/*/*/*/*.d bio/*/*/*/*/*/*.d) test/unittests.d
 OBJ         = $(SRC:.d=.o)
 BIN         = bin/biod_tests
+sharedlibrary:  BIN = libbiod.so
 
-debug:          DFLAGS += -O0 -d-debug -link-debuglib
+debug check:    DFLAGS += -O0 -d-debug -unittest -link-debuglib
 release static: DFLAGS += -O3 -release -enable-inlining -boundscheck=off
 static:         DFLAGS += -static -L-Bstatic
+sharedlibrary:  DFLAGS += -shared
 
 all: debug
 
 default: all
 
-default debug release static: $(BIN)
+default debug release static sharedlibrary: $(BIN)
 
 %.o: %.d
 	$(D_COMPILER) $(DFLAGS) -c $< -od=$(dir $@)
 
 $(BIN): $(OBJ)
 	$(info linking...)
-	$(D_COMPILER) $(DFLAGS) $(OBJ) -of=$(BIN)
+	$(D_COMPILER) -main $(DFLAGS) $(OBJ) -of=$(BIN)
 
 check: $(BIN)
 	$(info running tests...)
-	$(BIN)
+	$(BIN) "--DRT-gcopt=gc:precise disable:1 cleanup:none"
 
 clean:
 	rm -vf $(OBJ)


=====================================
README.md
=====================================
@@ -30,6 +30,8 @@ throughput data formats by provifing fast and easy to use native BAM
 file reader and writer with ability to iterate a BAM file a read at a
 time,a nucleotide at a time (pileup) or via a sliding window.
 
+Note the current Bamreader bails out on recent versions of the LDC
+compiler. See also https://github.com/biod/BioD/issues/53
 
 ## Install
 
@@ -45,17 +47,22 @@ After installing ldc and dub
     dub
     dub test
 
+On a recent Debian (>201911) you can install ldc and compile BioD with
+
+    make
+    make check
+
 It is possible to create a recent build container with the
 [GNU guix](https://www.gnu.org/software/guix/) transactional package
 manager
 
-    guix environment -C guix --ad-hoc ldc dub zlib gdb binutils-gold --network
+    guix environment -C guix --ad-hoc ldc dub zlib gdb binutils-gold vim --network
 
 after getting dropped in the container simply run dub.
 
 If you want to use the make file instead (not requiring the network) use
 
-    guix environment -C guix --ad-hoc ldc zlib gdb make binutils-gold --no-grafts
+    guix environment -C guix --ad-hoc ldc zlib gdb make binutils-gold vim --no-grafts
     make -j 4
     make check
 
@@ -63,11 +70,11 @@ If you want to use the make file instead (not requiring the network) use
 
 When using gdb, switch off these handlers
 
-`handle SIGUSR1 SIGUSR2 nostop noprint`
+    handle SIGUSR1 SIGUSR2 nostop noprint
 
 It can be passed in from the command line
 
-`gdb -iex "handle SIGUSR1 SIGUSR2 no stop noprint" biod_test`
+    gdb -ex 'handle SIGUSR1 SIGUSR2 nostop noprint' --args ./biod-test-library
 
 ## Usage
 


=====================================
RELEASE-NOTES.md
=====================================
@@ -1,3 +1,7 @@
+## ChangeLog v0.2.3 (20191119)
+
++ Compiles and tests pass on Debian with dub and ldc 1.17.0
+
 ## ChangeLog v0.2.2 (20190316)
 
 + Restored make so we can compile without dub


=====================================
bio/core/bgzf/block.d
=====================================
@@ -8,10 +8,10 @@
     the rights to use, copy, modify, merge, publish, distribute, sublicense,
     and/or sell copies of the Software, and to permit persons to whom the
     Software is furnished to do so, subject to the following conditions:
-    
+
     The above copyright notice and this permission notice shall be included in
     all copies or substantial portions of the Software.
-    
+
     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -112,7 +112,7 @@ DecompressedBgzfBlock decompressBgzfBlock(BgzfBlock block,
                                           BgzfBlockCache cache=null)
 {
     if (block.input_size == 0) {
-        return DecompressedBgzfBlock(block.start_offset, 
+        return DecompressedBgzfBlock(block.start_offset,
                                      block.start_offset + block.bsize + 1,
                                      cast(ubyte[])[]); // EOF marker
         // TODO: add check for correctness of EOF marker
@@ -130,8 +130,8 @@ DecompressedBgzfBlock decompressBgzfBlock(BgzfBlock block,
     ubyte[BGZF_MAX_BLOCK_SIZE] uncompressed_buf = void;
 
     // check that block follows BAM specification
-    enforce(block.input_size <= BGZF_MAX_BLOCK_SIZE, 
-            "Uncompressed block size must be within " ~ 
+    enforce(block.input_size <= BGZF_MAX_BLOCK_SIZE,
+            "Uncompressed block size must be within " ~
             to!string(BGZF_MAX_BLOCK_SIZE) ~ " bytes");
 
     // for convenience, provide a slice


=====================================
bio/core/decompress.d
=====================================
@@ -108,8 +108,9 @@ unittest {
     chars += s.length;
     lines = line;
   }
-  assert(lines == 7319,"genotype lines " ~ to!string(lines+1)); // fails with ldc2 < 1.10!
-  assert(chars == 4707218,"chars " ~ to!string(chars));
+  // These fail on recent versions of ldc
+  // assert(lines == 7319,"genotype lines " ~ to!string(lines+1)); // fails with ldc2 < 1.10!
+  // assert(chars == 4707218,"chars " ~ to!string(chars));
 }
 
 /**
@@ -205,6 +206,9 @@ unittest {
     chars += s.length;
     lines = line;
   }
+  /*
+  These fail on recent versions of ldc
   assert(lines == 7319,"genotype lines " ~ to!string(lines+1));
   assert(chars == 4707218,"chars " ~ to!string(chars));
+  */
 }


=====================================
debian/changelog
=====================================
@@ -1,22 +1,18 @@
-libbiod (0.2.2-1) UNRELEASED; urgency=medium
+libbiod (0.2.3+git20191120.b8eecef-1) UNRELEASED; urgency=medium
 
-  [ Andreas Tille ]
   * New upstream version
+    Closes: #912077
   * debhelper-compat 12
-  * Standards-Version: 4.4.0
+  * Standards-Version: 4.4.1
   * libundead is not needed any more
-  * Deactivate all old patches
+  * Remove old patches
   * Use Makefile provided by upstream for building
   * Rebuild to bump dependencies latest libphobos2-ldc-shared
     Closes: 927166
   * Remove obsolete fields Name from debian/upstream/metadata.
+  * Force making library
 
-  [ Michael R. Crusoe ]
-  * Apply patch from upstream: "size_t is uint on 32-bits platform"
-    (now part of new upstream)
-    Closes: #912077
-
- -- Andreas Tille <tille at debian.org>  Tue, 16 Apr 2019 11:19:43 +0200
+ -- Andreas Tille <tille at debian.org>  Tue, 19 Nov 2019 14:01:46 +0100
 
 libbiod (0.2.1-1) unstable; urgency=medium
 


=====================================
debian/control
=====================================
@@ -8,7 +8,7 @@ Build-Depends: debhelper-compat (= 12),
                meson (>= 0.40),
                pkg-config,
                zlib1g-dev
-Standards-Version: 4.4.0
+Standards-Version: 4.4.1
 Vcs-Browser: https://salsa.debian.org/med-team/libbiod
 Vcs-Git: https://salsa.debian.org/med-team/libbiod.git
 Homepage: https://github.com/biod/BioD


=====================================
debian/patches/fix_clean_target.patch
=====================================
@@ -4,7 +4,7 @@ Description: Do not fail if file to be removed does not exist
 
 --- a/Makefile
 +++ b/Makefile
-@@ -42,5 +42,5 @@ check: $(BIN)
+@@ -46,5 +46,5 @@ check: $(BIN)
  
  clean:
  	rm -vf $(OBJ)


=====================================
debian/patches/fix_linking_zlib.patch deleted
=====================================
@@ -1,15 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 19 Mar 2019 09:18:43 +0100
-Description: Link zlib dynamically
-
---- a/Makefile
-+++ b/Makefile
-@@ -1,7 +1,7 @@
- # Simple Makefile
- 
- D_COMPILER=ldc2
--DFLAGS = -wi -g -relocation-model=pic -unittest -main -Icontrib/undead
-+DFLAGS = -wi -g -relocation-model=pic -unittest -main -Icontrib/undead -L-lz
- 
- ifndef GUIX
-   ifdef GUIX_ENVIRONMENT


=====================================
debian/patches/series
=====================================
@@ -1,2 +1 @@
 fix_clean_target.patch
-fix_linking_zlib.patch


=====================================
debian/rules
=====================================
@@ -7,5 +7,8 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 %:
 	dh $@
 
+override_dh_auto_build:
+	$(MAKE) sharedlibrary
+
 override_dh_missing:
 	dh_missing --list-missing


=====================================
debian/watch
=====================================
@@ -1,3 +1,7 @@
 version=4
 
-https://github.com/biod/BioD/releases .*/archive/v(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
+# https://github.com/biod/BioD/releases .*/archive/v(\d[\d.-]+)\.(?:tar(?:\.gz|\.bz2)?|tgz)
+
+# just for testing
+opts="mode=git,pretty=0.2.3+git%cd.%h" \
+    https://github.com/biod/BioD.git HEAD


=====================================
dub.json
=====================================
@@ -1,7 +1,7 @@
 {
   "name": "biod",
-    "description": "A D library for computational biology and bioinformatics",
-  "homepage": "https://github.com/biod/BioD",
+    "description": "D library for computational biology and bioinformatics",
+    "homepage": "https://github.com/biod/BioD",
     "authors": [
     "Artem Tarasov",
     "George Githinji",
@@ -9,9 +9,10 @@
     "Prasun Anand",
     "Pjotr Prins"
   ],
-  "copyright": "Copyright © 2016-209, BioD developers",
+  "targetType": "dynamicLibrary",
+  "copyright": "Copyright © 2016-2019, BioD developers",
   "license": "MIT",
-  "sourcePaths": ["bio","contrib/undead"],
-  "importPaths": ["bio","contrib/undead"],
+  "sourcePaths": ["bio","contrib/undead", "test"],
+  "importPaths": ["bio","contrib/undead", "test"],
   "buildRequirements": ["allowWarnings"]
 }


=====================================
test/unittests.d
=====================================
@@ -8,10 +8,10 @@
     the rights to use, copy, modify, merge, publish, distribute, sublicense,
     and/or sell copies of the Software, and to permit persons to whom the
     Software is furnished to do so, subject to the following conditions:
-    
+
     The above copyright notice and this permission notice shall be included in
     all copies or substantial portions of the Software.
-    
+
     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -50,7 +50,7 @@ import bio.core.utils.roundbuf;
 import std.path;
 import std.range;
 import std.stdio;
-import undead.stream;
+// import undead.stream;
 import std.algorithm;
 import std.array;
 import std.conv;
@@ -64,9 +64,9 @@ CigarOperation[] cigarFromString(string cigar) {
 }
 
 unittest {
-
     stderr.writeln("Running unittests...");
     // stderr.writeln("Testing extracting SAM header...");
+
     auto fn = buildPath(dirName(__FILE__), "data", "ex1_header.bam");
     auto bf = new BamReader(fn);
     assert(bf.header.format_version == "1.3");
@@ -140,8 +140,8 @@ unittest {
     fn = buildPath(dirName(__FILE__), "data", "corrupted_zlib_archive.bam");
     import bio.core.utils.zlib;
     assertThrown!ZlibException(walkLength((new BamReader(fn)).reads));
-
     // stderr.writeln("Testing random access...");
+
     fn = buildPath(dirName(__FILE__), "data", "bins.bam");
     bf = new BamReader(fn);
 
@@ -149,7 +149,7 @@ unittest {
 
         auto refseq = array(bf["large"][beg .. end]);
 
-        auto naive = array(filter!((BamRead a) { 
+        auto naive = array(filter!((BamRead a) {
                          return a.ref_id != -1 &&
                                 bf.reference(a.ref_id).name == "large" &&
                                 a.position < end &&
@@ -184,6 +184,12 @@ unittest {
         compareWithNaiveApproach(i, i + 100);
     }
 
+    // Time to kick in GC
+    import core.memory;
+    stderr.writeln("**** Calling GC");
+    GC.collect();
+    stderr.writeln("**** Past calling GC");
+
     {
         auto fst_offset_tiny = bf["tiny"].startVirtualOffset();
         auto fst_offset_small = bf["small"].startVirtualOffset();
@@ -246,7 +252,7 @@ unittest {
 
     v = "0eabcf123";
     v.setHexadecimalFlag();
-    assert(v.is_hexadecimal_string);    
+    assert(v.is_hexadecimal_string);
     assert(v == "0eabcf123");
 
     // stderr.writeln("Testing parseAlignmentLine/toSam functions...");
@@ -290,7 +296,7 @@ unittest {
 
     foreach (read; bf.reads)
         writer.writeRecord(read);
-    
+
     writer.flush();
 
     stream.seekSet(0);
@@ -329,7 +335,7 @@ unittest {
             int current_ref_id = -1;
 
                                       // [99 .. 1569]   [1 .. 1567]
-            int[2] expected_columns = [1470,            1567]; 
+            int[2] expected_columns = [1470,            1567];
             foreach (column; columns) {
                 int ref_id = column.ref_id;
                 --expected_columns[ref_id];
@@ -373,16 +379,17 @@ unittest {
         auto read = reads[1];
         assert(!read.is_reverse_strand);
 
-        alias TypeTuple!("FZ", "MD", 
-                         Option.cigarExtra, 
-                         Option.mdCurrentOp, 
+        alias TypeTuple!("FZ", "MD",
+                         Option.cigarExtra,
+                         Option.mdCurrentOp,
                          Option.mdPreviousOp,
                          Option.mdNextOp) Options;
 
-        auto bases = basesWith!Options(read, 
+        /*
+        auto bases = basesWith!Options(read,
                                        arg!"flowOrder"(flow_order),
                                        arg!"keySequence"(key_sequence));
-     
+
         typeof(bases.front) bfront;
         bases.constructFront(&bfront);
 
@@ -397,7 +404,7 @@ unittest {
                      "-CCCGATTGGTCGTTGCTTTACGCTGATTGGCGAGTCCGGGGAACGTACCTTTGCTATCAGTCCAGGCCACATGAACCAGCTGCGGGCTGAAAGCATTCCGGAAGATGTGATTGCCGGACCTCGGCACTGGTTCTCACCTCATATCTGGTGCGTTGCAAGCCGGGTGAACCCATGCCGGAAGCACCATGAAAGCCATTGAGTACGCGAAGAAATATA"));
         assert(equal(bases, read.sequence));
         assert(equal(take(map!"a.flow_call.intensity_value"(bases), 92),
-                     [219, 219, 194, 194, 92, 107, 83, 198, 198, 78, 
+                     [219, 219, 194, 194, 92, 107, 83, 198, 198, 78,
                      // A   A    C    C    T   G   A    T    T    A
                       292, 292, 292,  81, 79,  78, 95, 99, 315, 315, 315,
                      // C   C    C    A    T   C   A    G    T    T    T
@@ -420,16 +427,17 @@ unittest {
             if (r.is_unmapped) continue;
             if (r.cigar.length == 0) continue;
             if (r.is_reverse_strand) {
-                bases = basesWith!Options(r, arg!"flowOrder"(flow_order), 
+                bases = basesWith!Options(r, arg!"flowOrder"(flow_order),
                                              arg!"keySequence"(key_sequence));
                 // if reverse strand, bases are also reverse complemented
                 assert(equal(bases, map!"a.complement"(retro(r.sequence))));
             } else {
-                bases = basesWith!Options(r, arg!"flowOrder"(flow_order), 
+                bases = basesWith!Options(r, arg!"flowOrder"(flow_order),
                                              arg!"keySequence"(key_sequence));
                 assert(equal(bases, r.sequence));
             }
         }
+        */
     }
 
     // stderr.writeln("Testing extended CIGAR conversion...");
@@ -479,6 +487,3 @@ unittest {
       writer.finish();
     }
 }
-
-void main() {
-}



View it on GitLab: https://salsa.debian.org/med-team/libbiod/compare/9610228e92b6658671a80c69e743f73a05895d33...121e2c09877da59e2639a59b7c44349472f39cea

-- 
View it on GitLab: https://salsa.debian.org/med-team/libbiod/compare/9610228e92b6658671a80c69e743f73a05895d33...121e2c09877da59e2639a59b7c44349472f39cea
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20191120/ec2e50f7/attachment-0001.html>


More information about the debian-med-commit mailing list