aboutsummaryrefslogtreecommitdiff
path: root/test/dev_tests.rb
blob: d63b8fe918168af6d7f211c1facfba22c89aeb5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
require 'minitest/autorun'
require 'lib/test-helpers'

class TestQuick < MiniTest::Test

  include TestHelpers

  def setup
  end

  def test_linear_model
    assert gemma("-g ./example/mouse_hs1940.geno.txt.gz \
           -p ./example/mouse_hs1940.pheno.txt \
           -n 1 \
           -a ./example/mouse_hs1940.anno.txt \
           -lm \
           -o mouse_hs1940_CD8_lm")

    expect('output/mouse_hs1940_CD8_lm.assoc.txt',[[2,1,"rs3707673"],
                                                   [2,10,"5.252187e-05"],
                                                   [3,9,"3.909916e-02"]])
  end

  def test_BXD
    assert gemma("-g ./example/BXD_geno.txt.gz \
           -p ./example/BXD_pheno.txt \
           -c ./example/BXD_covariates2.txt \
           -a ./example/BXD_snps.txt \
           -gk \
           -o BXD")

    assert gemma("-g ./example/BXD_geno.txt.gz \
           -p ./example/BXD_pheno.txt \
           -c ./example/BXD_covariates2.txt \
           -a ./example/BXD_snps.txt \
           -k ./output/BXD.cXX.txt \
           -lmm 2 -no-check -maf 0.1 \
           -o BXDLMM")

    expect("output/BXDLMM.assoc.txt",[[2,9,"1.234747e-01"]])
  end
end