Skip to content

Commit 63d5ffd

Browse files
committed
bug fix for merge-pg-results when multiple fasta files are provided without accompanying philosopher results
1 parent f027134 commit 63d5ffd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-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.8-beta1"
7+
version = "0.0.9"
88
description = "Commandline tools to support proteogenomics analyses at MSK TCDO and beyond"
99
readme = "README.rst"
1010
authors = [

src/tcdo_pg_tools/merge_proteome.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from marsilea.upset import Upset, UpsetData
1313
import matplotlib.pyplot as plt
1414

15-
def fasta2df(uniprotfastapath, sample="swissprot"):
15+
def fasta2df(uniprotfastapath, sample):
1616
"""
1717
fasta to pandas dataframe
1818
"""
@@ -103,6 +103,8 @@ def merge_proteome(input_csv, info_table, merged_fasta, upset,
103103
metadata = pd.read_csv(input_csv)
104104
# initialize dataframe for merging fasta
105105
protein_dat = pd.DataFrame()
106+
# get list of samples we don't have quantification for
107+
no_quant = []
106108
print("loading fasta files ...")
107109
for _, row in metadata.iterrows():
108110
fasta = row["fasta"]
@@ -113,7 +115,6 @@ def merge_proteome(input_csv, info_table, merged_fasta, upset,
113115
seqdat["condition"] = condition
114116
# filter for unique proteins
115117
# get list of samples where no peptide tsv was provided
116-
no_quant = []
117118
if unique_proteins:
118119
philosopher_path = row["protein_table"]
119120
if type(philosopher_path) is not float and os.path.exists(philosopher_path):
@@ -255,5 +256,5 @@ def merge_fasta(input_csv, info_table, merged_fasta, upset, upset_path, filter_b
255256
unique_proteins=False, filter=filter_by_header,filter_crap=filter_crap)
256257

257258
if __name__ == "__main__":
258-
merge_fasta() # or merge_fasta() if you're testing that
259+
merge_pg_results() # or merge_fasta() if you're testing that
259260

0 commit comments

Comments
 (0)