tabular-data-standardization
Summary
Transform vendor-specific raw MRM lipidomics export files into a normalized, machine-readable tabular format by parsing headers, decomposing lipid nomenclature, and validating data integrity. This skill enables downstream matching, statistical analysis, and visualization by ensuring consistent column structure and data types across heterogeneous input sources.
When to use
When you have received raw MRM lipidomics export files in vendor-specific formats (TSV, CSV) with inconsistent column naming, unparsed lipid identifiers (e.g., 'PC(36:1)' as a single string), and unknown data quality issues. Apply this skill before attempting lipid matching, statistical testing, or visualization to ensure all rows conform to a validated, decomposed schema.
When NOT to use
- Input is already a validated, normalized feature table with decomposed lipid fields
- Raw data contains only aggregate lipid totals without individual feature-level intensity measurements
- Vendor export format is binary or proprietary (non-text) — use format conversion first
Inputs
- Vendor-specific MRM lipidomics export file (TSV or CSV format)
- Raw intensity measurements and m/z values (unvalidated)
- Unparsed lipid identifiers (e.g., 'PC(36:1)', 'PE(38:2)-OH')
- Sample metadata (sample identifiers, group labels)
Outputs
- Standardized CSV table with canonical column headers
- Decomposed lipid nomenclature fields (lipid_class, chain_composition, modification)
- Validated numeric columns (m/z, retention_time, intensity)
- Data quality report (missing values, malformed identifiers, type mismatches)
How to apply
Load the raw vendor export into a pandas DataFrame and inspect column headers. Standardize header names to canonical forms (retention time, m/z, intensity, lipid ID, sample identifier). Use regex or string-split operations to parse lipid nomenclature into separate fields: lipid class (e.g., PC), chain composition (e.g., 36:1), and modification state (e.g., oxidation, hydroxylation). Validate data integrity by checking for missing values, confirming m/z and intensity columns are numeric, and flagging rows with malformed lipid identifiers or out-of-range values. Output the cleaned, structured table as CSV with one row per lipid feature per sample and consistent data types across all columns.
Related tools
- pandas (Load, inspect, and transform vendor CSV/TSV export into standardized DataFrame; perform column renaming, data type conversion, and validation)
- Python regex (re module) (Parse lipid nomenclature strings to extract lipid class, chain composition, and modification state into separate fields)
- Lipid_MRM_parser.ipynb (Jupyter notebook implementing the full data parsing workflow including loading, standardization, parsing, validation, and output) — github.com/chopralab/CLAW
Examples
df = pd.read_csv('raw_mrm_export.tsv', sep='\t'); df.columns = ['retention_time', 'm_z', 'intensity', 'lipid_id', 'sample']; df[['lipid_class', 'chain', 'mod']] = df['lipid_id'].str.extract(r'(\w+)\((\d+:\d+)\)(-\w+)?'); df = df.dropna(subset=['m_z', 'intensity']); df['m_z'] = pd.to_numeric(df['m_z']); df.to_csv('standardized_lipid_data.csv', index=False)
Evaluation signals
- All rows in the output CSV have identical column structure with no missing headers
- m/z and intensity columns are numeric type (float/int) with no non-numeric entries
- Lipid identifiers successfully decomposed into separate fields with no null values or malformed entries
- No rows contain missing values in critical fields (m/z, intensity, lipid_id, sample_identifier)
- Output row count matches input row count (no silent data loss except flagged-invalid rows)
Limitations
- Regex patterns for lipid nomenclature parsing must be tailored to the specific vendor nomenclature standard (Lipid Maps, SwissLipids, etc.); no universal parser is provided
- Validation checks are schema-based and do not detect biological implausibility (e.g., m/z outside expected range for lipid class or retention time drift across samples)
- No changelog is available to document version-specific changes to parsing rules or validation thresholds
Evidence
- [other] Extract and standardize column headers (retention time, m/z, intensity, lipid ID, sample identifier): "Extract and standardize column headers (retention time, m/z, intensity, lipid ID, sample identifier)"
- [other] Parse lipid nomenclature using regex or string-split operations to decompose lipid class, chain composition, and modification state into separate fields: "Parse lipid nomenclature using regex or string-split operations to decompose lipid class, chain composition, and modification state into separate fields"
- [other] Validate data integrity: check for missing values, confirm numeric types for m/z and intensity columns, and flag rows with malformed lipid identifiers: "Validate data integrity: check for missing values, confirm numeric types for m/z and intensity columns, and flag rows with malformed lipid identifiers"
- [other] Load raw MRM export file (vendor-specific format, e.g., TSV or CSV) into a pandas DataFrame: "Load raw MRM export file (vendor-specific format, e.g., TSV or CSV) into a pandas DataFrame"
- [readme] streamline various tasks such as data parsing, matching, statistical analysis, and visualization: "streamline various tasks such as data parsing, matching, statistical analysis, and visualization"
1---2name: tabular-data-standardization3description: Use when when you have received raw MRM lipidomics export files in vendor-specific formats (TSV, CSV) with inconsistent column naming, unparsed lipid identifiers (e.g., 'PC(36:1)' as a single string), and unknown data quality issues.4license: CC-BY-4.05---67# tabular-data-standardization89## Summary1011Transform vendor-specific raw MRM lipidomics export files into a normalized, machine-readable tabular format by parsing headers, decomposing lipid nomenclature, and validating data integrity. This skill enables downstream matching, statistical analysis, and visualization by ensuring consistent column structure and data types across heterogeneous input sources.1213## When to use1415When you have received raw MRM lipidomics export files in vendor-specific formats (TSV, CSV) with inconsistent column naming, unparsed lipid identifiers (e.g., 'PC(36:1)' as a single string), and unknown data quality issues. Apply this skill before attempting lipid matching, statistical testing, or visualization to ensure all rows conform to a validated, decomposed schema.1617## When NOT to use1819- Input is already a validated, normalized feature table with decomposed lipid fields20- Raw data contains only aggregate lipid totals without individual feature-level intensity measurements21- Vendor export format is binary or proprietary (non-text) — use format conversion first2223## Inputs2425- Vendor-specific MRM lipidomics export file (TSV or CSV format)26- Raw intensity measurements and m/z values (unvalidated)27- Unparsed lipid identifiers (e.g., 'PC(36:1)', 'PE(38:2)-OH')28- Sample metadata (sample identifiers, group labels)2930## Outputs3132- Standardized CSV table with canonical column headers33- Decomposed lipid nomenclature fields (lipid_class, chain_composition, modification)34- Validated numeric columns (m/z, retention_time, intensity)35- Data quality report (missing values, malformed identifiers, type mismatches)3637## How to apply3839Load the raw vendor export into a pandas DataFrame and inspect column headers. Standardize header names to canonical forms (retention time, m/z, intensity, lipid ID, sample identifier). Use regex or string-split operations to parse lipid nomenclature into separate fields: lipid class (e.g., PC), chain composition (e.g., 36:1), and modification state (e.g., oxidation, hydroxylation). Validate data integrity by checking for missing values, confirming m/z and intensity columns are numeric, and flagging rows with malformed lipid identifiers or out-of-range values. Output the cleaned, structured table as CSV with one row per lipid feature per sample and consistent data types across all columns.4041## Related tools4243- **pandas** (Load, inspect, and transform vendor CSV/TSV export into standardized DataFrame; perform column renaming, data type conversion, and validation)44- **Python regex (re module)** (Parse lipid nomenclature strings to extract lipid class, chain composition, and modification state into separate fields)45- **Lipid_MRM_parser.ipynb** (Jupyter notebook implementing the full data parsing workflow including loading, standardization, parsing, validation, and output) — github.com/chopralab/CLAW4647## Examples4849```50df = pd.read_csv('raw_mrm_export.tsv', sep='\t'); df.columns = ['retention_time', 'm_z', 'intensity', 'lipid_id', 'sample']; df[['lipid_class', 'chain', 'mod']] = df['lipid_id'].str.extract(r'(\w+)\((\d+:\d+)\)(-\w+)?'); df = df.dropna(subset=['m_z', 'intensity']); df['m_z'] = pd.to_numeric(df['m_z']); df.to_csv('standardized_lipid_data.csv', index=False)51```5253## Evaluation signals5455- All rows in the output CSV have identical column structure with no missing headers56- m/z and intensity columns are numeric type (float/int) with no non-numeric entries57- Lipid identifiers successfully decomposed into separate fields with no null values or malformed entries58- No rows contain missing values in critical fields (m/z, intensity, lipid_id, sample_identifier)59- Output row count matches input row count (no silent data loss except flagged-invalid rows)6061## Limitations6263- Regex patterns for lipid nomenclature parsing must be tailored to the specific vendor nomenclature standard (Lipid Maps, SwissLipids, etc.); no universal parser is provided64- Validation checks are schema-based and do not detect biological implausibility (e.g., m/z outside expected range for lipid class or retention time drift across samples)65- No changelog is available to document version-specific changes to parsing rules or validation thresholds6667## Evidence6869- [other] Extract and standardize column headers (retention time, m/z, intensity, lipid ID, sample identifier): "Extract and standardize column headers (retention time, m/z, intensity, lipid ID, sample identifier)"70- [other] Parse lipid nomenclature using regex or string-split operations to decompose lipid class, chain composition, and modification state into separate fields: "Parse lipid nomenclature using regex or string-split operations to decompose lipid class, chain composition, and modification state into separate fields"71- [other] Validate data integrity: check for missing values, confirm numeric types for m/z and intensity columns, and flag rows with malformed lipid identifiers: "Validate data integrity: check for missing values, confirm numeric types for m/z and intensity columns, and flag rows with malformed lipid identifiers"72- [other] Load raw MRM export file (vendor-specific format, e.g., TSV or CSV) into a pandas DataFrame: "Load raw MRM export file (vendor-specific format, e.g., TSV or CSV) into a pandas DataFrame"73- [readme] streamline various tasks such as data parsing, matching, statistical analysis, and visualization: "streamline various tasks such as data parsing, matching, statistical analysis, and visualization"