Thomas 2 vuotta sitten
vanhempi
commit
8b6ffdbd09
3 muutettua tiedostoa jossa 11 lisäystä ja 8 poistoa
  1. 7 0
      Cargo.lock
  2. 2 0
      Cargo.toml
  3. 2 8
      src/lib.rs

+ 7 - 0
Cargo.lock

@@ -11,6 +11,12 @@ dependencies = [
  "memchr",
 ]
 
+[[package]]
+name = "anyhow"
+version = "1.0.80"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1"
+
 [[package]]
 name = "bio-types"
 version = "1.0.1"
@@ -252,6 +258,7 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
 name = "pileup"
 version = "0.1.0"
 dependencies = [
+ "anyhow",
  "rust-htslib",
 ]
 

+ 2 - 0
Cargo.toml

@@ -7,3 +7,5 @@ edition = "2021"
 
 [dependencies]
 rust-htslib = "0.44.1"
+anyhow = "^1.0.75"
+

+ 2 - 8
src/lib.rs

@@ -1,3 +1,5 @@
+use anyhow::{Result, Ok, Context};
+
 pub fn get_hts_nt_pileup(
     bam: &mut rust_htslib::bam::IndexedReader,
     chr: &str,
@@ -91,11 +93,3 @@ pub fn hts_base_at(
     }
     Ok(None)
 }
-
-#[cfg(test)]
-mod tests {
-    use super::*;
-
-    #[test]
-    fn it_works() {}
-}