merge_compounds_tbl.Rd
Merge a table of compound information with an existing mzroll_list
merge_compounds_tbl(mzroll_list, compounds_tbl, by = "compoundName")
mzroll_list | output of process_mzroll or process_mzroll_multi
|
---|---|
compounds_tbl | Table of compound metadata |
by | variable shared by mzroll peakgroups and compounds_tbl to merge results by. |
mzroll_list <- process_mzroll(nplug_mzroll()) compounds_tbl <- nplug_compounds merge_compounds_tbl(mzroll_list, compounds_tbl)#> $features #> # A tibble: 106 × 13 #> 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 96 more rows, and 5 more variables: searchTableName <chr>, #> # label <chr>, peak_label <chr>, method_tag <chr>, pathway <chr> #> #> $samples #> # A tibble: 136 × 3 #> sampleId name filename #> <fct> <chr> <chr> #> 1 1 NH4_0.055_filter_b NA #> 2 2 NH4_0.055_filter_d NA #> 3 3 NH4_0.055_pellet_a NA #> 4 4 NH4_0.055_pellet_c NA #> 5 5 NH4_0.173_filter_b NA #> 6 6 NH4_0.173_filter_d NA #> 7 7 NH4_0.173_pellet_a NA #> 8 8 NH4_0.173_pellet_c NA #> 9 9 NH4_0.210_filter_b NA #> 10 10 NH4_0.210_filter_d NA #> # … with 126 more rows #> #> $measurements #> # A tibble: 14,416 × 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 14,406 more rows #> #> $design #> $design$features #> # A tibble: 13 × 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 #> 13 pathway character #> #> $design$samples #> # A tibble: 3 × 2 #> variable type #> <chr> <chr> #> 1 sampleId sample_primary_key #> 2 name character #> 3 filename character #> #> $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"