Skip to content

Commit bdab170

Browse files
committed
update merge_pg_results.py to allow for reference proteomes
1 parent e442e4d commit bdab170

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
sphinx
22
sphinx-click
3-
pandas
4-
numpy
5-
click
6-
tqdm
7-
numba
8-
marsilea
9-
matplotlib
3+
pandas>=2.2.3
4+
numpy>=2.2.6
5+
click>=8.2.1
6+
tqdm>=4.67.1
7+
numba>=0.61.2
8+
marsilea>=0.5.3
9+
matplotlib>=3.10.3

src/tcdo_pg_tools/merge_pg_results.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def merge_pg_results(input_csv, info_table, merged_fasta, upset, upset_path, uni
112112
"unique_protein_id": f"PG{i}", # give protein a unique identifier
113113
"samples": samples,
114114
"conditions": conditions,
115-
"sample_count": len(group)
115+
"sample_count": len(set(group["sample"]))
116116
})
117117
i = i+1
118118
# write dataframe to tsv
@@ -130,4 +130,5 @@ def merge_pg_results(input_csv, info_table, merged_fasta, upset, upset_path, uni
130130
# plot upset plot:
131131
if upset:
132132
plot_upset(countdat, upset_path)
133-
return
133+
if __name__ == '__main__':
134+
merge_pg_results()

0 commit comments

Comments
 (0)