コード例 #1
0
def test_cmdline3():
    run_indir("rarify.py -g 3 -l testlist0 -s -o testlist0.rare.2s.png",
              TESTDIR)
    assert os.path.isfile(TESTDIR + "testlist0.rare.2s.png")
    os.remove(TESTDIR + "testlist0.rare.2s.png")
    run_indir("rarify.py -g 3 -l testlist0 -o testlist0.rare.2s.png", TESTDIR)
    assert os.path.isfile(TESTDIR + "testlist0.rare.2s.png")
    os.remove(TESTDIR + "testlist0.rare.2s.png")
コード例 #2
0
def test_cmdline1():
    run_indir("stratify.py -l testlist0 -g 0 -o testlist0.frac3.pdf", TESTDIR)
    assert os.path.isfile(TESTDIR + "testlist0.frac3.pdf")
    os.remove(TESTDIR + "testlist0.frac3.pdf")
    run_indir("stratify.py -l testlist0 -g 1 -o testlist0.size3.pdf", TESTDIR)
    assert os.path.isfile(TESTDIR + "testlist0.size3.pdf")
    os.remove(TESTDIR + "testlist0.size3.pdf")
    run_indir("stratify.py -l testlist0 -g 0 -s -o testlist0.frac3s.pdf",
              TESTDIR)
    assert os.path.isfile(TESTDIR + "testlist0.frac3s.pdf")
    os.remove(TESTDIR + "testlist0.frac3s.pdf")
    run_indir("stratify.py -l testlist0 -g 1 -s -o testlist0.size3s.pdf",
              TESTDIR)
    assert os.path.isfile(TESTDIR + "testlist0.size3s.pdf")
    os.remove(TESTDIR + "testlist0.size3s.pdf")
コード例 #3
0
def test_xlabel():
    run_indir("plotkmerspectrum.py --xlabel xlabel --ylabel ylabel fak-123", TESTDIR)
    assert os.path.isfile(TESTDIR + "fak-123.6.pdf")
    os.remove(TESTDIR + "fak-123.6.pdf")
コード例 #4
0
def test_counttoy_stream():
    run_indir("cat toy.fa | countkmer21.sh >  temp-toy-std.21", TESTDIR)
    assert os.path.isfile(TESTDIR + "temp-toy-std.21")
    os.remove(TESTDIR + "temp-toy-std.21")
コード例 #5
0
def test_counttoy():
    run_indir("countkmer21.sh toy.fa", TESTDIR)
    assert os.path.isfile(TESTDIR + "toy.fa.21")
    os.remove(TESTDIR + "toy.fa.21")
コード例 #6
0
def test_emptyfile():
    run_indir("plotkmerspectrum.py  emptyfile", TESTDIR)
    assert not os.path.isfile(TESTDIR + "emptyfile.21")
コード例 #7
0
def test_file_npo():
    run_indir("plotkmerspectrum.py test_1.npo", TESTDIR)
    assert os.path.isfile(TESTDIR + "test_1.npo.6.pdf")
    os.remove(TESTDIR + "test_1.npo.6.pdf")
コード例 #8
0
def test_file_contigstats():
    run_indir("plotkmerspectrum.py contigstats.txt", TESTDIR)
    assert os.path.isfile(TESTDIR + "contigstats.txt.6.pdf")
    os.remove(TESTDIR + "contigstats.txt.6.pdf")
コード例 #9
0
def test_many():
    run_indir("plotkmerspectrum.py fak-1 fak-2 fak-3 fak-0", TESTDIR)
コード例 #10
0
def test_list8():
    run_indir("plotkmerspectrum.py -l testlist8", TESTDIR)
コード例 #11
0
def test_empty2():
    run_indir("echo -n | countkmer21.sh > test-emptyinputx.21", TESTDIR)
#   creates an empty file
    assert os.stat(TESTDIR + "test-emptyinputx.21").st_size == 0
    os.remove(TESTDIR + "test-emptyinputx.21")
コード例 #12
0
def test_cmdline_xlabel_title():
    run_indir(
        "plotkmerspectrum.py -g 1 test00.21 -x xlabel -y ylabel -n Graph_title -s -o temptest00", TESTDIR)
    assert os.path.isfile(TESTDIR + "temptest00.1.pdf")
コード例 #13
0
def test_cmdline_pngout():
    run_indir("plotkmerspectrum.py -g 1 test00.21 -o temptest00 -w png", TESTDIR)
    assert os.path.isfile(TESTDIR + "temptest00.1.png")
コード例 #14
0
def test_cmdline_g0():
    run_indir("plotkmerspectrum.py -g 0 test00.21", TESTDIR)
    assert os.path.isfile(TESTDIR + "test00.21.0.pdf")
コード例 #15
0
def test_cmdline_gm1():
    run_indir("plotkmerspectrum.py -g -1 test00.21", TESTDIR)
    assert os.path.isfile(TESTDIR + "kmers.log")
コード例 #16
0
def test_title():
    run_indir("plotkmerspectrum.py -n 'fak-123 spectrum' fak-123", TESTDIR)
    assert os.path.isfile(TESTDIR + "fak-123.6.pdf")
    os.remove(TESTDIR + "fak-123.6.pdf")
コード例 #17
0
def test_cmdline_getmgr():
    run_indir("plotkmerspectrum.py -l mgrlist -i -g 6 -t mgm")
コード例 #18
0
def test_options():
    run_indir(
        "plotkmerspectrum.py -l testlist1 -s -x 'X label' -y 'Y label'", TESTDIR)
    assert os.path.isfile(TESTDIR + "testlist1.6.pdf")