Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #61 (3) Examine result file of cljam level test #70

Merged
merged 1 commit into from
Apr 29, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions test/cljam/t_cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
(:require [clojure.test :refer :all]
[cljam.t-common :refer :all]
[clojure.java.io :as io]
[cljam.cli :as cli])
[cljam.cli :as cli]
[cljam.io :as cio]
[cljam.bam :as bam])
(:import [java.io PrintStream]))

(defmacro with-out-file
Expand Down Expand Up @@ -132,8 +134,10 @@
(with-out-file temp-out (cli/level [test-bam-file temp-bam]))))
(is (not-throw? (with-out-file temp-out (cli/level [test-sorted-bam-file
temp-bam]))))
;; TODO: examine contents of temp-bam
))
(with-open [rdr (bam/reader temp-bam :ignore-index true)]
(is (= (map #(first (keep :LV (:options %)))
(cio/read-alignments rdr))
test-sorted-bam-levels)))))

(deftest about-run
(with-before-after {:before (prepare-cache!)
Expand Down
14 changes: 14 additions & 0 deletions test/cljam/t_common.clj
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,20 @@
{:data [1 0 0 0 11 0 0 0 3 30 73 18 1 0 0 0 24 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 120 53 0 -128 1 0 0 17 -127 24 -127 20 -126 -127 33 65 66 17 40 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30], :size 75}
{:data [1 0 0 0 13 0 0 0 3 30 73 18 1 0 0 0 23 0 0 0 -1 -1 -1 -1 -1 -1 -1 -1 0 0 0 0 120 54 0 112 1 0 0 -127 24 -127 20 -126 -127 33 65 66 17 40 16 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30], :size 74}])

(def test-sorted-bam-levels
[{:type "i", :value 0}
{:type "i", :value 1}
{:type "i", :value 2}
{:type "i", :value 2}
{:type "i", :value 0}
{:type "i", :value 0}
{:type "i", :value 0}
{:type "i", :value 1}
{:type "i", :value 2}
{:type "i", :value 3}
{:type "i", :value 4}
{:type "i", :value 5}])

(def test-fa
[{:rname "ref", :offset 5, :seq "AGCATGTTAGATAAGATAGCTGTGCTAGTAGGCAGTCAGCGCCAT", :blen 45}
{:rname "ref2", :offset 57, :seq "aggttttataaaacaattaagtctacagagcaactacgcg", :blen 40}])
Expand Down