@@ -62,20 +62,20 @@ def _parse_entry(self, entry: dict, spectrum_id) -> PSM:
6262 spectrum_id = spectrum_id ,
6363 run = entry .get ("File Name" ),
6464 retention_time = entry .get ("Scan Retention Time" ),
65- protein_list = self ._parse_protein_list (entry .get ("Protein Accessions " )),
65+ protein_list = self ._parse_protein_list (entry .get ("Protein Accession " )),
6666 )
6767
6868 @staticmethod
69- def _parse_protein_list (protein_accessions : Optional [str ]) -> list [str ]:
69+ def _parse_protein_list (protein_accession : Optional [str ]) -> list [str ]:
7070 """Parse protein list string to list of protein accessions."""
71- if not protein_accessions :
71+ if not protein_accession :
7272 return []
73- elif ";" in protein_accessions : # Docs define separator as semicolon
74- return protein_accessions .split (";" )
75- elif "|" in protein_accessions : # Example file uses pipe
76- return protein_accessions .split ("|" )
73+ elif ";" in protein_accession : # Docs define separator as semicolon
74+ return protein_accession .split (";" )
75+ elif "|" in protein_accession : # Example file uses pipe
76+ return protein_accession .split ("|" )
7777 else :
78- return [protein_accessions ] # Single protein
78+ return [protein_accession ] # Single protein
7979
8080
8181class FlashLFQWriter (WriterBase ):
@@ -125,10 +125,10 @@ def __enter__(self) -> FlashLFQWriter:
125125 "File Name" ,
126126 "Base Sequence" ,
127127 "Full Sequence" ,
128- "Peptide Monoisotope Mass" ,
128+ "Peptide Monoisotopic Mass" ,
129129 "Scan Retention Time" ,
130130 "Precursor Charge" ,
131- "Protein Accessions " ,
131+ "Protein Accession " ,
132132 ]
133133 mode = "wt"
134134
@@ -221,8 +221,8 @@ def _psm_to_entry(psm: PSM) -> dict:
221221 "File Name" : psm .run ,
222222 "Base Sequence" : psm .peptidoform .sequence ,
223223 "Full Sequence" : psm .peptidoform .modified_sequence ,
224- "Peptide Monoisotope Mass" : psm .peptidoform .theoretical_mass ,
224+ "Peptide Monoisotopic Mass" : f" { psm .peptidoform .theoretical_mass :.6f } " ,
225225 "Scan Retention Time" : psm .retention_time ,
226226 "Precursor Charge" : psm .peptidoform .precursor_charge ,
227- "Protein Accessions " : ";" .join (psm .protein_list ),
227+ "Protein Accession " : ";" .join (psm .protein_list ),
228228 }
0 commit comments