R data frame construction and validation
Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder
npx -y skills add HolobiomicsLab/asb-skill-collections --skill r-data-frame-construction-and-validationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 14 stars14 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use when when you have instrument-exported text files (e.g., Sciex MultiQuant txt format) containing QCpool sample measurements, metadata, and timestamps that need to be converted into a reproducible, schema-validated R object for metabolomics or lipidomics quality overview analysis.
The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
6.4 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
R data frame construction and validation
Summary
Parse tabular data from instrument export files into structured R data frames with standardized column names, correct data types, and validated schema. This skill ensures that downstream analytical workflows receive clean, machine-readable input suitable for quality assessment and statistical analysis.
When to use
When you have instrument-exported text files (e.g., Sciex MultiQuant txt format) containing QCpool sample measurements, metadata, and timestamps that need to be converted into a reproducible, schema-validated R object for metabolomics or lipidomics quality overview analysis.
When NOT to use
- Input is already a structured R data frame or tibble with validated schema.
- Data is in a format other than Sciex MultiQuant txt (e.g., binary .wiff files, mzML, or already-processed feature tables).
- Required metadata columns are missing or unrecoverable from the export file.
Inputs
- Sciex MultiQuant (>v3.0.3) txt export file
- Tab- or comma-delimited text file with sample identifiers, measurement values, timestamps, and metadata columns
Outputs
- R data frame or tibble with standardized column names and correct data types
- CSV file or R serialized object (.rds) suitable for downstream QComics analysis
How to apply
Load the txt file using R file I/O functions, then parse the tabular structure to extract QCpool sample identifiers, measurement values, timestamps, and metadata fields. Validate that required columns are present and data types are correct—numeric values must be coerced to numeric class, and date/time fields must be parsed into POSIXct or Date format. Assign standardized column names that match the downstream workflow's expectations. Finally, convert the validated table into an R data frame or tibble and export in a machine-readable format (CSV or R serialized object like .rds) for use in QComics quality assessment workflows.
Related tools
- Sciex Multiquant (Instrument analysis software that exports QCpool sample measurements to txt format; versions >v3.0.3 required for compatibility)
- R (Programming environment for loading, parsing, validating, and converting txt files into structured data frames via file I/O and data wrangling functions)
- QComics (Downstream R package that accepts parsed and validated data frames as input for metabolomics/lipidomics quality overview analysis) — https://github.com/ricoderks/QComics
Examples
# Load txt file, parse columns, validate schema, output as R data frame
qcpool_data <- read.delim('qcpool_samples.txt', stringsAsFactors=FALSE); qcpool_data$timestamp <- as.POSIXct(qcpool_data$timestamp); stopifnot(all(c('sample_id','measurement_value','timestamp') %in% names(qcpool_data))); saveRDS(qcpool_data, 'qcpool_validated.rds')
Evaluation signals
- All required columns are present in the output data frame with expected names (e.g., sample_id, measurement_value, timestamp, metadata_field).
- Numeric columns contain only numeric values; character columns contain text; date/time columns are POSIXct or Date class (no strings).
- No missing values (NA) in critical columns; or missing values are explicitly documented and justified.
- Row count matches the number of QCpool samples in the input file; column count matches the expected schema.
- Output file is reproducible: re-parsing the same input txt file with the same R script produces identical data frame structure and values.
Limitations
- Sciex MultiQuant versions ≤v3.0.3 may export in incompatible txt formats; only versions >v3.0.3 are supported.
- Metadata columns not exported by MultiQuant (e.g., instrument serial number, acquisition method name) cannot be recovered from the txt file.
- Parser assumes tab- or comma-delimited structure; other delimiters or non-standard formatting in the txt file may cause parsing errors.
- No changelog or versioning documentation available for QComics, limiting compatibility assessment with future versions.
Evidence
- [other] Parse the tabular structure to extract QCpool sample identifiers, measurement values, timestamps, and metadata fields.: "Parse the tabular structure to extract QCpool sample identifiers, measurement values, timestamps, and metadata fields."
- [other] Validate that required columns are present and data types are correct (numeric values, date/time format).: "Validate that required columns are present and data types are correct (numeric values, date/time format)."
- [other] Convert parsed data into a structured R data frame or tibble with standardized column names and formats.: "Convert parsed data into a structured R data frame or tibble with standardized column names and formats."
- [intro] QCpool samples need to be analysed with Sciex Multiquant (> v3.0.3) software and exported to
txtformat: "QCpool samples need to be analysed with Sciex Multiquant (> v3.0.3) software and exported totxtformat" - [other] Output the structured table in a machine-readable format (CSV or R serialized object) for use in downstream QComics quality assessment workflows.: "Output the structured table in a machine-readable format (CSV or R serialized object) for use in downstream QComics quality assessment workflows."
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.