Skip to content

Conversation

@vbrennsteiner
Copy link
Contributor

What?

To accomodate for newer spectronaut version column names, fix hardcoded charge column name in _pre_process() to instead use the configuration yaml. In particular, adding to the spectronaut/column_mapping key in the psm_reader.yaml:

  • Adding 'R.Label' to 'raw_name': ['ReferenceRun']
  • Adding 'FG.Charge' to 'charge': ['PrecursorCharge']

And to spectronaut/mod_seq_columns:

  • Adding 'EG.ModifiedSequence'

…ardcoded charge column name in _pre_process() to instead use the configuration yaml
@vbrennsteiner vbrennsteiner marked this pull request as draft September 25, 2025 15:07
@vbrennsteiner vbrennsteiner self-assigned this Sep 25, 2025
@vbrennsteiner vbrennsteiner marked this pull request as ready for review September 25, 2025 15:59
Comment on lines +26 to +34
available_charge_columns = load_yaml(
Path(CONST_FILE_FOLDER) / PSM_READER_YAML_FILE_NAME
)[self._reader_type]["column_mapping"]["charge"]

self.precursor_charge_column = "PrecursorCharge"
for charge_col in available_charge_columns:
if charge_col in df.columns:
self.precursor_charge_column = charge_col
break
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this extra logic required? isn't this covered by _translate_columns?

fixed_C57: False
column_mapping:
'raw_name': 'ReferenceRun'
'raw_name': ['ReferenceRun', 'R.Label']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here: please indicate the version (for those columns you know by heart right now ;-))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants