Skip to content

Commit 20f2532

Browse files
committed
fixing glob pattern
1 parent 054f883 commit 20f2532

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "tcdo_pg_tools"
7-
version = "0.0.3"
7+
version = "0.0.3-beta"
88
description = "Commandline tools to support proteogenomics analyses at MSK TCDO and beyond"
99
readme = "README.rst"
1010
authors = [

src/tcdo_pg_tools/coverage_calculator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ def coverage_calculator(fragpipe_dir, enzymes, output_tsv, unique_proteins, uniq
8989
proteindat = pd.DataFrame()
9090
for i in np.arange(0, len(enzymes)):
9191
enzyme = enzymes[i]
92-
pattern = os.path.join(archive, f"{enzyme}**", "protein.tsv")
92+
pattern = os.path.join(archive, f"{enzyme}*","**", "protein.tsv")
9393
paths = bob.glob(pattern, recursive=True)
9494
assert len(paths) == 1, \
95-
f"multiple protein.tsv files returned for {enzyme}; check subdirectory naming scheme"
95+
f"multiple protein.tsv files returned for {enzyme}; fix subdirectory naming scheme"
9696
path = paths[0]
9797
df = pd.read_csv(path, sep="\t")
9898
df["enzyme"] = enzyme
@@ -102,7 +102,7 @@ def coverage_calculator(fragpipe_dir, enzymes, output_tsv, unique_proteins, uniq
102102
peptidedat = pd.DataFrame()
103103
for i in np.arange(0, len(enzymes)):
104104
enzyme = enzymes[i]
105-
pattern = os.path.join(archive, f"{enzyme}**", "peptide.tsv")
105+
pattern = os.path.join(archive, f"{enzyme}*","**", "peptide.tsv")
106106
paths = bob.glob(pattern, recursive=True)
107107
assert len(paths) == 1, \
108108
f"multiple peptide.tsv files returned for {enzyme}"

0 commit comments

Comments
 (0)