Running ‘testthat.R’ [26s/27s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(mpactr)
  > 
  > limit_cores()
  > test_check("mpactr")
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for replicability across technical replicates.
  v 33 ions failed the cv_filter filter, 451 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1303 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 796 ions failed the Blanks filter, 507 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for replicability across technical replicates.
  v 33 ions failed the cv_filter filter, 451 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for replicability across technical replicates.
  v 33 ions failed the cv_filter filter, 451 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method .
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  ! Argument remove_ions is FALSE. Peaks from Blanks will not be removed.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for replicability across technical replicates.
  v 33 ions failed the cv_filter filter, 451 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Checking 1289 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 65 ions failed the mispicked filter, 1224 ions remain.
  i Parsing 1224 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 698 ions failed the Blanks filter, 526 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for insource ions.
  Saving _problems/test-filter_pactr-methods-371.R
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1233 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 0 ions failed the mispicked filter, 1233 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  ! Argument merge_peaks is: FALSE. Mispicked peaks will not be merged.
  v 70 ions failed the mispicked filter, 1303 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  ! Argument merge_peaks is: FALSE. Mispicked peaks will not be merged.
  v 70 ions failed the mispicked filter, 1303 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  ! Argument remove_ions is FALSE. Peaks from Blanks will not be removed.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for replicability across technical replicates.
  v 33 ions failed the cv_filter filter, 451 ions remain.
  i Parsing 484 peaks for replicability across technical replicates.
  v 33 ions failed the cv_filter filter, 451 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for insource ions.
  Saving _problems/test-filters-176.R
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for replicability across technical replicates.
  v 33 ions failed the cv_filter filter, 451 ions remain.
  i Parsing 451 peaks for insource ions.
  Saving _problems/test-filters-217.R
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks for replicability across technical replicates.
  v 279 ions failed the cv_filter filter, 954 ions remain.
  i Parsing 954 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 384 ions failed the Blanks filter, 570 ions remain.
  i Parsing 570 peaks for insource ions.
  Saving _problems/test-import_data-53.R
  Found duplicate compound values, will add a suffix to unique the value.
  Found duplicate compound values, will add a suffix to unique the value.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Coculture.
  i Argument remove_ions is: TRUE.Removing peaks from Coculture.
  v 354 ions failed the Coculture filter, 879 ions remain.
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for insource ions.
  Saving _problems/test-qc_graph_pactr-class-25.R
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks based on the sample group: Coculture.
  i Argument remove_ions is: TRUE.Removing peaks from Coculture.
  v 293 ions failed the Coculture filter, 191 ions remain.
  i Parsing 191 peaks for insource ions.
  Saving _problems/test-quality_control-18.R
  i Checking 1303 peaks for mispicked peaks.
  i Argument merge_peaks is: TRUE. Merging mispicked peaks with method sum.
  v 70 ions failed the mispicked filter, 1233 ions remain.
  i Parsing 1233 peaks based on the sample group: Blanks.
  i Argument remove_ions is: TRUE.Removing peaks from Blanks.
  v 749 ions failed the Blanks filter, 484 ions remain.
  i Parsing 484 peaks for insource ions.
  Saving _problems/test-quality_control-44.R
  [ FAIL 7 | WARN 0 | SKIP 0 | PASS 154 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-filter_pactr-methods.R:371:3'): filter_inscource_ions filters out data properly ──
  Error in ``[.data.table`(self$mpactr_data$get_peak_table(), , `:=`(cor, private$deconvolute_correlation(.SD, cluster_threshold)), by = .(rt))`: attempt access index 22/22 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─filter_class$filter_insource_ions(cluster_threshold = 0.95) at test-filter_pactr-methods.R:371:3
   2.   ├─self$mpactr_data$set_peak_table(...)
   3.   ├─...[]
   4.   └─data.table:::`[.data.table`(...)
  ── Error ('test-filters.R:174:3'): filter insource ions wrapper works as expected ──
  Error in ``[.data.table`(self$mpactr_data$get_peak_table(), , `:=`(cor, private$deconvolute_correlation(.SD, cluster_threshold)), by = .(rt))`: attempt access index 22/22 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mpactr::filter_insource_ions(...) at test-filters.R:174:3
   2.   └─mpactr_object$filter_insource_ions(cluster_threshold = cluster_threshold)
   3.     ├─self$mpactr_data$set_peak_table(...)
   4.     ├─...[]
   5.     └─data.table:::`[.data.table`(...)
  ── Error ('test-filters.R:217:3'): filters abort if the filter has already been run ──
  Error in ``[.data.table`(self$mpactr_data$get_peak_table(), , `:=`(cor, private$deconvolute_correlation(.SD, cluster_threshold)), by = .(rt))`: attempt access index 22/22 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mpactr::filter_insource_ions(data_mpactr, cluster_threshold = 0.95) at test-filters.R:217:3
   2.   └─mpactr_object$filter_insource_ions(cluster_threshold = cluster_threshold)
   3.     ├─self$mpactr_data$set_peak_table(...)
   4.     ├─...[]
   5.     └─data.table:::`[.data.table`(...)
  ── Error ('test-import_data.R:45:3'): We can use a data.frame as input our peak table in import_data ──
  Error in ``[.data.table`(self$mpactr_data$get_peak_table(), , `:=`(cor, private$deconvolute_correlation(.SD, cluster_threshold)), by = .(rt))`: attempt access index 22/22 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mpactr::filter_insource_ions(...) at test-import_data.R:45:3
   2.   └─mpactr_object$filter_insource_ions(cluster_threshold = cluster_threshold)
   3.     ├─self$mpactr_data$set_peak_table(...)
   4.     ├─...[]
   5.     └─data.table:::`[.data.table`(...)
  ── Error ('test-qc_graph_pactr-class.R:25:3'): plot_QC_Tree generates the correct plot ──
  Error in ``[.data.table`(self$mpactr_data$get_peak_table(), , `:=`(cor, private$deconvolute_correlation(.SD, cluster_threshold)), by = .(rt))`: attempt access index 22/22 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─filter_class$filter_insource_ions(cluster_threshold = 0.95) at test-qc_graph_pactr-class.R:25:3
   2.   ├─self$mpactr_data$set_peak_table(...)
   3.   ├─...[]
   4.   └─data.table:::`[.data.table`(...)
  ── Error ('test-quality_control.R:18:3'): qc_summary returns a summary data.table ──
  Error in ``[.data.table`(self$mpactr_data$get_peak_table(), , `:=`(cor, private$deconvolute_correlation(.SD, cluster_threshold)), by = .(rt))`: attempt access index 22/22 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mpactr::filter_insource_ions(data, cluster_threshold = 0.95) at test-quality_control.R:18:3
   2.   └─mpactr_object$filter_insource_ions(cluster_threshold = cluster_threshold)
   3.     ├─self$mpactr_data$set_peak_table(...)
   4.     ├─...[]
   5.     └─data.table:::`[.data.table`(...)
  ── Error ('test-quality_control.R:44:3'): qc plot returns a generates a plot ───
  Error in ``[.data.table`(self$mpactr_data$get_peak_table(), , `:=`(cor, private$deconvolute_correlation(.SD, cluster_threshold)), by = .(rt))`: attempt access index 22/22 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─mpactr::filter_insource_ions(data, cluster_threshold = 0.95) at test-quality_control.R:44:3
   2.   └─mpactr_object$filter_insource_ions(cluster_threshold = cluster_threshold)
   3.     ├─self$mpactr_data$set_peak_table(...)
   4.     ├─...[]
   5.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 7 | WARN 0 | SKIP 0 | PASS 154 ]
  Error:
  ! Test failures.
  Execution halted