Skip to content

Commit

Permalink
Include genotype quality in output Ensemble called VCFs. Thanks to Sh…
Browse files Browse the repository at this point in the history
…alabh Suman
  • Loading branch information
chapmanb committed Jan 28, 2014
1 parent c4913b9 commit 3cff8fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject bcbio.variation "0.1.3"
(defproject bcbio.variation "0.1.4-SNAPSHOT"
:description "Toolkit to analyze genomic variation data, built on the GATK with Clojure"
:license {:name "MIT" :url "http://www.opensource.org/licenses/mit-license.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
Expand Down
4 changes: 2 additions & 2 deletions src/bcbio/variation/recall.clj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
:call-type (:type g)
:ref-allele (:ref-allele vc)
:alleles (sort-by allele-order (:alleles g))
:attributes (select-keys (:attributes g) ["PL" "DP" "AD" "PVAL"])
:attributes (select-keys (:attributes g) ["PL" "DP" "AD" "PVAL" "GQ"])
:has-likelihood (if (seq (get-in g [:attributes "PL"])) 1 0)
:attr-count (+ (if (seq (get-in g [:attributes "PL"])) 1 0)
(if (seq (get-in g [:attributes "PVAL"])) 1 0)
Expand Down Expand Up @@ -128,7 +128,7 @@
(.attributes (-> (map :attributes (reverse other-vcs))
(#(apply merge %))
(assoc "set" (update-set-info (get-in vc [:attributes "set"]) calls))))
(.genotypes (gvc/create-genotypes most-likely-gs :attrs #{"PL" "PVAL" "DP" "AD" "AO"}))
(.genotypes (gvc/create-genotypes most-likely-gs :attrs #{"PL" "PVAL" "DP" "AD" "AO" "GQ"}))
.make))))

(defn- recall-w-consensus
Expand Down
1 change: 1 addition & 0 deletions src/bcbio/variation/variantcontext.clj
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@
[gs & {:keys [attrs]}]
(let [all-attrs [["PL" seq (fn [x _ v] (.PL x (int-array v)))]
["PVAL" identity (fn [x k v] (.attribute x k v))]
["GQ" identity (fn [x _ v] (.GQ x v))]
["DP" identity (fn [x _ v] (.DP x v))]
["AD" seq (fn [x _ v] (.AD x (int-array v)))]
["AO" identity (fn [x a v] (.attribute x a v))]]]
Expand Down

0 comments on commit 3cff8fe

Please sign in to comment.