Skip to content
Commits on Source (2)
libbiod (0.2.1-1) UNRELEASED; urgency=medium
libbiod (0.2.1-1) unstable; urgency=medium
* New upstream version
-- Andreas Tille <tille@debian.org> Tue, 09 Oct 2018 07:43:37 +0200
-- Andreas Tille <tille@debian.org> Tue, 09 Oct 2018 08:07:56 +0200
libbiod (0.1.0-6) unstable; urgency=medium
......
From 589d65025a68a42ec03bbf6d64c57a7da7754201 Mon Sep 17 00:00:00 2001
From: indraniel <indraniel@gmail.com>
Date: Thu, 4 Aug 2016 15:43:37 -0500
Subject: [PATCH 03/14] + include the AH header tag to @SQ lines
- the "AH" header tag corresponds to Alternate Haplotypes in ALT
mapping mode
- based on samtools/hts-specs issue 147: https://github.com/samtools/hts-specs/pull/147
- this tag is already being produced by `bwa` 0.7.15
* see tag 0.7.15 (r1140) https://github.com/lh3/bwa/releases/tag/v0.7.15
---
bio/sam/header.d | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bio/sam/header.d b/bio/sam/header.d
index b6ec094..aceac15 100644
--- a/bio/sam/header.d
+++ b/bio/sam/header.d
@@ -223,7 +223,8 @@ mixin HeaderLineStruct!("SqLine", "@SQ", "name",
Field!("assembly", "AS"),
Field!("md5", "M5"),
Field!("species", "SP"),
- Field!("uri", "UR"));
+ Field!("uri", "UR"),
+ Field!("AlternateHaplotype", "AH"));
mixin HeaderLineStruct!("RgLine", "@RG", "identifier",
Field!("identifier", "ID"),
--
2.11.0
From 47d081e06cb2df81269ec31d45cc50f12ec3c8b1 Mon Sep 17 00:00:00 2001
From: Artem Tarasov <artem.tarasov@embl.de>
Date: Fri, 5 Aug 2016 06:43:33 +0200
Subject: [PATCH 04/14] use consistent naming (#21)
---
bio/sam/header.d | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bio/sam/header.d b/bio/sam/header.d
index aceac15..6f315e5 100644
--- a/bio/sam/header.d
+++ b/bio/sam/header.d
@@ -1,6 +1,6 @@
/*
This file is part of BioD.
- Copyright (C) 2012-2015 Artem Tarasov <lomereiter@gmail.com>
+ Copyright (C) 2012-2016 Artem Tarasov <lomereiter@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -224,7 +224,7 @@ mixin HeaderLineStruct!("SqLine", "@SQ", "name",
Field!("md5", "M5"),
Field!("species", "SP"),
Field!("uri", "UR"),
- Field!("AlternateHaplotype", "AH"));
+ Field!("alternate_haplotype", "AH"));
mixin HeaderLineStruct!("RgLine", "@RG", "identifier",
Field!("identifier", "ID"),
--
2.11.0
From 1248586b54af4bd4dfb28ebfebfc6bf012e7a587 Mon Sep 17 00:00:00 2001
From: Artem Tarasov <artem.tarasov@embl.de>
Date: Sat, 10 Sep 2016 08:58:07 +0200
Subject: [PATCH 05/14] fixes lomereiter/sambamba#244
---
bio/bam/pileup.d | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/bio/bam/pileup.d b/bio/bam/pileup.d
index 576a16b..a4c6a12 100644
--- a/bio/bam/pileup.d
+++ b/bio/bam/pileup.d
@@ -864,6 +864,11 @@ struct PileupChunkRange(C) {
private bool _use_md_tag;
private ulong _start_from;
private ulong _end_at;
+ private int _chunk_right_end;
+
+ private int computeRightEnd(ref ElementType!C chunk) {
+ return chunk.map!(r => r.position + r.basesCovered()).reduce!max;
+ }
this(C chunks, bool use_md_tag, ulong start_from, ulong end_at) {
_chunks = chunks;
@@ -885,10 +890,9 @@ struct PileupChunkRange(C) {
break;
}
- auto last_read = _current_chunk[$-1];
- if (last_read.position + last_read.basesCovered() > start_from) {
+ _chunk_right_end = computeRightEnd(_current_chunk);
+ if (_chunk_right_end > start_from)
break;
- }
}
}
}
@@ -900,7 +904,7 @@ struct PileupChunkRange(C) {
auto front() @property {
auto end_pos = _current_chunk[$-1].position;
if (_chunks.empty || _chunks.front[0].ref_id != _current_chunk[$-1].ref_id)
- end_pos += _current_chunk[$-1].basesCovered();
+ end_pos = _chunk_right_end;
return makePileup(chain(_prev_chunk, _current_chunk),
_use_md_tag,
@@ -921,6 +925,8 @@ struct PileupChunkRange(C) {
if (_current_chunk[0].ref_id >= 0) break;
}
+ _chunk_right_end = computeRightEnd(_current_chunk);
+
// if we changed reference, nullify prev_chunk
if (_prev_chunk.length > 0 &&
_prev_chunk[$ - 1].ref_id == _current_chunk[0].ref_id)
--
2.11.0
From c37b0e7e03de77d231d596a16293907fa4f7ca92 Mon Sep 17 00:00:00 2001
From: John Colvin <john.loughran.colvin@gmail.com>
Date: Fri, 16 Dec 2016 12:41:21 +0000
Subject: [PATCH 06/14] switch to undead.stream;
---
bio/bam/bai/indexing.d | 2 +-
bio/bam/baifile.d | 2 +-
bio/bam/reader.d | 2 +-
bio/bam/readrange.d | 2 +-
bio/bam/reference.d | 2 +-
bio/bam/referenceinfo.d | 2 +-
bio/bam/writer.d | 4 ++--
bio/core/bgzf/inputstream.d | 2 +-
bio/core/bgzf/outputstream.d | 2 +-
bio/core/utils/stream.d | 4 ++--
bio/core/utils/switchendianness.d | 2 +-
bio/sff/reader.d | 2 +-
bio/sff/readrange.d | 2 +-
bio/sff/writer.d | 2 +-
dub.json | 5 ++++-
examples/create_bam_from_scratch.d | 2 +-
test/unittests.d | 2 +-
17 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/bio/bam/bai/indexing.d b/bio/bam/bai/indexing.d
index 270f5e6..43e89d3 100644
--- a/bio/bam/bai/indexing.d
+++ b/bio/bam/bai/indexing.d
@@ -30,7 +30,7 @@ import bio.bam.constants;
import bio.bam.bai.bin;
import bio.core.bgzf.chunk;
-import std.stream;
+import undead.stream;
import std.array;
import std.algorithm;
import std.system;
diff --git a/bio/bam/baifile.d b/bio/bam/baifile.d
index 57359a9..276e685 100644
--- a/bio/bam/baifile.d
+++ b/bio/bam/baifile.d
@@ -28,7 +28,7 @@ public import bio.bam.bai.bin;
import bio.core.bgzf.virtualoffset;
import bio.bam.constants;
-import std.stream;
+import undead.stream;
import std.system;
import std.exception;
import std.algorithm;
diff --git a/bio/bam/reader.d b/bio/bam/reader.d
index fae864f..728ccb5 100644
--- a/bio/bam/reader.d
+++ b/bio/bam/reader.d
@@ -94,7 +94,7 @@ class BamReader : IBamSamReader {
}
-------------------------------------------
*/
- this(std.stream.Stream stream,
+ this(undead.stream.Stream stream,
std.parallelism.TaskPool task_pool = std.parallelism.taskPool) {
_source_stream = new EndianStream(stream, Endian.littleEndian);
_task_pool = task_pool;
diff --git a/bio/bam/readrange.d b/bio/bam/readrange.d
index 6767a74..fc17aff 100644
--- a/bio/bam/readrange.d
+++ b/bio/bam/readrange.d
@@ -29,7 +29,7 @@ import bio.bam.reader;
import bio.core.bgzf.inputstream;
import bio.core.bgzf.virtualoffset;
-import std.stream;
+import undead.stream;
import std.algorithm;
import std.system;
import std.bitmanip;
diff --git a/bio/bam/reference.d b/bio/bam/reference.d
index 997e6b4..6406b32 100644
--- a/bio/bam/reference.d
+++ b/bio/bam/reference.d
@@ -47,7 +47,7 @@ import bio.bam.region;
import bio.bam.randomaccessmanager;
import bio.core.bgzf.virtualoffset;
-import std.stream;
+import undead.stream;
import std.exception;
import std.array;
diff --git a/bio/bam/referenceinfo.d b/bio/bam/referenceinfo.d
index 3824fe8..91b8d96 100644
--- a/bio/bam/referenceinfo.d
+++ b/bio/bam/referenceinfo.d
@@ -23,7 +23,7 @@
*/
module bio.bam.referenceinfo;
-import std.stream;
+import undead.stream;
import std.exception;
import std.array;
diff --git a/bio/bam/writer.d b/bio/bam/writer.d
index 4d5b4f1..5e92930 100644
--- a/bio/bam/writer.d
+++ b/bio/bam/writer.d
@@ -35,7 +35,7 @@ import bio.core.utils.stream;
import std.parallelism;
import std.exception;
-import std.stream;
+import undead.stream;
import std.traits;
import std.system;
import std.algorithm;
@@ -73,7 +73,7 @@ final class BamWriter {
/// compression_level = compression level, must be in range -1..9
/// task_pool = task pool to use for parallel compression
/// buffer_size = size of BgzfOutputStream buffer
- this(std.stream.Stream stream,
+ this(undead.stream.Stream stream,
int compression_level=-1,
std.parallelism.TaskPool task_pool=std.parallelism.taskPool,
size_t buffer_size=0)
diff --git a/bio/core/bgzf/inputstream.d b/bio/core/bgzf/inputstream.d
index 169e189..2bfc658 100644
--- a/bio/core/bgzf/inputstream.d
+++ b/bio/core/bgzf/inputstream.d
@@ -30,7 +30,7 @@ import bio.core.bgzf.chunk;
import bio.bam.constants;
import bio.core.utils.roundbuf;
-import std.stream;
+import undead.stream;
import std.exception;
import std.conv;
import std.parallelism;
diff --git a/bio/core/bgzf/outputstream.d b/bio/core/bgzf/outputstream.d
index b9f3d07..89cbecb 100644
--- a/bio/core/bgzf/outputstream.d
+++ b/bio/core/bgzf/outputstream.d
@@ -28,7 +28,7 @@ import bio.core.bgzf.compress;
import bio.core.utils.roundbuf;
-import std.stream;
+import undead.stream;
import std.exception;
import std.parallelism;
import std.array;
diff --git a/bio/core/utils/stream.d b/bio/core/utils/stream.d
index 6c5146d..ee57fe7 100644
--- a/bio/core/utils/stream.d
+++ b/bio/core/utils/stream.d
@@ -1,6 +1,6 @@
module bio.core.utils.stream;
-public import std.stream;
+public import undead.stream;
import core.stdc.stdio;
import core.stdc.errno;
import core.stdc.string;
@@ -48,7 +48,7 @@ FileMode toFileMode(string mode) {
return result;
}
-final class File: std.stream.File {
+final class File: undead.stream.File {
this(string filename, string mode="rb") {
version (Posix) {
// Issue 8528 workaround
diff --git a/bio/core/utils/switchendianness.d b/bio/core/utils/switchendianness.d
index 7b141cf..6772e70 100644
--- a/bio/core/utils/switchendianness.d
+++ b/bio/core/utils/switchendianness.d
@@ -1,5 +1,5 @@
/**
- (Almost) a copy-paste from std/stream.d
+ (Almost) a copy-paste from undead.stream.d
*/
module bio.core.utils.switchendianness;
diff --git a/bio/sff/reader.d b/bio/sff/reader.d
index d0c21a2..257a859 100644
--- a/bio/sff/reader.d
+++ b/bio/sff/reader.d
@@ -29,7 +29,7 @@ import bio.sff.readrange;
import bio.sff.constants;
import bio.core.utils.stream;
-import std.stream;
+import undead.stream;
import std.system;
import std.range;
import std.exception;
diff --git a/bio/sff/readrange.d b/bio/sff/readrange.d
index eda29d3..5f70f08 100644
--- a/bio/sff/readrange.d
+++ b/bio/sff/readrange.d
@@ -5,7 +5,7 @@ import bio.sff.index;
import bio.core.utils.switchendianness;
import std.algorithm;
-import std.stream;
+import undead.stream;
import std.system;
import std.array;
diff --git a/bio/sff/writer.d b/bio/sff/writer.d
index 7937d79..1ebd0ca 100644
--- a/bio/sff/writer.d
+++ b/bio/sff/writer.d
@@ -4,7 +4,7 @@ import bio.sff.constants;
import bio.sff.utils.roundup;
import bio.core.utils.stream;
-import std.stream;
+import undead.stream;
import std.system;
/// Class for outputting SFF files
diff --git a/dub.json b/dub.json
index ec26904..6135f32 100644
--- a/dub.json
+++ b/dub.json
@@ -8,5 +8,8 @@
"copyright": "Copyright © 2016, BioD developers",
"license": "MIT",
"sourcePaths": ["bio"],
- "importPaths": ["bio"]
+ "importPaths": ["bio"],
+ "dependencies": {
+ "undead": "~>1.0.6"
+ }
}
diff --git a/examples/create_bam_from_scratch.d b/examples/create_bam_from_scratch.d
index ad6053a..b011d93 100644
--- a/examples/create_bam_from_scratch.d
+++ b/examples/create_bam_from_scratch.d
@@ -3,7 +3,7 @@
// this example shows how to create BAM files from scratch
import bio.bam.read, bio.bam.referenceinfo, bio.sam.header;
import bio.bam.reader, bio.bam.writer;
-import std.stream, std.stdio;
+import undead.stream, std.stdio;
void main() {
auto header = new SamHeader(); // First, create SAM header
diff --git a/test/unittests.d b/test/unittests.d
index 4435008..cefa6a9 100644
--- a/test/unittests.d
+++ b/test/unittests.d
@@ -49,7 +49,7 @@ import bio.core.utils.roundbuf;
import std.path;
import std.range;
import std.stdio;
-import std.stream;
+import undead.stream;
import std.algorithm;
import std.array;
import std.conv;
--
2.11.0
From 4901cda76512a1c819bc2f9ec2af7048ae9db80d Mon Sep 17 00:00:00 2001
From: John Colvin <john.loughran.colvin@gmail.com>
Date: Fri, 16 Dec 2016 13:30:13 +0000
Subject: [PATCH 07/14] std.c -> core.stdc
---
bio/bam/bai/indexing.d | 2 +-
bio/bam/read.d | 2 +-
bio/bam/thirdparty/msgpack.d | 4 ++--
bio/bam/utils/array.d | 2 +-
bio/core/bgzf/outputstream.d | 6 +++---
bio/core/utils/bylinefast.d | 2 +-
bio/core/utils/format.d | 6 +++---
bio/core/utils/stream.d | 2 +-
bio/sam/reader.d | 2 +-
9 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/bio/bam/bai/indexing.d b/bio/bam/bai/indexing.d
index 43e89d3..fec5662 100644
--- a/bio/bam/bai/indexing.d
+++ b/bio/bam/bai/indexing.d
@@ -35,7 +35,7 @@ import std.array;
import std.algorithm;
import std.system;
import std.exception;
-import std.c.string;
+import core.stdc.string;
// Suppose we have an alignment which covers bases on a reference,
// starting from one position and ending at another position.
diff --git a/bio/bam/read.d b/bio/bam/read.d
index 6e81263..3f51dc8 100644
--- a/bio/bam/read.d
+++ b/bio/bam/read.d
@@ -72,7 +72,7 @@ import std.system;
import std.traits;
import std.array;
import std.bitmanip;
-import std.c.stdlib;
+import core.stdc.stdlib;
/**
Represents single CIGAR operation
diff --git a/bio/bam/thirdparty/msgpack.d b/bio/bam/thirdparty/msgpack.d
index bf5ca5b..1032b33 100644
--- a/bio/bam/thirdparty/msgpack.d
+++ b/bio/bam/thirdparty/msgpack.d
@@ -59,7 +59,7 @@ else
// for Converting Endian using ntohs and ntohl;
version(Windows)
{
- import std.c.windows.winsock;
+ import core.stdc.windows.winsock;
}
else
{
@@ -82,7 +82,7 @@ static if (real.sizeof == double.sizeof) {
import std.numeric;
}
-version(unittest) import std.file, std.c.string;
+version(unittest) import std.file, core.stdc.string;
@trusted:
diff --git a/bio/bam/utils/array.d b/bio/bam/utils/array.d
index 4e5f8a1..42000df 100644
--- a/bio/bam/utils/array.d
+++ b/bio/bam/utils/array.d
@@ -23,7 +23,7 @@
*/
module bio.bam.utils.array;
-import std.c.string;
+import core.stdc.string;
import std.traits;
/// Modifies array in-place so that $(D slice) is replaced by
diff --git a/bio/core/bgzf/outputstream.d b/bio/core/bgzf/outputstream.d
index 89cbecb..ae335be 100644
--- a/bio/core/bgzf/outputstream.d
+++ b/bio/core/bgzf/outputstream.d
@@ -34,7 +34,7 @@ import std.parallelism;
import std.array;
import std.algorithm : max;
import std.typecons;
-import std.c.stdlib;
+import core.stdc.stdlib;
alias void delegate(ubyte[], ubyte[]) BlockWriteHandler;
@@ -88,7 +88,7 @@ class BgzfOutputStream : Stream {
// 1 extra block to which we can write while n_tasks are executed
auto comp_buf_size = (2 * n_tasks + 2) * max_block_size;
- auto p = cast(ubyte*)std.c.stdlib.malloc(comp_buf_size);
+ auto p = cast(ubyte*)core.stdc.stdlib.malloc(comp_buf_size);
_compression_buffer = p[0 .. comp_buf_size];
_buffer = _compression_buffer[0 .. block_size];
_tmp = _compression_buffer[max_block_size .. max_block_size * 2];
@@ -210,7 +210,7 @@ class BgzfOutputStream : Stream {
_stream.close();
writeable = false;
- std.c.stdlib.free(_compression_buffer.ptr);
+ core.stdc.stdlib.free(_compression_buffer.ptr);
}
/// Adds EOF block. This function is called in close() method.
diff --git a/bio/core/utils/bylinefast.d b/bio/core/utils/bylinefast.d
index 50fb756..6a71520 100644
--- a/bio/core/utils/bylinefast.d
+++ b/bio/core/utils/bylinefast.d
@@ -6,7 +6,7 @@ module bio.core.utils.bylinefast;
import std.stdio;
import std.string: indexOf;
-import std.c.string: memmove;
+import core.stdc.string: memmove;
/**
Reads by line in an efficient way (10 times faster than File.byLine from std.stdio).
diff --git a/bio/core/utils/format.d b/bio/core/utils/format.d
index ae8b4e6..a3ac3f1 100644
--- a/bio/core/utils/format.d
+++ b/bio/core/utils/format.d
@@ -34,8 +34,8 @@
*/
module bio.core.utils.format;
-import std.c.stdio;
-import std.c.stdlib;
+import core.stdc.stdio;
+import core.stdc.stdlib;
import std.string;
import std.traits;
import std.array;
@@ -161,7 +161,7 @@ private {
if (isSomeString!T)
{
auto str = cast(const(char)[])s;
- std.c.string.memcpy(sink, str.ptr, str.length);
+ core.stdc.string.memcpy(sink, str.ptr, str.length);
sink += str.length;
}
diff --git a/bio/core/utils/stream.d b/bio/core/utils/stream.d
index ee57fe7..b3f7d34 100644
--- a/bio/core/utils/stream.d
+++ b/bio/core/utils/stream.d
@@ -15,7 +15,7 @@ version(Posix){
version(Windows) {
private import std.file;
private import std.utf;
- private import std.c.windows.windows;
+ private import core.stdc.windows.windows;
extern (Windows) {
DWORD GetFileType(HANDLE hFile);
}
diff --git a/bio/sam/reader.d b/bio/sam/reader.d
index e7724ed..4302e9b 100644
--- a/bio/sam/reader.d
+++ b/bio/sam/reader.d
@@ -49,7 +49,7 @@ import std.typecons;
import std.parallelism;
import std.process;
import std.exception;
-import std.c.string;
+import core.stdc.string;
BamRead _parseSamRecord(Tuple!(char[], SamReader, OutBuffer) t) {
auto r = parseAlignmentLine(cast(string)t[0], t[1]._header, t[2]);
--
2.11.0
From 4394f15bfdda766dce69fd3f5711d05bae71a1bb Mon Sep 17 00:00:00 2001
From: John Colvin <john.loughran.colvin@gmail.com>
Date: Fri, 16 Dec 2016 14:25:58 +0000
Subject: [PATCH 08/14] fix deprecations and some warnings
---
bio/bam/randomaccessmanager.d | 1 +
bio/bam/read.d | 1 +
bio/bam/reader.d | 2 +-
bio/bam/snpcallers/maq.d | 2 +-
bio/bam/tagvalue.d | 2 +-
bio/bam/thirdparty/msgpack.d | 8 ++++----
bio/core/utils/format.d | 1 +
bio/core/utils/outbuffer.d | 2 +-
bio/core/utils/stream.d | 1 -
bio/sam/header.d | 2 +-
dub.json | 3 ++-
11 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/bio/bam/randomaccessmanager.d b/bio/bam/randomaccessmanager.d
index e5beb4b..fcd5d62 100644
--- a/bio/bam/randomaccessmanager.d
+++ b/bio/bam/randomaccessmanager.d
@@ -50,6 +50,7 @@ import std.traits;
import std.exception;
import std.container;
import std.parallelism;
+static import std.file;
debug {
import std.stdio;
diff --git a/bio/bam/read.d b/bio/bam/read.d
index 3f51dc8..b2f8cd1 100644
--- a/bio/bam/read.d
+++ b/bio/bam/read.d
@@ -1579,6 +1579,7 @@ unittest {
{
import std.typecons;
+ static import bio.bam.thirdparty.msgpack;
auto packer = bio.bam.thirdparty.msgpack.packer(Appender!(ubyte[])());
read.toMsgpack(packer);
auto data = packer.stream.data;
diff --git a/bio/bam/reader.d b/bio/bam/reader.d
index 728ccb5..f1fb8d4 100644
--- a/bio/bam/reader.d
+++ b/bio/bam/reader.d
@@ -95,7 +95,7 @@ class BamReader : IBamSamReader {
-------------------------------------------
*/
this(undead.stream.Stream stream,
- std.parallelism.TaskPool task_pool = std.parallelism.taskPool) {
+ TaskPool task_pool = taskPool) {
_source_stream = new EndianStream(stream, Endian.littleEndian);
_task_pool = task_pool;
diff --git a/bio/bam/snpcallers/maq.d b/bio/bam/snpcallers/maq.d
index 2cb8a4b..3eee066 100644
--- a/bio/bam/snpcallers/maq.d
+++ b/bio/bam/snpcallers/maq.d
@@ -5,7 +5,7 @@ module bio.bam.snpcallers.maq;
*/
import core.stdc.math;
-import std.math : LN2, LN10, isnan;
+import std.math : LN2, LN10, isNaN;
import std.traits;
import std.range;
import std.algorithm;
diff --git a/bio/bam/tagvalue.d b/bio/bam/tagvalue.d
index dbd9aad..55adb1d 100644
--- a/bio/bam/tagvalue.d
+++ b/bio/bam/tagvalue.d
@@ -296,7 +296,7 @@ string injectOpCast() {
}
cs ~= `(is(T == string)) {` ~
- ` if (is_string) {`
+ ` if (is_string) {` ~
` return bam_typeid == 'Z' ? u.Z : u.H;`~
` } else if (is_integer || is_float || is_character) {`~
` `~injectSwitchPrimitive("string")~
diff --git a/bio/bam/thirdparty/msgpack.d b/bio/bam/thirdparty/msgpack.d
index 1032b33..8aea071 100644
--- a/bio/bam/thirdparty/msgpack.d
+++ b/bio/bam/thirdparty/msgpack.d
@@ -344,7 +344,7 @@ struct PackerImpl(Stream) if (isOutputRange!(Stream, ubyte) && isOutputRange!(St
* Params:
* withFieldName = serialize class / struct with field name
*/
- this(bool withFieldName = false)
+ this(bool withFieldName)
{
withFieldName_ = withFieldName;
}
@@ -3145,7 +3145,7 @@ struct Value
* type = the type of value.
*/
@safe
- this(Type type = Type.nil)
+ this(Type type)
{
this.type = type;
}
@@ -3617,7 +3617,7 @@ struct Value
ret ^= value.toHash();
}
return ret;
- } catch assert(0);
+ } catch (Exception) assert(0);
}
}
}
@@ -4656,7 +4656,7 @@ mixin template MessagePackable(Members...)
if (withFieldName) {
packer.beginMap(this.tupleof.length);
foreach (i, member; this.tupleof) {
- pack(getFieldName!(typeof(this), i));
+ packer.pack(getFieldName!(typeof(this), i));
packer.pack(member);
}
} else {
diff --git a/bio/core/utils/format.d b/bio/core/utils/format.d
index a3ac3f1..74bcfaf 100644
--- a/bio/core/utils/format.d
+++ b/bio/core/utils/format.d
@@ -36,6 +36,7 @@ module bio.core.utils.format;
import core.stdc.stdio;
import core.stdc.stdlib;
+static import core.stdc.string;
import std.string;
import std.traits;
import std.array;
diff --git a/bio/core/utils/outbuffer.d b/bio/core/utils/outbuffer.d
index 56c0879..983bb58 100644
--- a/bio/core/utils/outbuffer.d
+++ b/bio/core/utils/outbuffer.d
@@ -93,7 +93,7 @@ class OutBuffer {
/// Responsibility that there's enough capacity is on the user
void putUnsafe(T)(T bytes) if (is(T == ubyte[])) {
_heap_ptr[_heap_used .. _heap_used + bytes.length] = bytes[];
- _heap_used += bytes.length;;
+ _heap_used += bytes.length;
}
/// ditto
diff --git a/bio/core/utils/stream.d b/bio/core/utils/stream.d
index b3f7d34..aafcd43 100644
--- a/bio/core/utils/stream.d
+++ b/bio/core/utils/stream.d
@@ -135,7 +135,6 @@ final class File: undead.stream.File {
if (ret <= 0) {
size = 0;
throw new ReadException("read timeout");
- break;
}
} else {
throw new ReadException(to!string(strerror(errno)));
diff --git a/bio/sam/header.d b/bio/sam/header.d
index 6f315e5..3d4697e 100644
--- a/bio/sam/header.d
+++ b/bio/sam/header.d
@@ -707,7 +707,7 @@ class SamHeader {
JSONValue json;
json.object = result;
- sink.write(toJSON(&json));
+ sink.write(toJSON(json));
}
/// Packs message in the following format:
diff --git a/dub.json b/dub.json
index 6135f32..693e9c7 100644
--- a/dub.json
+++ b/dub.json
@@ -11,5 +11,6 @@
"importPaths": ["bio"],
"dependencies": {
"undead": "~>1.0.6"
- }
+ },
+ "buildRequirements": ["allowWarnings"]
}
--
2.11.0
From 05f86b887728a30128c68cb14012f84093132eac Mon Sep 17 00:00:00 2001
From: John Colvin <john.loughran.colvin@gmail.com>
Date: Fri, 16 Dec 2016 14:28:52 +0000
Subject: [PATCH 09/14] fix toHash signature
---
bio/sam/header.d | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/bio/sam/header.d b/bio/sam/header.d
index 3d4697e..df88d64 100644
--- a/bio/sam/header.d
+++ b/bio/sam/header.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
@@ -117,7 +117,7 @@ private {
mixin template toSamMethod(string line_prefix, Field...) {
void toSam(Sink)(auto ref Sink sink) const if (isSomeSink!Sink) {
sink.write(line_prefix);
- mixin(serializeFields!Field());
+ mixin(serializeFields!Field());
}
}
@@ -132,9 +132,9 @@ private {
mixin template toHashMethod(string struct_name, string id_field, Field...) {
static if (id_field != null) {
- hash_t toHash() const {
+ hash_t toHash() const nothrow @safe{
hash_t result = 1;
- mixin(generateHashExpression!Field());
+ mixin(generateHashExpression!Field());
return result;
}
@@ -195,12 +195,12 @@ private {
}
}
- mixin template HeaderLineStruct(string struct_name,
+ mixin template HeaderLineStruct(string struct_name,
string line_prefix,
string id_field,
- Field...)
+ Field...)
{
- mixin(`struct `~struct_name~`{
+ mixin(`struct `~struct_name~`{
mixin structFields!Field;
mixin parseStaticMethod!(struct_name, Field);
mixin toSamMethod!(line_prefix, Field);
@@ -359,7 +359,7 @@ class HeaderLineDictionary(T) {
_index_to_id.length = _index_to_id.length - 1;
_dict.remove(id);
- _id_to_index.remove(id);
+ _id_to_index.remove(id);
return true;
}
@@ -484,7 +484,7 @@ class SamHeader {
try {
sorting_order = to!SortingOrder(header_line.sorting_order);
} catch (ConvException e) {
- sorting_order = SortingOrder.unknown;
+ sorting_order = SortingOrder.unknown;
// FIXME: should we do that silently?
}
} else {
@@ -536,14 +536,14 @@ class SamHeader {
core.memory.GC.enable();
}
-
+
/// Format version
string format_version;
/// Sorting order
SortingOrder sorting_order = SortingOrder.unknown;
- /// Dictionary of @SQ lines.
+ /// Dictionary of @SQ lines.
/// Removal is not allowed, you can only replace the whole dictionary.
SqLineDictionary sequences() @property {
if (_sequences is null)
@@ -624,7 +624,7 @@ class SamHeader {
sink.write(to!string(sorting_order));
}
sink.write('\n');
-
+
for (size_t i = 0; i < sequences.length; i++) {
auto sq_line = getSequence(i);
sq_line.toSam(sink);
@@ -713,7 +713,7 @@ class SamHeader {
/// Packs message in the following format:
/// $(BR)
/// MsgPack array with elements
- /// $(OL
+ /// $(OL
/// $(LI format version - string)
/// $(LI sorting order - string)
/// $(LI @SQ lines - array of dictionaries)
@@ -789,7 +789,7 @@ unittest {
dict["zzz"] = zzz;
header.sequences = dict;
- assert(header.text ==
+ assert(header.text ==
"@HD\tVN:1.4\tSO:coordinate\n@SQ\tSN:yay\tLN:111\n@SQ\tSN:zzz\tLN:222\tUR:ftp://nyan.cat\n");
assert(header.sequences == dict);
--
2.11.0
From 27cbaadf3707728f18621970ba60fe9a4d5755aa Mon Sep 17 00:00:00 2001
From: John Colvin <john.loughran.colvin@gmail.com>
Date: Fri, 16 Dec 2016 14:35:27 +0000
Subject: [PATCH 11/14] better .travis.yml, uses dub test and tests ldc
---
.travis.yml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index d7b3485..5a09379 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,3 +1,5 @@
language: d
-script:
-- rdmd -unittest -d test/unittests.d
+
+d:
+ - dmd
+ - ldc
--
2.11.0
From 468c01931dcdade9478c6849e85a105c8930c604 Mon Sep 17 00:00:00 2001
From: John Colvin <john.loughran.colvin@gmail.com>
Date: Fri, 16 Dec 2016 14:40:47 +0000
Subject: [PATCH 13/14] fix toJSON usage for new and old compilers
---
bio/sam/header.d | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bio/sam/header.d b/bio/sam/header.d
index df88d64..57054bf 100644
--- a/bio/sam/header.d
+++ b/bio/sam/header.d
@@ -707,7 +707,10 @@ class SamHeader {
JSONValue json;
json.object = result;
- sink.write(toJSON(json));
+ static if (__VERSION__ < 2072)
+ sink.write(toJSON(&json));
+ else
+ sink.write(toJSON(json));
}
/// Packs message in the following format:
--
2.11.0
From 815047a6f2ddbf2ae4aec9fcb32d624b543fd1d6 Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Tue, 28 Feb 2017 14:44:30 +0100
Subject: [PATCH] Add Meson build definition
---
meson.build | 127 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 127 insertions(+)
create mode 100644 meson.build
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,127 @@
+project('BioD', 'd')
+
+project_version = '0.1.0'
+project_soversion = '0'
+
+src_dir = include_directories('.')
+pkgc = import('pkgconfig')
+
+#
+# Dependencies
+#
+undead_dep = dependency('undead', version : '>=1.0.6')
+zlib_dep = dependency('zlib')
+
+#
+# Sources
+#
+biod_src = [
+ 'bio/bam/utils/value.d',
+ 'bio/bam/utils/samheadermerger.d',
+ 'bio/bam/utils/array.d',
+ 'bio/bam/utils/graph.d',
+ 'bio/bam/pileup.d',
+ 'bio/bam/readrange.d',
+ 'bio/bam/reader.d',
+ 'bio/bam/thirdparty/msgpack.d',
+ 'bio/bam/baifile.d',
+ 'bio/bam/iontorrent/flowcall.d',
+ 'bio/bam/iontorrent/flowindex.d',
+ 'bio/bam/splitter.d',
+ 'bio/bam/abstractreader.d',
+ 'bio/bam/bai/indexing.d',
+ 'bio/bam/bai/bin.d',
+ 'bio/bam/multireader.d',
+ 'bio/bam/reference.d',
+ 'bio/bam/md/operation.d',
+ 'bio/bam/md/core.d',
+ 'bio/bam/md/parse.d',
+ 'bio/bam/md/reconstruct.d',
+ 'bio/bam/tagvalue.d',
+ 'bio/bam/validation/alignment.d',
+ 'bio/bam/validation/samheader.d',
+ 'bio/bam/region.d',
+ 'bio/bam/randomaccessmanager.d',
+ 'bio/bam/referenceinfo.d',
+ 'bio/bam/constants.d',
+ 'bio/bam/snpcallers/maq.d',
+ 'bio/bam/snpcallers/simple.d',
+ 'bio/bam/read.d',
+ 'bio/bam/writer.d',
+ 'bio/bam/baseinfo.d',
+ 'bio/maf/reader.d',
+ 'bio/maf/parser.d',
+ 'bio/maf/block.d',
+ 'bio/core/utils/memoize.d',
+ 'bio/core/utils/algo.d',
+ 'bio/core/utils/stream.d',
+ 'bio/core/utils/zlib.d',
+ 'bio/core/utils/tmpfile.d',
+ 'bio/core/utils/roundbuf.d',
+ 'bio/core/utils/format.d',
+ 'bio/core/utils/bylinefast.d',
+ 'bio/core/utils/range.d',
+ 'bio/core/utils/switchendianness.d',
+ 'bio/core/utils/outbuffer.d',
+ 'bio/core/genotype.d',
+ 'bio/core/fasta.d',
+ 'bio/core/base.d',
+ 'bio/core/kmer.d',
+ 'bio/core/region.d',
+ 'bio/core/tinymap.d',
+ 'bio/core/sequence.d',
+ 'bio/core/bgzf/outputstream.d',
+ 'bio/core/bgzf/chunk.d',
+ 'bio/core/bgzf/inputstream.d',
+ 'bio/core/bgzf/constants.d',
+ 'bio/core/bgzf/block.d',
+ 'bio/core/bgzf/virtualoffset.d',
+ 'bio/core/bgzf/compress.d',
+ 'bio/core/call.d',
+ 'bio/sff/utils/roundup.d',
+ 'bio/sff/index.d',
+ 'bio/sff/readrange.d',
+ 'bio/sff/reader.d',
+ 'bio/sff/constants.d',
+ 'bio/sff/read.d',
+ 'bio/sff/writer.d',
+ 'bio/sam/utils/fastrecordparser.d',
+ 'bio/sam/utils/recordparser.d',
+ 'bio/sam/reader.d',
+ 'bio/sam/header.d'
+]
+
+#
+# Includes
+#
+install_subdir('bio/', install_dir: 'include/d/')
+
+#
+# Library and pkg-config
+#
+biod_lib = library('biod',
+ [biod_src],
+ include_directories: [src_dir],
+ dependencies: [undead_dep, zlib_dep],
+ install: true,
+ version: project_version,
+ soversion: project_soversion
+)
+pkgc.generate(name: 'biod',
+ libraries: biod_lib,
+ subdirs: 'd/',
+ version: project_version,
+ description: 'Bioinformatics library in D (utils for working with SAM, BAM, SFF formats).'
+)
+
+#
+# Tests
+#
+biod_test_exe = executable('biod_test',
+ ['test/unittests.d',
+ biod_src],
+ include_directories: [src_dir],
+ dependencies: [undead_dep, zlib_dep],
+ d_args: meson.get_compiler('d').unittest_args()
+)
+test('biod_tests', biod_test_exe)
Author: Matthias Klumpp <mak@debian.org>
Last-Update: Mon, 10 Apr 2017 03:49:19 +0200
Bug-Debian: https://bugs.debian.org/859688
Description: undead.stream uses ulong instead of size_t for positions,
so we do that too here to be compatible
--- a/bio/sff/read.d
+++ b/bio/sff/read.d
@@ -22,5 +22,5 @@ struct SffRead {
ushort clip_adapter_right;
/// Record start offset in the file
- size_t file_offset;
+ ulong file_offset; // undead.stream uses ulong instead of size_t for positions, so we do that too here to be compatible
}
From: Pjotr Prins <pjotr.public01@thebird.nl>
Date: Sat, 28 Jul 2018 00:05:29 +0000
Origin: https://github.com/biod/BioD/commit/dd07f3497979b5d7f32ad32476da5108ffc5121e
Bug-Debian: https://bugs.debian.org/907451
Subject: [PATCH] Fixes:
BioD/bio/maf/reader.d(53): Error: cannot implicitly convert expression `this._f.byLine(cast(Flag)true, '\x0a')` of type `ByLineImpl!(char, char)` to `ByLine!(char, char)`
See https://github.com/bioconda/bioconda-recipes/pull/8787#issuecomment-389195848
---
bio/maf/reader.d | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/bio/maf/reader.d b/bio/maf/reader.d
index 708c5b3..c57decd 100644
--- a/bio/maf/reader.d
+++ b/bio/maf/reader.d
@@ -1,6 +1,7 @@
/*
This file is part of BioD.
Copyright (C) 2013 Artem Tarasov <lomereiter@gmail.com>
+ Copyright (C) 2018 Pjotr Prins <pjotr.prins@thebird.nl>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
@@ -8,10 +9,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 +51,7 @@ struct MafBlockRange {
this(string fn) {
_f = File(fn);
- _lines = _f.byLine(KeepTerminator.yes);
+ _lines = cast(LineRange)_f.byLine(KeepTerminator.yes);
skipHeader();
popFront();
}
@@ -85,7 +86,7 @@ struct MafBlockRange {
///
class MafReader {
-
+
private string _fn;
///
Origin: https://github.com/biod/BioD/pull/38/commits/643b454f04f36d66c34304b7186a3d2c24fdf783
From: Matthias Klumpp <matthias@tenstral.net>
Date: Thu, 4 Oct 2018 14:33:37 +0200
Subject: [PATCH] trivial: Fix unittests
---
test/unittests.d | 1 +
1 file changed, 1 insertion(+)
diff --git a/test/unittests.d b/test/unittests.d
index d52fb687..263662af 100644
--- a/test/unittests.d
+++ b/test/unittests.d
@@ -22,6 +22,7 @@
*/
+import bio.bam.cigar;
import bio.bam.reader;
import bio.bam.writer;
import bio.sam.reader;
Origin: https://github.com/biod/BioD/pull/38/commits/ee9428fea0d240ad6a65892346ddc051e086af16
From: Matthias Klumpp <matthias@tenstral.net>
Date: Thu, 4 Oct 2018 14:35:02 +0200
Subject: [PATCH] meson: Include bio2 in libbiod build
---
meson.build | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 76da2a00..88f3bcc7 100644
--- a/meson.build
+++ b/meson.build
@@ -89,19 +89,33 @@ biod_src = [
'bio/sam/utils/recordparser.d',
'bio/sam/reader.d',
'bio/sam/header.d'
+
+bio2_src = [
+ 'bio2/bam/header.d',
+ 'bio2/bam/reader.d',
+ 'bio2/bam/writer.d',
+ 'bio2/bgzf.d',
+ 'bio2/bgzf_writer.d',
+ 'bio2/constants.d',
+ 'bio2/hashing.d',
+ 'bio2/logger.d',
+ 'bio2/pileup.d',
+ 'bio2/reads.d',
+ 'bio2/unpack.d'
]
#
# Includes
#
-install_subdir('bio/', install_dir: 'include/d/')
+install_subdir('bio/', install_dir: 'include/d/bio/')
+install_subdir('bio2/', install_dir: 'include/d/bio/')
#
# Library and pkg-config
#
biod_lib = library('biod',
- [biod_src],
include_directories: [src_dir],
+ [biod_src, bio2_src],
dependencies: [undead_dep, zlib_dep],
install: true,
version: project_version,
@@ -111,6 +125,7 @@ pkgc.generate(name: 'biod',
libraries: biod_lib,
subdirs: 'd/',
version: project_version,
+ subdirs: 'd/bio/',
description: 'Bioinformatics library in D (utils for working with SAM, BAM, SFF formats).'
)
@@ -121,6 +136,8 @@ biod_test_exe = executable('biod_test',
['test/unittests.d',
biod_src],
include_directories: [src_dir],
+ biod_src,
+ bio2_src],
dependencies: [undead_dep, zlib_dep],
d_args: meson.get_compiler('d').unittest_args()
)
From c059165f359327c5a67aadabe18d6016efb58780 Mon Sep 17 00:00:00 2001
From: Matthias Klumpp <matthias@tenstral.net>
Date: Thu, 4 Oct 2018 14:35:24 +0200
Subject: [PATCH] meson: Modernize Meson build definition
Origin: https://github.com/biod/BioD/pull/38/commits/c059165f359327c5a67aadabe18d6016efb58780
---
meson.build | 131 +++++++++++++++++++++++++++-------------------------
1 file changed, 67 insertions(+), 64 deletions(-)
diff --git a/meson.build b/meson.build
index 88f3bcc7..9d308efd 100644
--- a/meson.build
+++ b/meson.build
@@ -1,6 +1,9 @@
-project('BioD', 'd')
+project('BioD', 'd',
+ meson_version : '>=0.46',
+ license : 'MIT',
+ version : '0.2.2'
+)
-project_version = '0.1.0'
project_soversion = '0'
src_dir = include_directories('.')
@@ -16,79 +19,83 @@ zlib_dep = dependency('zlib')
# Sources
#
biod_src = [
- 'bio/bam/utils/value.d',
- 'bio/bam/utils/samheadermerger.d',
- 'bio/bam/utils/array.d',
- 'bio/bam/utils/graph.d',
- 'bio/bam/pileup.d',
- 'bio/bam/readrange.d',
- 'bio/bam/reader.d',
- 'bio/bam/thirdparty/msgpack.d',
+ 'bio/bam/abstractreader.d',
+ 'bio/bam/bai/bin.d',
'bio/bam/baifile.d',
+ 'bio/bam/bai/indexing.d',
+ 'bio/bam/baseinfo.d',
+ 'bio/bam/cigar.d',
+ 'bio/bam/constants.d',
'bio/bam/iontorrent/flowcall.d',
'bio/bam/iontorrent/flowindex.d',
- 'bio/bam/splitter.d',
- 'bio/bam/abstractreader.d',
- 'bio/bam/bai/indexing.d',
- 'bio/bam/bai/bin.d',
- 'bio/bam/multireader.d',
- 'bio/bam/reference.d',
- 'bio/bam/md/operation.d',
'bio/bam/md/core.d',
+ 'bio/bam/md/operation.d',
'bio/bam/md/parse.d',
'bio/bam/md/reconstruct.d',
- 'bio/bam/tagvalue.d',
- 'bio/bam/validation/alignment.d',
- 'bio/bam/validation/samheader.d',
- 'bio/bam/region.d',
+ 'bio/bam/multireader.d',
+ 'bio/bam/pileup.d',
'bio/bam/randomaccessmanager.d',
+ 'bio/bam/read.d',
+ 'bio/bam/reader.d',
+ 'bio/bam/readrange.d',
+ 'bio/bam/reference.d',
'bio/bam/referenceinfo.d',
- 'bio/bam/constants.d',
+ 'bio/bam/region.d',
'bio/bam/snpcallers/maq.d',
'bio/bam/snpcallers/simple.d',
- 'bio/bam/read.d',
+ 'bio/bam/splitter.d',
+ 'bio/bam/tagvalue.d',
+ 'bio/bam/thirdparty/msgpack.d',
+ 'bio/bam/utils/array.d',
+ 'bio/bam/utils/graph.d',
+ 'bio/bam/utils/samheadermerger.d',
+ 'bio/bam/utils/value.d',
+ 'bio/bam/validation/alignment.d',
+ 'bio/bam/validation/samheader.d',
'bio/bam/writer.d',
- 'bio/bam/baseinfo.d',
- 'bio/maf/reader.d',
- 'bio/maf/parser.d',
- 'bio/maf/block.d',
- 'bio/core/utils/memoize.d',
- 'bio/core/utils/algo.d',
- 'bio/core/utils/stream.d',
- 'bio/core/utils/zlib.d',
- 'bio/core/utils/tmpfile.d',
- 'bio/core/utils/roundbuf.d',
- 'bio/core/utils/format.d',
- 'bio/core/utils/bylinefast.d',
- 'bio/core/utils/range.d',
- 'bio/core/utils/switchendianness.d',
- 'bio/core/utils/outbuffer.d',
- 'bio/core/genotype.d',
- 'bio/core/fasta.d',
'bio/core/base.d',
- 'bio/core/kmer.d',
- 'bio/core/region.d',
- 'bio/core/tinymap.d',
- 'bio/core/sequence.d',
- 'bio/core/bgzf/outputstream.d',
+ 'bio/core/bgzf/block.d',
'bio/core/bgzf/chunk.d',
- 'bio/core/bgzf/inputstream.d',
+ 'bio/core/bgzf/compress.d',
'bio/core/bgzf/constants.d',
- 'bio/core/bgzf/block.d',
+ 'bio/core/bgzf/inputstream.d',
+ 'bio/core/bgzf/outputstream.d',
'bio/core/bgzf/virtualoffset.d',
- 'bio/core/bgzf/compress.d',
'bio/core/call.d',
- 'bio/sff/utils/roundup.d',
- 'bio/sff/index.d',
- 'bio/sff/readrange.d',
- 'bio/sff/reader.d',
- 'bio/sff/constants.d',
- 'bio/sff/read.d',
- 'bio/sff/writer.d',
+ 'bio/core/fasta.d',
+ 'bio/core/fastq.d',
+ 'bio/core/genotype.d',
+ 'bio/core/kmer.d',
+ 'bio/core/region.d',
+ 'bio/core/sequence.d',
+ 'bio/core/tinymap.d',
+ 'bio/core/utils/algo.d',
+ 'bio/core/utils/bylinefast.d',
+ 'bio/core/utils/exception.d',
+ 'bio/core/utils/format.d',
+ 'bio/core/utils/memoize.d',
+ 'bio/core/utils/outbuffer.d',
+ 'bio/core/utils/range.d',
+ 'bio/core/utils/roundbuf.d',
+ 'bio/core/utils/stream.d',
+ 'bio/core/utils/switchendianness.d',
+ 'bio/core/utils/tmpfile.d',
+ 'bio/core/utils/zlib.d',
+ 'bio/maf/block.d',
+ 'bio/maf/parser.d',
+ 'bio/maf/reader.d',
+ 'bio/sam/header.d',
+ 'bio/sam/reader.d',
'bio/sam/utils/fastrecordparser.d',
'bio/sam/utils/recordparser.d',
- 'bio/sam/reader.d',
- 'bio/sam/header.d'
+ 'bio/sff/constants.d',
+ 'bio/sff/index.d',
+ 'bio/sff/read.d',
+ 'bio/sff/reader.d',
+ 'bio/sff/readrange.d',
+ 'bio/sff/utils/roundup.d',
+ 'bio/sff/writer.d'
+]
bio2_src = [
'bio2/bam/header.d',
@@ -114,18 +121,16 @@ install_subdir('bio2/', install_dir: 'include/d/bio/')
# Library and pkg-config
#
biod_lib = library('biod',
- include_directories: [src_dir],
[biod_src, bio2_src],
dependencies: [undead_dep, zlib_dep],
install: true,
- version: project_version,
+ version: meson.project_version(),
soversion: project_soversion
)
pkgc.generate(name: 'biod',
libraries: biod_lib,
- subdirs: 'd/',
- version: project_version,
subdirs: 'd/bio/',
+ version: meson.project_version(),
description: 'Bioinformatics library in D (utils for working with SAM, BAM, SFF formats).'
)
@@ -134,11 +139,9 @@ pkgc.generate(name: 'biod',
#
biod_test_exe = executable('biod_test',
['test/unittests.d',
- biod_src],
- include_directories: [src_dir],
biod_src,
bio2_src],
dependencies: [undead_dep, zlib_dep],
- d_args: meson.get_compiler('d').unittest_args()
+ d_unittest: true
)
test('biod_tests', biod_test_exe)
# fix_deprecated_imports.patch
0002-improved-big-endian-support.patch
0003-include-the-AH-header-tag-to-SQ-lines.patch
0004-use-consistent-naming-21.patch
0005-fixes-lomereiter-sambamba-244.patch
0006-switch-to-undead.stream.patch
0007-std.c-core.stdc.patch
0008-fix-deprecations-and-some-warnings.patch
0009-fix-toHash-signature.patch
0011-better-.travis.yml-uses-dub-test-and-tests-ldc.patch
0013-fix-toJSON-usage-for-new-and-old-compilers.patch
0014-Add-compareCoordinatesAndStrand-to-fix-sorting-test-.patch
0015-Add-Meson-build-definition.patch
0016-fix-type-conversion.patch
0017_fix_expression_conversion.patch
Author: Andreas Tille <tille@debian.org>
Last-Update: Sat, 25 Feb 2017 20:34:50 +0100
Description: Fix deprecated imports
--- a/bio/bam/bai/indexing.d
+++ b/bio/bam/bai/indexing.d
@@ -35,7 +35,7 @@ import std.array;
import std.algorithm;
import std.system;
import std.exception;
-import std.c.string;
+import core.std.c.string;
// Suppose we have an alignment which covers bases on a reference,
// starting from one position and ending at another position.
--- a/bio/bam/thirdparty/msgpack.d
+++ b/bio/bam/thirdparty/msgpack.d
@@ -82,7 +82,7 @@ static if (real.sizeof == double.sizeof)
import std.numeric;
}
-version(unittest) import std.file, std.c.string;
+version(unittest) import std.file, core.std.c.string;
@trusted:
--- a/bio/bam/utils/array.d
+++ b/bio/bam/utils/array.d
@@ -23,7 +23,7 @@
*/
module bio.bam.utils.array;
-import std.c.string;
+import core.std.c.string;
import std.traits;
/// Modifies array in-place so that $(D slice) is replaced by
--- a/bio/core/utils/bylinefast.d
+++ b/bio/core/utils/bylinefast.d
@@ -6,7 +6,7 @@ module bio.core.utils.bylinefast;
import std.stdio;
import std.string: indexOf;
-import std.c.string: memmove;
+import core.std.c.string: memmove;
/**
Reads by line in an efficient way (10 times faster than File.byLine from std.stdio).
--- a/bio/core/utils/format.d
+++ b/bio/core/utils/format.d
@@ -34,8 +34,8 @@
*/
module bio.core.utils.format;
-import std.c.stdio;
-import std.c.stdlib;
+import core.stdc.stdio;
+import core.stdc.stdlib;
import std.string;
import std.traits;
import std.array;
@@ -161,7 +161,7 @@ private {
if (isSomeString!T)
{
auto str = cast(const(char)[])s;
- std.c.string.memcpy(sink, str.ptr, str.length);
+ core.std.c.string.memcpy(sink, str.ptr, str.length);
sink += str.length;
}
--- a/bio/sam/reader.d
+++ b/bio/sam/reader.d
@@ -49,7 +49,7 @@ import std.typecons;
import std.parallelism;
import std.process;
import std.exception;
-import std.c.string;
+import core.std.c.string;
BamRead _parseSamRecord(Tuple!(char[], SamReader, OutBuffer) t) {
auto r = parseAlignmentLine(cast(string)t[0], t[1]._header, t[2]);