Repository navigation
new: DIANN support + datashare example files - #22
Conversation
|
|
||
| def _add_missing_indices(self): | ||
| """Add frame/scan indices if missing""" | ||
| if "frame_start" in self.precursor_df.columns: |
There was a problem hiding this comment.
could be made more robust:
required_columns = ["frame_start","frame_stop","scan_start", "scan_stop"]
if all([col in self.precursor_df.columns for col in required_columns]):
return
if any(....)
inconsistent state? raise?
for idx, row...
| @@ -1,33 +1,46 @@ | |||
| import os | |||
| from pathlib import Path | |||
| from typing import Any | |||
There was a problem hiding this comment.
ad PR description: why do we need a different alphadia version? which one?
GeorgWa
left a comment
There was a problem hiding this comment.
very cool! Looks good to merge to me
| if "nce" in dia_data.spectrum_df.columns and not dia_data.spectrum_df.empty: | ||
| nce = float(dia_data.spectrum_df["nce"].max()) | ||
| else: | ||
| raise ValueError("dia_data.spectrum_df lacks an 'nce' column or is empty") |
There was a problem hiding this comment.
you could default to something like 28 here
| raise ValueError("dia_data.spectrum_df lacks an 'nce' column or is empty") | ||
|
|
||
| register_readers() | ||
| modification_mapping = { |
There was a problem hiding this comment.
could we instead add them to the default alphabase diann mapping?
There was a problem hiding this comment.
yes, i'll remove them from here after the alphabase PR would be merged and we'll get an alphabase release
| speclib_base.precursor_df = precursor_df | ||
| speclib_base.calc_fragment_mz_df() | ||
|
|
||
| speclib_base.precursor_df["nAA"] = speclib_base.precursor_df["sequence"].str.len() |
There was a problem hiding this comment.
you could use:
res = tune_mgr.model_mgr(transfer_lib.precursor_df.copy(), predict_items=['ms2'])
precursor_df = res['precursor_df']
fragment_df = res['fragment_mz_df']
fragment_df = res['fragment_intensity_df']
Which would give you the nAA,frag_start_idx,frag_stop_idx and might have a bit less coupling to inner workings of peptdeep/alphabase
todo: update dependencies and docker because now we need to have the latest alphaDIA version from github (what is now called alphadia.raw_data used to not be called that)