99 calculate_ppm_offset_tolerance ,
1010 create_ppm_histogram ,
1111)
12- from zodiaq .scoring import (
13- score_library_to_query_matches ,
14- determine_index_of_fdr_cutoff ,
15- )
12+ from zodiaq .scoring import score_library_to_query_matches
1613from zodiaq .identification .outputFormattingFunctions import (
1714 extract_metadata_from_match_and_score_dataframes ,
1815 format_output_line ,
@@ -168,6 +165,11 @@ def _apply_correction_to_match_dataframe(self, matchDf):
168165 offset , tolerance = calculate_ppm_offset_tolerance (
169166 matchDf ["ppmDifference" ], self ._commandLineArgs ["correctionDegree" ]
170167 )
168+ toleranceMinimumCutoff = 5
169+ if not self ._commandLineArgs ["correctionDegree" ] and tolerance < toleranceMinimumCutoff :
170+ _ , tolerance = calculate_ppm_offset_tolerance (
171+ matchDf ["ppmDifference" ], 0.5
172+ )
171173 queryFile = self ._queryContext .filePath .split ("/" )[- 1 ]
172174 outFile = os .path .splitext (queryFile )[0 ] + "_correctionHistogram.png"
173175 if self ._commandLineArgs ["histogram" ]:
@@ -180,12 +182,6 @@ def _apply_correction_to_match_dataframe(self, matchDf):
180182 matchDf = filter_matches_by_ppm_offset_and_tolerance (matchDf , offset , tolerance )
181183 return eliminate_low_count_matches (matchDf )
182184
183- def _apply_correction_to_score_dataframe (self , matchDf , scoreDf ):
184- scoreDf = score_library_to_query_matches (matchDf )
185- isDecoyArray = identify_all_decoys (self ._decoySet , scoreDf )
186- scoreDfCutoffIdx = determine_index_of_fdr_cutoff (isDecoyArray )
187- return scoreDf .iloc [:scoreDfCutoffIdx , :]
188-
189185 def _format_identifications_as_dataframe (self , matchDf , scoreDf ):
190186 """
191187 The final match/score identifications are consolidated into a dataframe.
0 commit comments