library("prolfquabenchmark")
metadata <- list(
dataset = "ionstar_maxquant",
method = "prolfqua_lm_mod",
method_description = "Linear model with variance moderation",
input_file = "MAXQuant_IonStar2018_PXD003881.zip/evidence.txt",
input_level = "peptide",
aggregation = "median_polish",
normalization = "robscale",
software_version = paste0("prolfqua ", packageVersion("prolfqua")),
date = Sys.Date(),
contrasts = c("dilution_(4.5/3)_1.5", "dilution_(6/4.5)_1.3(3)"),
ground_truth = list(
id_column = "protein_id",
positive = list(label = "ECOLI", pattern = "ECOLI"),
negative = list(label = "HUMAN", pattern = "HUMAN")
)
)
write_contrast_results(contrast_data, "/tmp/ionstar_lm", metadata)Write contrast results to a standardized file format
Description
Writes a contrasts.tsv file and a metadata.yaml sidecar file to the specified directory. Accepts prolfqua-native column names and renames them to the standardized snake_case format.
Usage
write_contrast_results(data, path, metadata, col_map = .col_map_to_standard)
Arguments
data
|
data.frame with contrast results (one row per protein x contrast) |
path
|
directory to write to (created if it does not exist) |
metadata
|
list with required fields: dataset, method, method_description, input_file, software_version, date, and ground_truth
|
col_map
|
named character vector mapping input column names to standard names. Defaults to the prolfqua-native mapping. Names are input columns, values are output columns. |
Value
Invisibly returns a list with elements data (the column-renamed data.frame) and metadata (the input metadata list).
See Also
Other benchmarking: Benchmark, benchmark_from_file(), benchmark_from_result(), collect_benchmark_results(), ionstar_bench_preprocess(), make_benchmark(), ms_bench_add_scores(), ms_bench_ap(), ms_bench_auc(), plot_benchmark_comparison(), read_benchmark_results(), read_contrast_results(), write_benchmark_results()