1212from marsilea .upset import Upset , UpsetData
1313import 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
257258if __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