Skip to content

Commit

Permalink
TST: Update test data and test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Aug 13, 2024
1 parent b0b2deb commit a148a7b
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 142,660 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2,490 changes: 0 additions & 2,490 deletions tests/data/ESC_metaSPAdes/assembly_graph_with_scaffolds.gfa

This file was deleted.

139,308 changes: 0 additions & 139,308 deletions tests/data/ESC_metaSPAdes/contigs.fasta

This file was deleted.

758 changes: 0 additions & 758 deletions tests/data/ESC_metaSPAdes/contigs.paths

This file was deleted.

75 changes: 0 additions & 75 deletions tests/data/ESC_metaSPAdes/initial_binning_res.csv

This file was deleted.

8 changes: 4 additions & 4 deletions tests/test_cli_graphbin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def runner():

def test_graphbin_run(runner, tmp_dir):
outpath = tmp_dir
graph = DATADIR / "ESC_metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
contigs = DATADIR / "ESC_metaSPAdes" / "contigs.fasta"
paths = DATADIR / "ESC_metaSPAdes" / "contigs.paths"
binned = DATADIR / "ESC_metaSPAdes" / "initial_binning_res.csv"
graph = DATADIR / "5G_metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
contigs = DATADIR / "5G_metaSPAdes" / "contigs.fasta"
paths = DATADIR / "5G_metaSPAdes" / "contigs.paths"
binned = DATADIR / "5G_metaSPAdes" / "initial_contig_bins.csv"
args = f"--assembler spades --graph {graph} --contigs {contigs} --paths {paths} --binned {binned} --output {outpath}".split()
r = runner.invoke(graphbin, args, catch_exceptions=False)
assert r.exit_code == 0, r.output
10 changes: 5 additions & 5 deletions tests/test_cli_graphbin2.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ def runner():

def test_graphbin2_run(runner, tmp_dir):
outpath = tmp_dir
graph = DATADIR / "Sim-5G+metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
contigs = DATADIR / "Sim-5G+metaSPAdes" / "contigs.fasta"
paths = DATADIR / "Sim-5G+metaSPAdes" / "contigs.paths"
binned = DATADIR / "Sim-5G+metaSPAdes" / "initial_contig_bins.csv"
abundance = DATADIR / "Sim-5G+metaSPAdes" / "abundance.abund"
graph = DATADIR / "5G_metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
contigs = DATADIR / "5G_metaSPAdes" / "contigs.fasta"
paths = DATADIR / "5G_metaSPAdes" / "contigs.paths"
binned = DATADIR / "5G_metaSPAdes" / "initial_contig_bins.csv"
abundance = DATADIR / "5G_metaSPAdes" / "abundance.abund"
args = f"--assembler spades --graph {graph} --contigs {contigs} --paths {paths} --binned {binned} --abundance {abundance} --output {outpath}".split()
r = runner.invoke(graphbin2, args, catch_exceptions=False)
assert r.exit_code == 0, r.output
Expand Down
8 changes: 4 additions & 4 deletions tests/test_cli_metacoag.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ def runner():

def test_metacoag_run(runner, tmp_dir):
outpath = tmp_dir
graph = DATADIR / "Sim-5G+metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
contigs = DATADIR / "Sim-5G+metaSPAdes" / "contigs.fasta"
paths = DATADIR / "Sim-5G+metaSPAdes" / "contigs.paths"
abundance = DATADIR / "Sim-5G+metaSPAdes" / "coverm_mean_coverage.tsv"
graph = DATADIR / "5G_metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
contigs = DATADIR / "5G_metaSPAdes" / "contigs.fasta"
paths = DATADIR / "5G_metaSPAdes" / "contigs.paths"
abundance = DATADIR / "5G_metaSPAdes" / "coverm_mean_coverage.tsv"
args = f"--assembler spades --graph {graph} --contigs {contigs} --paths {paths} --abundance {abundance} --output {outpath}".split()
r = runner.invoke(metacoag, args, catch_exceptions=False)
assert r.exit_code == 0, r.output
32 changes: 16 additions & 16 deletions tests/test_visualise.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,40 +31,40 @@ def runner():

