Exemplo n.º 1
0
def test_plot_multiple(tmpdir, basictrees, with_ete3):
    plot = Plot(dummy=not with_ete3,
                output=str(tmpdir.join('test')),
                height=600,
                width=800,
                multiple=True)
    list(plot.consume(basictrees))
Exemplo n.º 2
0
def test_plot_annotated(tmpdir, basictrees, with_ete3):
    annotated_trees = build_pipeline(
        "annotate --f tests/argfiles/annotation.csv -k taxon",
        source=basictrees)
    plot = Plot(output=str(tmpdir.join('test')),
                attribute="f1",
                dummy=not with_ete3)
    list(plot.consume(annotated_trees))
Exemplo n.º 3
0
def test_plot(dummy=False):

    lines = fileinput.input("tests/treefiles/basic.trees")
    trees = NewickParser().consume(lines)
    with tempfile.NamedTemporaryFile() as fp:
        plot = Plot(dummy=dummy, output=fp.name, height=600, width=800)
        for x in plot.consume(trees):
            pass
    lines.close()
Exemplo n.º 4
0
def test_plot_annotated(dummy=False):

    lines = fileinput.input("tests/treefiles/basic.trees")
    trees = NewickParser().consume(lines)
    annotated_trees = build_pipeline(
        "annotate --f tests/argfiles/annotation.csv -k taxon", source=trees)
    with tempfile.NamedTemporaryFile() as fp:
        plot = Plot(output=fp.name, attribute="f1", dummy=dummy)
        for x in plot.consume(annotated_trees):
            pass
    lines.close()