Beispiel #1
0
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("tool", type=str)
    parser.add_argument("job_order", type=str)
    parser.add_argument("--conformance-test", action="store_true")
    args = parser.parse_args()

    print json.dumps(cli.gen_cli(from_url(args.tool), from_url(args.job_order)))
Beispiel #2
0
def run_tests(doc_path, tool_key='tool', test_key='tests'):
    doc = from_url(doc_path)
    tests = doc[test_key]
    for test in tests:
        tool = test.get(tool_key)
        if test_cmd_line(tool, test.get('test_job'), test):
            print 'Test %s completed successfully!' % test.get('id')
        else:
            print 'Test %s completed failed!' % test.get('id')
Beispiel #3
0
def test_tmap_mapall():
    path = os.path.join(os.path.dirname(__file__), '../examples/tmap.yml')
    doc = from_url(path)
    tool, job = doc['mapall'], doc['exampleJob']
    print(gen_cli(tool, job))
Beispiel #4
0
def test_bwa_mem():
    path = os.path.join(os.path.dirname(__file__), '../examples/bwa-mem.yml')
    doc = from_url(path)
    tool, job = doc['tool'], doc['job']
    print(gen_cli(tool, job))
Beispiel #5
0
def test_tmap_mapall():
    path = os.path.join(os.path.dirname(__file__), "../examples/tmap.yml")
    doc = from_url(path)
    tool, job = doc["mapall"], doc["exampleJob"]
    print gen_cli(tool, job)
Beispiel #6
0
def test_bwa_mem():
    path = os.path.join(os.path.dirname(__file__), "../examples/bwa-mem.yml")
    doc = from_url(path)
    tool, job = doc["tool"], doc["job"]
    print gen_cli(tool, job)
Beispiel #7
0
def cmd_line(doc_path, tool_key='tool', job_key='job'):
    doc = from_url(doc_path)
    tool, job = doc[tool_key], doc[job_key]
    return Adapter(tool).cmd_line(job)
Beispiel #8
0
def test_tmap_mapall():
    path = os.path.join(os.path.dirname(__file__), '../examples/tmap.yml')
    doc = from_url(path)
    tool, job = doc['mapall'], doc['exampleJob']
    print(gen_cli(tool, job))
Beispiel #9
0
def test_bwa_mem():
    path = os.path.join(os.path.dirname(__file__), '../examples/bwa-mem.yml')
    doc = from_url(path)
    tool, job = doc['tool'], doc['job']
    print(gen_cli(tool, job))
Beispiel #10
0
def validate_all():
    validate_schema(TOOL_SCHEMA)
    validate_schema(META_SCHEMA)
    validate_tool(from_url('../examples/bwa-mem.yml')['tool'])
    validate_tool(from_url('../examples/tmap.yml')['mapall'])