Remove all data besides those from provided groupIds

filter_groupIds(mzroll_list, groupIds, invert = FALSE)

Arguments

mzroll_list

output of process_mzroll or process_mzroll_multi

  • features: one row per unique analyte (defined by a unique groupId),

  • samples: one row per unique sample (defined by a unique sampleId),

  • measurements: one row per peak (samples x peakgroups)

groupIds

groupIds to retain

invert

if TRUE then remove provided groupIds; if FALSE then retain provided groupIds

Examples

filter_groupIds(nplug_mzroll_normalized, factor(1:10))
#> $features #> # A tibble: 10 × 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 5 more variables: searchTableName <chr>, label <chr>, #> # peak_label <chr>, method_tag <chr>, pathway <chr> #> #> $samples #> # A tibble: 26 × 4 #> sampleId limitation DR name #> <fct> <chr> <dbl> <glue> #> 1 1 NH4 0.055 N0.06 #> 2 3 NH4 0.173 N0.17 #> 3 5 NH4 0.21 N0.21 #> 4 7 NH4 0.29 N0.29 #> 5 9 URA 0.056 U0.06 #> 6 11 URA 0.11 U0.11 #> 7 13 URA 0.15 U0.15 #> 8 15 URA 0.22 U0.22 #> 9 17 URA 0.31 U0.31 #> 10 19 PO4 0.056 P0.06-1 #> # … with 16 more rows #> #> $measurements #> # A tibble: 260 × 5 #> groupId sampleId log2_abundance centered_log2_abundan… normalized_log2_abund… #> <fct> <fct> <dbl> <dbl> <dbl> #> 1 1 1 15.0 1.14 0.812 #> 2 1 3 15.5 1.62 1.30 #> 3 1 5 15.5 1.61 1.29 #> 4 1 7 16.1 2.27 1.94 #> 5 1 9 13.8 -0.105 -0.430 #> 6 1 11 14.3 0.409 0.0841 #> 7 1 13 14.8 0.931 0.606 #> 8 1 15 15.5 1.61 1.28 #> 9 1 17 16.1 2.21 1.89 #> 10 1 19 10.6 -3.25 -2.81 #> # … with 250 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: 4 × 2 #> variable type #> <chr> <chr> #> 1 sampleId sample_primary_key #> 2 limitation character #> 3 DR numeric #> 4 name glue #> #> $design$measurements #> # A tibble: 5 × 2 #> variable type #> <chr> <chr> #> 1 groupId feature_primary_key #> 2 sampleId sample_primary_key #> 3 log2_abundance numeric #> 4 centered_log2_abundance numeric #> 5 normalized_log2_abundance numeric #> #> $design$feature_pk #> [1] "groupId" #> #> $design$sample_pk #> [1] "sampleId" #> #> #> attr(,"class") #> [1] "triple_omic" "tomic" "mzroll"