Skip to content
This repository has been archived by the owner on Dec 27, 2021. It is now read-only.

Commit

Permalink
Merge branch 'master' of github.com:biod/BioD
Browse files Browse the repository at this point in the history
  • Loading branch information
pjotrp committed Jan 11, 2018
2 parents 45668d4 + 6bb0156 commit 5e56b2b
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 9 deletions.
1 change: 1 addition & 0 deletions bio/bam/baseinfo.d
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import bio.bam.read;
import bio.bam.tagvalue;
import bio.bam.iontorrent.flowcall;
import bio.bam.md.core;
import bio.bam.cigar;

import std.range;
import std.conv;
Expand Down
2 changes: 1 addition & 1 deletion bio/bam/read.d
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ private:
assert(n < 16);
// http://graphics.stanford.edu/~seander/bithacks.html#ConditionalSetOrClearBitsWithoutBranching
ushort mask = cast(ushort)(1 << n);
_flag = (_flag & ~mask) | ((-cast(int)b) & mask);
_flag = (_flag & ~cast(int)(mask)) | ((-cast(int)b) & mask);
}

// If _chunk is still a slice, not an array, duplicate it.
Expand Down
2 changes: 1 addition & 1 deletion bio/core/utils/format.d
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private {
char* wstr=str;

static if (isSigned!T) {
ulong uvalue = (value < 0) ? -value : value;
ulong uvalue = (value < 0) ? -cast(int)(value) : value;
} else {
ulong uvalue = value;
}
Expand Down
7 changes: 6 additions & 1 deletion examples/calculate_gc_content_from_reference.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// run example: rdmd -I.. calculate_gc_content_from_reference.d
// BioD depends on stream.d which is no longer included with phobos.
// To run this example from this directory,
// Clone the undead repository with
// git clone https://github.com:dlang/undeaD.git at the appropriate location and ensure
// it is available on your path
// Run example: rdmd -I.. -I../location_of_undead/src calculate_gc_content_from_reference.d

import bio.bam.reader;
import bio.bam.md.reconstruct : dna;
Expand Down
8 changes: 7 additions & 1 deletion examples/create_bam_from_scratch.d
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
// run example: rdmd -I.. create_bam_from_scratch.d
// BioD depends on stream.d which is no longer included with phobos.
// To run this example from this directory,
// Clone the undead repository with
// git clone https://github.com:dlang/undeaD.git at the appropriate location and ensure
// it is available on your path
// Run example: rdmd -I.. -I../location_of_undead/src create_bam_from_scratch.d

// 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 undead.stream, std.stdio;
import bio.bam.cigar;

void main() {
auto header = new SamHeader(); // First, create SAM header
Expand Down
7 changes: 6 additions & 1 deletion examples/iterate_tags.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// run example: rdmd -I.. iterate_tags.d
// BioD depends on stream.d which is no longer included with phobos.
// To run this example from this directory,
// Clone the undead repository with
// git clone https://github.com:dlang/undeaD.git at the appropriate location and ensure
// it is available on your path
// Run example: rdmd -I.. -I../location_of_undead/src iterate_tags.d

import bio.bam.reader, bio.bam.tagvalue;
import std.stdio, std.datetime;
Expand Down
7 changes: 6 additions & 1 deletion examples/make_pileup.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// run example: rdmd -I.. make_pileup.d
// BioD depends on stream.d which is no longer included with phobos.
// To run this example from this directory,
// Clone the undead repository with
// git clone https://github.com:dlang/undeaD.git at the appropriate location and ensure
// it is available on your path
// Run example: rdmd -I.. -I../location_of_undead/src make_pileup.d

import bio.bam.reader;
import bio.bam.pileup;
Expand Down
7 changes: 6 additions & 1 deletion examples/print_base_info.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// run example: rdmd -I.. print_base_info.d
// BioD depends on stream.d which is no longer included with phobos.
// To run this example from this directory,
// Clone the undead repository with
// git clone https://github.com:dlang/undeaD.git at the appropriate location and ensure
// it is available on your path
// Run example: rdmd -I.. -I../location_of_undead/src print_base_info.d

import bio.bam.reader;
import bio.bam.baseinfo;
Expand Down
7 changes: 6 additions & 1 deletion examples/read_bam_file.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// run example: rdmd -I.. example1.d
// BioD depends on stream.d which is no longer included with phobos.
// To run this example from this directory,
// Clone the undead repository with
// git clone https://github.com:dlang/undeaD.git at the appropriate location and ensure
// it is available on your path
// Run example: rdmd -I.. -I../location_of_undead/src read_bam_file.d

import bio.bam.reader;
import bio.bam.pileup;
Expand Down
7 changes: 6 additions & 1 deletion examples/transverse_multiple_bam_files.d
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
// run example: rdmd -I.. transverse_multiple_bam_files.d
// BioD depends on stream.d which is no longer included with phobos.
// To run this example from this directory,
// Clone the undead repository with
// git clone https://github.com:dlang/undeaD.git at the appropriate location and ensure
// it is available on your path
// Run example: rdmd -I.. -I../location_of_undead/src transverse_multiple_bam_files.d

import bio.bam.multireader;
import bio.bam.read : compareCoordinates;
Expand Down

0 comments on commit 5e56b2b

Please sign in to comment.