 (defn matrix3 [db]
   (ct/testing "cgdata genomic matrix"
     (loader db detector docroot "test/cavm/test_inputs/cgdata_matrix")
-    (let [exp (cdb/run-query db {:select [:name] :from [:experiments]})
-          samples (cdb/run-query db {:select [:name] :from [:exp_samples] :order-by [:i]})
-          probes (cdb/run-query db {:select [:*] :from [:probes]})]
+    (let [exp (cdb/run-query db {:select [:name] :from [:dataset]})
+          samples (cdb/run-query db {:select [:name] :from [:sample] :order-by [:i]})
+          probes (cdb/run-query db {:select [:*] :from [:field]})]
       (ct/is (= exp [{:NAME "cgdata_matrix"}]))
       (ct/is (= samples
                 [{:NAME "sample1"}

(defn probemap1 [db]
  (ct/testing "cgdata probemap"
    (loader db detector docroot "test/cavm/test_inputs/probes")
    (let [probemap (cdb/run-query db {:select [:name] :from [:probemaps]})
          probes (cdb/run-query db {:select [:*] :from [:probemap_probes]})]
      (ct/is (= probemap [{:NAME "probes"}]))
      (ct/is (= probes
                [{:PROBE "probe1" :ID 1 :PROBEMAPS_ID 1}
                 {:PROBE "probe2" :ID 2 :PROBEMAPS_ID 1}
                 {:PROBE "probe3" :ID 3 :PROBEMAPS_ID 1}
                 {:PROBE "probe4" :ID 4 :PROBEMAPS_ID 1}
                 {:PROBE "probe5" :ID 5 :PROBEMAPS_ID 1}
                 {:PROBE "probe6" :ID 6 :PROBEMAPS_ID 1}
                 {:PROBE "probe7" :ID 7 :PROBEMAPS_ID 1}
                 {:PROBE "probe8" :ID 8 :PROBEMAPS_ID 1}
                 {:PROBE "probe9" :ID 9 :PROBEMAPS_ID 1}])))))


(defn detect-cgdata-clinical [db]

                 {:NAME "sample3"}
                 {:NAME "sample4"}]))
      (ct/is (= probes
                [{:NAME "probe1" :ID 1 :DATASET_ID 1}
                 {:NAME "probe2" :ID 2 :DATASET_ID 1}
                 {:NAME "probe3" :ID 3 :DATASET_ID 1}
                 {:NAME "probe4" :ID 4 :DATASET_ID 1}
                 {:NAME "probe5" :ID 5 :DATASET_ID 1} ])))))

(defn detect-cgdata-genomic [db]
  (ct/testing "detect cgdata genomic"
