def test_run_sambamba(tmpdir, bed_path, bam_path): out_path = tmpdir.join('ccds.coverage.bed') run_sambamba(bam_path, bed_path, outfile=str(out_path), cov_thresholds=THRESHOLDS) assert out_path.exists()
def test_run_sambamba_missing(tmpdir, reset_path, bed_path, bam_path): out_path = tmpdir.join('ccds.coverage.bed') with pytest.raises(OSError): run_sambamba(bam_path, bed_path, outfile=str(out_path), cov_thresholds=THRESHOLDS)
def sambamba(context, bam_file, regions, cov_thresholds, outfile): """Run Sambamba from chanjo.""" LOG.info("Running chanjo sambamba") try: run_sambamba(bam_file, regions, outfile, cov_thresholds) except Exception: LOG.exception('something went really wrong :_(') context.abort()