def test_visualise_run(runner, tmp_dir):
outpath = tmp_dir
initial = DATADIR / "Sim-5G+metaSPAdes" / "metacoag_res.csv"
final = DATADIR / "Sim-5G+metaSPAdes" / "graphbin_res.csv"
graph = DATADIR / "Sim-5G+metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
paths = DATADIR / "Sim-5G+metaSPAdes" / "contigs.paths"
initial = DATADIR / "5G_metaSPAdes" / "metacoag_res.csv"
final = DATADIR / "5G_metaSPAdes" / "graphbin_res.csv"
graph = DATADIR / "5G_metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
paths = DATADIR / "5G_metaSPAdes" / "contigs.paths"
args = f"--assembler spades --initial {initial} --final {final} --graph {graph} --paths {paths} --output {outpath}".split()
r = runner.invoke(visualise, args, catch_exceptions=False)
assert r.exit_code == 0, r.output

def test_visualise_prefix(runner, tmp_dir):
outpath = tmp_dir
initial = DATADIR / "Sim-5G+metaSPAdes" / "metacoag_res.csv"
final = DATADIR / "Sim-5G+metaSPAdes" / "graphbin_res.csv"
graph = DATADIR / "Sim-5G+metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
paths = DATADIR / "Sim-5G+metaSPAdes" / "contigs.paths"
initial = DATADIR / "5G_metaSPAdes" / "metacoag_res.csv"
final = DATADIR / "5G_metaSPAdes" / "graphbin_res.csv"
graph = DATADIR / "5G_metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
paths = DATADIR / "5G_metaSPAdes" / "contigs.paths"
args = f"--assembler spades --initial {initial} --final {final} --graph {graph} --paths {paths} --prefix test --output {outpath}".split()
r = runner.invoke(visualise, args, catch_exceptions=False)
assert r.exit_code == 0, r.output

def test_visualise_imgtype(runner, tmp_dir):
outpath = tmp_dir
initial = DATADIR / "Sim-5G+metaSPAdes" / "metacoag_res.csv"
final = DATADIR / "Sim-5G+metaSPAdes" / "graphbin_res.csv"
graph = DATADIR / "Sim-5G+metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
paths = DATADIR / "Sim-5G+metaSPAdes" / "contigs.paths"
initial = DATADIR / "5G_metaSPAdes" / "metacoag_res.csv"
final = DATADIR / "5G_metaSPAdes" / "graphbin_res.csv"
graph = DATADIR / "5G_metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
paths = DATADIR / "5G_metaSPAdes" / "contigs.paths"
args = f"--assembler spades --initial {initial} --final {final} --graph {graph} --paths {paths} --imgtype svg --output {outpath}".split()
r = runner.invoke(visualise, args, catch_exceptions=False)
assert r.exit_code == 0, r.output

def test_visualise_outdir(runner, tmp_dir):
outpath = tmp_dir / "testing"
initial = DATADIR / "Sim-5G+metaSPAdes" / "metacoag_res.csv"
final = DATADIR / "Sim-5G+metaSPAdes" / "graphbin_res.csv"
graph = DATADIR / "Sim-5G+metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
paths = DATADIR / "Sim-5G+metaSPAdes" / "contigs.paths"
initial = DATADIR / "5G_metaSPAdes" / "metacoag_res.csv"
final = DATADIR / "5G_metaSPAdes" / "graphbin_res.csv"
graph = DATADIR / "5G_metaSPAdes" / "assembly_graph_with_scaffolds.gfa"
paths = DATADIR / "5G_metaSPAdes" / "contigs.paths"
args = f"--assembler spades --initial {initial} --final {final} --graph {graph} --paths {paths} --output {outpath}".split()
r = runner.invoke(visualise, args, catch_exceptions=False)
assert r.exit_code == 0, r.output

0 comments on commit a148a7b

Please sign in to comment.