msmu._read_write._base_reader
MuDataInput
dataclass
MuDataInput(raw_feature_df, norm_feature_df, norm_quant_df, search_config, decoy_df)
Dataclass to store inputs for creating a MuData object.
Attributes:
| Name | Type | Description |
|---|---|---|
raw_feature_df |
DataFrame
|
Raw feature DataFrame (varm['search_result']). |
norm_feature_df |
DataFrame
|
Normalized feature DataFrame. |
norm_quant_df |
DataFrame
|
Normalized quantification DataFrame. |
search_result |
DataFrame
|
Original search result DataFrame. |
search_config |
dict
|
Configuration settings from the search engine. |
SearchResultReader
SearchResultReader()
Base class for reading and processing search engine results.
Attributes:
| Name | Type | Description |
|---|---|---|
search_settings |
SearchResultSettings
|
Settings for the search results. |
used_feature_cols |
list[str]
|
List of columns to be used in the feature DataFrame. |
base_level |
Literal['psm', 'precursor'] | None
|
Base level of the data (e.g., "psm" or "precursor"). |
_feature_rename_dict |
dict
|
Dictionary for renaming feature columns. |
Methods:
| Name | Description |
|---|---|
read |
Reads and processes the search results into a MuData object. |
read
read()
Reads and processes the search results into a MuData object.
Returns:
| Type | Description |
|---|---|
MuData
|
md.MuData: A MuData object containing the processed search results. |
SearchResultSettings
dataclass
SearchResultSettings(search_engine, quantification, label, acquisition, output_dir, feature_file, feature_level, quantification_file, quantification_level, config_file, feat_quant_merged, has_decoy=True)
Dataclass to store search result settings.
Attributes:
| Name | Type | Description |
|---|---|---|
search_engine |
str
|
Name of the search engine used (e.g., "sage", "maxquant"). |
quantification |
str | None
|
Name of the quantification tool used (e.g., "sage", "maxquant", or None). |
label |
str
|
Labeling method used (e.g., "tmt", "label_free"). |
output_dir |
Path
|
Directory where the search results are stored. |
feature_file |
str
|
Name of the feature file. |
feature_level |
str
|
Level of the feature data (e.g., "psm", "precursor", "peptide", "protein"). |
quantification_file |
str | None
|
Name of the quantification file (if applicable). |
quantification_level |
str | None
|
Level of the quantification data (e.g., "psm", "precursor", "peptide", "protein", or None). |
config_file |
str | None
|
Name of the configuration file (if applicable). |
feat_quant_merged |
bool
|
Indicates if feature and quantification are merged in a single file. |
config_path
property
config_path
Returns the full path to the configuration file if it exists, otherwise returns None.
feature_path
property
feature_path
Returns the full path to the feature file if it exists, otherwise returns None.
quantification_path
property
quantification_path
Returns the full path to the quantification file if it exists, otherwise returns None.