test_that("works when phmmer", {
read_hmmer_from_xml(
rep("phmmer_example.xml", 3), rep("phmmer_example.fa", 3)) %>%
extract_from_HMMER_data_tbl() %>%
testthat::expect_error(NA)
read_hmmer_from_xml(
rep("phmmer_example.xml", 1), rep("phmmer_example.fa", 1)) %>%
extract_from_HMMER_data_tbl(id_column = "unique",
remove_redundancy = TRUE,
annotate_taxonomic = "local") %>%
write.csv("phmmer_tidy_tbl.csv")
testthat::expect_snapshot_file("phmmer_tidy_tbl.csv")
})
test_that("works when phmmer", {
read_hmmer_from_xml("phmmer_example.xml",
"phmmer_example.fa",
"phmmer_example.afa") %>%
extract_from_HMMER_data_tbl(id_column = "unique",
remove_redundancy = TRUE,
annotate_taxonomic = "local") %>%
write.csv("phmmer_tidy_tbl_afa.csv")
testthat::expect_snapshot_file("phmmer_tidy_tbl_afa.csv")
})
test_that("works when properties", {
suppressWarnings({
read_hmmer_from_xml("phmmer_example.xml",
"phmmer_example.fa") %>%
extract_from_HMMER_data_tbl(id_column = "unique",
remove_redundancy = TRUE,
annotate_taxonomic = "local",
calculate_physicochemical_properties = TRUE) %>%
write.csv("tidy_tbl_properties.csv")
})
testthat::expect_snapshot_file("tidy_tbl_properties.csv")
})
test_that("filtering works",{
read_hmmer_from_xml(
rep("phmmer_example.xml", 1), rep("phmmer_example.fa", 1)) %>%
extract_from_HMMER_data_tbl(id_column = "unique",
remove_redundancy = TRUE,
annotate_taxonomic = "local",
evalue = 0.001) %>%
write.csv("phmmer_tidy_tbl_filtered.csv")
testthat::expect_snapshot_file("phmmer_tidy_tbl_filtered.csv")
})
test_that("summary works",{
read_hmmer_from_xml(
rep("phmmer_example.xml", 3), rep("phmmer_example.fa", 3)) %>%
extract_from_HMMER_data_tbl() %>%
summary() %>%
expect_snapshot_output()
})
test_that("plot works",{
temp <- read_hmmer_from_xml(
rep("phmmer_example.xml", 3), rep("phmmer_example.fa", 3)) %>%
extract_from_HMMER_data_tbl()
vdiffr::expect_doppelganger("A sig. geom_segment",
plot(temp))
vdiffr::expect_doppelganger("A sig. geom_segment",
plot(temp, threshold = 0.01))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.