@@ -74,7 +74,7 @@ def write_mztab(identifications: List[SpectrumSpectrumMatch], filename: str,
7474 f'"{ os .path .split (config .query_filename )[1 ]} " against '
7575 f'spectral library file '
7676 f'"{ os .path .split (config .spectral_library_filename )[1 ]} "' ),
77- ('software[1]' , f'[MS, MS:1001456 , ANN-SoLo, { __version__ } ]' ),
77+ ('software[1]' , f'[MS, MS:1003357 , ANN-SoLo, { __version__ } ]' ),
7878 ('psm_search_engine_score[1]' , '[MS, MS:1001143, search engine '
7979 'specific score for PSMs,]' ),
8080 ('psm_search_engine_score[2]' , '[MS, MS:1002354, PSM-level q-value,]' ),
@@ -115,26 +115,39 @@ def write_mztab(identifications: List[SpectrumSpectrumMatch], filename: str,
115115
116116 # SSMs.
117117 f_out .write ('\t ' .join ([
118- 'PSH' , 'sequence' , 'PSM_ID' , 'accession' , 'unique' , 'database' ,
119- 'database_version' , 'search_engine' , 'search_engine_score[1]' ,
120- 'search_engine_score[2]' , 'modifications' , 'retention_time' ,
121- 'charge' , 'exp_mass_to_charge' , 'calc_mass_to_charge' ,
122- 'spectra_ref' , 'pre' , 'post' , 'start' , 'end' ,
123- 'opt_ms_run[1]_cv_MS:1003062_spectrum_index' ,
124- 'opt_ms_run[1]_cv_MS:1002217_decoy_peptide' ,
125- 'opt_ms_run[1]_num_candidates' ]) + '\n ' )
118+ 'PSH' ,
119+ 'sequence' ,
120+ 'PSM_ID' ,
121+ 'accession' ,
122+ 'unique' ,
123+ 'database' ,
124+ 'database_version' ,
125+ 'search_engine' ,
126+ 'search_engine_score[1]' ,
127+ 'search_engine_score[2]' ,
128+ 'modifications' ,
129+ 'retention_time' ,
130+ 'charge' ,
131+ 'exp_mass_to_charge' ,
132+ 'calc_mass_to_charge' ,
133+ 'spectra_ref' ,
134+ 'pre' ,
135+ 'post' ,
136+ 'start' ,
137+ 'end' ,
138+ 'opt_ms_run[1]_cv_MS:1002217_decoy_peptide' ]) + '\n ' )
126139 # SSMs sorted by their query identifier.
127140 for ssm in sorted (identifications ,
128141 key = lambda s : natural_sort_key (s .query_identifier )):
129142 f_out .write ('\t ' .join ([
130143 'PSM' ,
131144 ssm .sequence ,
132145 str (ssm .query_identifier ),
133- 'null' , 'null' ,
134- pathlib . Path ( os . path . abspath (
135- config .spectral_library_filename )).as_uri (),
136- database_version ,
137- '[MS, MS:1001456 , ANN SoLo,]' ,
146+ str ( ssm . library_identifier ) ,
147+ 'null' ,
148+ pathlib . Path ( os . path . abspath ( config .spectral_library_filename )).as_uri (),
149+ lib_reader . get_version () ,
150+ '[MS, MS:1003357 , ANN SoLo,]' ,
138151 str (ssm .search_engine_score ),
139152 str (ssm .q ),
140153 'null' ,
@@ -143,8 +156,10 @@ def write_mztab(identifications: List[SpectrumSpectrumMatch], filename: str,
143156 str (ssm .exp_mass_to_charge ),
144157 str (ssm .calc_mass_to_charge ),
145158 f'ms_run[1]:index={ ssm .query_index } ' ,
146- 'null' , 'null' , 'null' , 'null' ,
147- str (ssm .library_identifier ),
159+ 'null' ,
160+ 'null' ,
161+ 'null' ,
162+ 'null' ,
148163 f'{ ssm .is_decoy :d} ' ]) + '\n ' )
149164
150165 return filename
0 commit comments