Skip to content

Commit

Permalink
refactor: Detect txt instead of tsv files
Browse files Browse the repository at this point in the history
- Will make it easier to integrate with existing nf-core modules
  • Loading branch information
jvfe committed Mar 30, 2024
1 parent 6d2947f commit 252cb8a
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion microview/file_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def find_reports(reports_path: Path, console) -> List[Sample]:
List[Sample]: List of samples, an object comprising two attributes,
one the report path, the other a string specifying the report type.
"""
file_paths: List[Path] = list(reports_path.glob("*tsv"))
file_paths: List[Path] = list(reports_path.glob("*txt"))
samples = detect_report_type(file_paths, console)
return samples

Expand Down
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ def all_sample_counts():

@pytest.fixture
def get_kraken_data():
return Path(__file__).parent.resolve() / "test_data" / "kraken_test.tsv"
return Path(__file__).parent.resolve() / "test_data" / "kraken_test.txt"


@pytest.fixture
def get_kaiju_data():
return Path(__file__).parent.resolve() / "test_data" / "kaiju_test.tsv"
return Path(__file__).parent.resolve() / "test_data" / "kaiju_test.txt"


@pytest.fixture
def get_centrifuge_data():
return Path(__file__).parent.resolve() / "test_data" / "centrifuge_test.tsv"
return Path(__file__).parent.resolve() / "test_data" / "centrifuge_test.txt"


@pytest.fixture
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/test_data/contrast_table.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sample,group
kaiju_test.tsv,one
kaiju_test_2.tsv,two
kaiju_test.txt,one
kaiju_test_2.txt,two
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 252cb8a

Please sign in to comment.