Filter MatchedSpectra so that query and target spectra has same polarity
filterMisMatchedPolarity.RdYour database and query spectra could be a mix of positive and negative mode spectra. This function filters out matches where the polarity is not the same between query and target (DB).
Arguments
- matches
MatchedSpectra objects with database matches
- query_mode_col
Column in the spectraData that holds polarity information for the query spectra. Expected to be "pos" or "neg"
- target_mode_col
Column in the spectraData that holds polarity information for the target spectra (the DB). Expected to be 0 (for neg) or 1 (for pos)