test_that("pairwise_alignment autoplot works", {
seqs <- Biostrings::readAAStringSet("fasta.fa")
ann_seqs <- rep(c("cat", "dog", "koala"), c(3, 5, 3))
pairwise.object <- pairwise_alignment_sequence_identity(seqs)
vdiffr::expect_doppelganger("A pairwise histogram",
plot(pairwise.object))
vdiffr::expect_doppelganger("A pairwise histogram",
plot(pairwise.object,
type = "hist",
annotation = ann_seqs))
vdiffr::expect_doppelganger("A pairwise heatmap",
plot(pairwise.object, type = "heatmap"))
vdiffr::expect_doppelganger("A pairwise annotated",
plot(pairwise.object, type = "heatmap",
annotation = ann_seqs))
plot(pairwise.object, type = "heatmap", annotation = c("factor")) %>%
testthat::expect_warning()
})
test_that("pairwise_alignment works", {
seqs <- Biostrings::readAAStringSet("fasta.fa")
pairwise_alignment_sequence_identity(seqs) %>%
dplyr::pull("percentage.sequence.identity") %>%
expect_snapshot_value(style = "deparse")
})
testthat::skip_on_ci()
test_that("pairwise_alignment works with furrr", {
Biostrings::readAAStringSet("fasta.fa")%>%
pairwise_alignment_sequence_identity(
allow_parallelization = "multisession"
) %>%
dplyr::pull("percentage.sequence.identity") %>%
expect_snapshot_value(style = "deparse")
})
test_that("pairwise_alignment works with local and PID2", {
fasta <- Biostrings::readAAStringSet("fasta.fa")
fasta[1:4] %>%
pairwise_alignment_sequence_identity(
aln_type = "local",
pid_type = "PID2",
allow_parallelization = "multisession"
)%>%
dplyr::pull("percentage.sequence.identity") %>%
expect_snapshot_value(style = "deparse")
})
test_that("pairwise_alignment works with overlap and PID3", {
fasta <- Biostrings::readAAStringSet("fasta.fa")
fasta[1:4] %>%
pairwise_alignment_sequence_identity(
aln_type = "overlap",
pid_type = "PID3",
allow_parallelization = "multisession"
)%>%
dplyr::pull("percentage.sequence.identity") %>%
expect_snapshot_value(style = "deparse")
})
test_that("pairwise_alignment works with local and PID4", {
fasta <- Biostrings::readAAStringSet("fasta.fa")
fasta[1:4] %>%
pairwise_alignment_sequence_identity(
aln_type = "local",
pid_type = "PID4",
allow_parallelization = "multisession"
)%>%
dplyr::pull("percentage.sequence.identity") %>%
expect_snapshot_value(style = "deparse")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.