|
19 | 19 | [bcbio.variation.evaluate :only [calc-variant-eval-metrics]] |
20 | 20 | [bcbio.variation.filter :only [variant-filter variant-format-filter |
21 | 21 | pipeline-recalibration]] |
22 | | - [bcbio.variation.filter.intervals :only [combine-multiple-intervals]] |
23 | 22 | [bcbio.variation.multiple :only [prep-cmp-name-lookup pipeline-compare-multiple]] |
24 | 23 | [bcbio.variation.multisample :only [compare-two-vcf-flexible |
25 | 24 | multiple-samples?]] |
|
32 | 31 | [clj-yaml.core :as yaml] |
33 | 32 | [me.raynes.fs :as fs] |
34 | 33 | [lonocloud.synthread :as ->] |
| 34 | + [bcbio.align.interval :as ainterval] |
35 | 35 | [bcbio.run.fsp :as fsp] |
36 | 36 | [bcbio.run.itx :as itx] |
37 | 37 | [bcbio.run.broad :as broad] |
| 38 | + [bcbio.variation.filter.intervals :as fintervals] |
38 | 39 | [bcbio.variation.grade :as grade] |
39 | 40 | [bcbio.variation.phasing :as phasing] |
40 | 41 | [bcbio.variation.report :as report] |
|
46 | 47 | "Variant comparison producing 3 files: concordant and both directions discordant" |
47 | 48 | [sample call1 call2 ref & {:keys [out-dir intervals]}] |
48 | 49 | (let [base-dir (if (nil? out-dir) (fs/parent (:file call1)) out-dir) |
49 | | - ready-intervals (remove nil? (flatten [intervals (:intervals call1) |
50 | | - (:intervals call2)])) |
| 50 | + ready-intervals (ainterval/prep-multi [call1 call2] ref intervals out-dir) |
51 | 51 | sample (or sample (-> call1 :file gvc/get-vcf-header .getGenotypeSamples first))] |
52 | 52 | (if-not (fs/exists? base-dir) |
53 | 53 | (fs/mkdirs base-dir)) |
|
116 | 116 | (let [out-dir (get-in config [:dir :prep] (get-in config [:dir :out])) |
117 | 117 | transition (partial do-transition config) |
118 | 118 | align-bams (prepare-input-bams exp out-dir) |
119 | | - all-intervals (remove nil? (map :intervals (cons exp (:calls exp)))) |
| 119 | + all-intervals (ainterval/prep-multi (cons exp (:calls exp)) (:ref exp) out-dir) |
120 | 120 | start-vcfs (vec (map #(gatk-normalize % exp all-intervals out-dir transition) |
121 | 121 | (:calls exp))) |
122 | 122 | _ (transition :combine "Creating merged VCF files for all comparisons") |
|
148 | 148 | (let [out-dir (get-in config [:dir :prep] (get-in config [:dir :out])) |
149 | 149 | align-bams (remove nil? (map :align [c1 c2]))] |
150 | 150 | (when (and (:intervals exp) (seq align-bams)) |
151 | | - (combine-multiple-intervals (:intervals exp) align-bams (:ref exp) |
152 | | - :out-dir out-dir :name (:sample exp))))) |
| 151 | + (fintervals/combine-multiple (:intervals exp) align-bams (:ref exp) |
| 152 | + :out-dir out-dir :name (:sample exp))))) |
153 | 153 | (discordant-name [x] |
154 | 154 | (format "%s-discordant" (:name x))) |
155 | 155 | (zipmap-ordered [xs1 xs2] |
|
0 commit comments