File tree Expand file tree Collapse file tree 8 files changed +284
-120
lines changed Expand file tree Collapse file tree 8 files changed +284
-120
lines changed Original file line number Diff line number Diff line change 55 - nightly
66env :
77 global :
8- secure : ioWAhmR9VNa96Zn3UvY46bzys5LY6rHezT/nxsX6Wc0tZ3s/pk45wRKl9mU+oX+29EXMl2EXZZzsUlmY9AWNS34uQdBJ5HB68k2l2Cl44f/R4fQiFbkucCaCuTLDDshRsQInHTrsIjiB0tvjCG1tkNWQlgDIB4yeqPcL+YrmeMs=
8+ - secure : ioWAhmR9VNa96Zn3UvY46bzys5LY6rHezT/nxsX6Wc0tZ3s/pk45wRKl9mU+oX+29EXMl2EXZZzsUlmY9AWNS34uQdBJ5HB68k2l2Cl44f/R4fQiFbkucCaCuTLDDshRsQInHTrsIjiB0tvjCG1tkNWQlgDIB4yeqPcL+YrmeMs=
9+ - RUST_BACKTRACE=1
Original file line number Diff line number Diff line change 22All notable changes to this project will be documented in this file.
33This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
44
5+ ## [ 0.10.0] - 2016-11-10
6+ ### Added
7+ - Prelude module to easily import all relevant traits.
8+ ### Changed
9+ - fine-grained constructors for STDIN/STDOUT, paths and URLs
10+ - better template handling with bam files
11+
12+
513## [ 0.9.0] - 2016-11-02
614### Changed
715- improved genotype handling
Original file line number Diff line number Diff line change 11[package ]
22name = " rust-htslib"
3- version = " 0.9 .0"
3+ version = " 0.10 .0"
44authors = [" Christopher Schröder <christopher.schroeder@tu-dortmund.de>" , " Johannes Köster <johannes.koester@tu-dortmund.de>" ]
55build = " build.rs"
66description = " This library provides HTSlib bindings and a high level Rust API for reading and writing BAM files."
@@ -17,6 +17,7 @@ itertools = "=0.4.*"
1717quick-error = " 1.1.*"
1818newtype_derive = " 0.1.*"
1919custom_derive = " 0.1.*"
20+ url = " 1.2.*"
2021ieee754 = " 0.1"
2122lazy_static = " 0.1.*"
2223
Original file line number Diff line number Diff line change 33// This file may not be copied, modified, or distributed
44// except according to those terms.
55
6+ use bam:: HeaderView ;
7+
68
79/// A BAM header.
810pub struct Header {
@@ -16,6 +18,10 @@ impl Header {
1618 Header { records : Vec :: new ( ) }
1719 }
1820
21+ pub fn from_template ( header : & HeaderView ) -> Self {
22+ Header { records : vec ! [ header. as_bytes( ) . to_owned( ) ] }
23+ }
24+
1925 /// Add a record to the header.
2026 pub fn push_record ( & mut self , record : & HeaderRecord ) -> & mut Self {
2127 self . records . push ( record. to_bytes ( ) ) ;
You can’t perform that action at this time.
0 commit comments