Skip to content

Commit

Permalink
adding sig file
Browse files Browse the repository at this point in the history
  • Loading branch information
mlupei committed Feb 20, 2024
1 parent e443acc commit 2f76a4f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions tests/test_y_integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,23 @@ def test_run_yacht():

assert exists('result.xlsx')

def test_run_yach_sig():
cmd = "yacht run --json gtdb_ani_thresh_0.95_config.json --sample_file 'tests/testdata/sample.sig' --significance 0.99 --min_coverage_list 1 0.6 0.2 0.1 --out ./result_sig.xlsx"
def test_run_train_sig():
ksize = '31'
ani_thresh = '0.95'
prefix = 'gtdb_ani_thresh_0.95'
config_file = f'{prefix}_config.json'
processed_manifest_file = f'{prefix}_processed_manifest.tsv'
intermediate_files_dir = f'{prefix}_intermediate_files'
cmd = "yacht train --ref_file 'tests/testdata/sample.sig' --ksize 31 --prefix 'gtdb_ani_thresh_0.95' --ani_thresh 0.95 --outdir ./ --force"
res = subprocess.run(cmd, shell=True, check=True)
assert res.returncode == 0

assert exists('result_sig.xlsx')
assert os.path.isfile(config_file)
assert os.path.isfile(processed_manifest_file)
assert os.path.isdir(intermediate_files_dir)

with open(config_file, 'r') as f:
config = json.load(f)
assert config['ksize'] == int(ksize)
assert config['ani_thresh'] == float(ani_thresh)

2 changes: 1 addition & 1 deletion yacht/make_training_data_from_sketches.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def main(args):
if file_extension == '.sig':
# Proceed with .sig file processing directly (placeholder)
print(f"Proceed with .sig file processing for: {ref_file}")
path_to_temp_dir= os.path.dirname(ref_file)
path_to_temp_dir= os.path.dirname(ref_file)+"/sample.sig/"
if file_extension == '.zip':
# Handle other supported non-zip files if necessary
print(f"Proceed with processing for other file type: {ref_file}")
Expand Down

0 comments on commit 2f76a4f

Please sign in to comment.