Nothing
test_that("normalize_quantile_all produces expected results, when accounting for rounding error", {
# Values in the publicationused for this evaluation are rounded to the 2nd digit (Y. Zhao, L. Wong, W. W. B. Goh, Sci Rep 2020, 10, 15534, DOI 10.1038/s41598-020-72664-6)
# R may round differently, see ?round
# therefore, differences between expected results and calculated results are first calculated.
# As numbers are rounded to the 2nd digit, absolute differences should be less than or equal to 0.005.
max_diff <- test_qn_data %>%
normalize_quantile_all() %>%
dplyr::select(-"Feature") %>%
dplyr::left_join(test_qn_all_results, by = c("UID", "Sample")) %>%
dplyr::mutate(Intenity_diff = .data$Intensity.x - .data$Intensity.y) %>%
dplyr::pull(.data$Intenity_diff) %>%
abs() %>%
max()
expect_lte(max_diff, 0.005)
})
test_that("row & column order stays unchanged", {
normalized_df <- toy_metaboscape %>%
impute_lod() %>%
normalize_quantile_all()
expect_equal(dplyr::select(normalized_df, -Intensity), dplyr::select(toy_metaboscape, -Intensity))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.