 (defn matrix2 [db]
   (ct/testing "tsv matrix from file"
     (loader db detector docroot "test/cavm/test_inputs/matrix") ; odd that loader & detector both require docroot
-    (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 "matrix"}]))
       (ct/is (= samples
                 [{:NAME "sample1"}

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

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

(defn clinical1 [db]
  (ct/testing "cgdata clinical matrix"
    (loader db detector docroot "test/cavm/test_inputs/clinical_matrix")
    (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 "clinical_matrix"}]))
      (ct/is (= samples
                [{:NAME "sample1"}
