process_mzroll_multi.Rd
Aggregate multiple mzrollDB datasets which possess the same sample metadata
process_mzroll_multi( mzroll_paths, samples_tbl, id_strings, only_identified = TRUE, validate = FALSE, exact = TRUE )
mzroll_paths | a tibble with two variables:
|
---|---|
samples_tbl | Table of sample metadata |
id_strings | one or more variables which will be used to match sample names. |
only_identified | TRUE/FALSE, filter to only features which were identified. |
validate | TRUE/FALSE, use meta-data to only name the subset of features which were manually validated. |
exact | if true, an exact match between mzroll names and id_strings will be found; if false, then substring matches will be used. |
an mzroll_list containing three tibbles:
peakgroups: one row per unique analyte (defined by a unique groupId),
samples: one row per unique sample (defined by a unique sampleId),
peaks: one row per peak (samples x peakgroups)
mzroll_paths <- tibble::tribble( ~method_tag, ~mzroll_db_path, "method1", nplug_mzroll(), "method2", nplug_mzroll() ) process_mzroll_multi(mzroll_paths, nplug_samples, "sample_name")#> $features #> # A tibble: 212 × 12 #> groupId compoundName smiles adductName tagString mz rt compoundDB #> <fct> <chr> <chr> <chr> <chr> <dbl> <dbl> <chr> #> 1 1 Ribose-P NA NA "" NA NA NA #> 2 2 OMP NA NA "" NA NA NA #> 3 3 1,3-diphopshategl… NA NA "" NA NA NA #> 4 4 3-hydroxy-3-methy… NA NA "" NA NA NA #> 5 5 3-phosphoglycerate NA NA "" NA NA NA #> 6 6 6-phospho-D-gluco… NA NA "" NA NA NA #> 7 7 acetyl-CoA NA NA "" NA NA NA #> 8 8 aconitate NA NA "" NA NA NA #> 9 9 adenosine NA NA "" NA NA NA #> 10 10 ADP NA NA "" NA NA NA #> # … with 202 more rows, and 4 more variables: searchTableName <chr>, #> # label <chr>, peak_label <chr>, method_tag <chr> #> #> $samples #> # A tibble: 136 × 12 #> sampleId name samples_tbl_row sample_name month replicate DR limitation #> <fct> <chr> <int> <chr> <chr> <chr> <dbl> <chr> #> 1 1 NH4_0.… 1 NH4_0.055_… Jun B 0.055 NH4 #> 2 2 NH4_0.… 2 NH4_0.055_… Jun D 0.055 NH4 #> 3 3 NH4_0.… 3 NH4_0.055_… Jun A 0.055 NH4 #> 4 4 NH4_0.… 4 NH4_0.055_… Jun C 0.055 NH4 #> 5 5 NH4_0.… 5 NH4_0.173_… Jun B 0.173 NH4 #> 6 6 NH4_0.… 6 NH4_0.173_… Jun D 0.173 NH4 #> 7 7 NH4_0.… 7 NH4_0.173_… Jun A 0.173 NH4 #> 8 8 NH4_0.… 8 NH4_0.173_… Jun C 0.173 NH4 #> 9 9 NH4_0.… 9 NH4_0.210_… Jun B 0.21 NH4 #> 10 10 NH4_0.… 10 NH4_0.210_… Jun D 0.21 NH4 #> # … with 126 more rows, and 4 more variables: exp_ref <chr>, extraction <chr>, #> # condition <int>, reference <int> #> #> $measurements #> # A tibble: 28,832 × 4 #> groupId sampleId log2_abundance centered_log2_abundance #> <fct> <fct> <dbl> <dbl> #> 1 2 1 8.23 -1.27 #> 2 4 1 8.23 -0.816 #> 3 15 1 8.23 -4.60 #> 4 25 1 8.23 -3.23 #> 5 26 1 8.23 -2.21 #> 6 30 1 8.23 -1.18 #> 7 40 1 8.23 -0.318 #> 8 51 1 8.23 -1.10 #> 9 56 1 8.23 -0.448 #> 10 57 1 8.23 -3.80 #> # … with 28,822 more rows #> #> $design #> $design$features #> # A tibble: 12 × 2 #> variable type #> <chr> <chr> #> 1 groupId feature_primary_key #> 2 compoundName character #> 3 smiles character #> 4 adductName character #> 5 tagString character #> 6 mz numeric #> 7 rt numeric #> 8 compoundDB character #> 9 searchTableName character #> 10 label character #> 11 peak_label character #> 12 method_tag character #> #> $design$samples #> # A tibble: 12 × 2 #> variable type #> <chr> <chr> #> 1 sampleId sample_primary_key #> 2 name character #> 3 samples_tbl_row integer #> 4 sample_name character #> 5 month character #> 6 replicate character #> 7 DR numeric #> 8 limitation character #> 9 exp_ref character #> 10 extraction character #> 11 condition integer #> 12 reference integer #> #> $design$measurements #> # A tibble: 4 × 2 #> variable type #> <chr> <chr> #> 1 groupId feature_primary_key #> 2 sampleId sample_primary_key #> 3 log2_abundance numeric #> 4 centered_log2_abundance numeric #> #> $design$feature_pk #> [1] "groupId" #> #> $design$sample_pk #> [1] "sampleId" #> #> #> attr(,"class") #> [1] "triple_omic" "tomic" "mzroll"