context("test creating taxonomy matrix function")

test_that("get taxonomy IDs for list of taxa", {
    allTaxonInfo <- data.table::fread("taxonNamesTest.txt")
    inputTaxa <- c("272557")

    taxonomyInfo <- getIDsRank(inputTaxa, allTaxonInfo)
    reducedInfoList <- as.data.frame(taxonomyInfo[3])
    expect_that(nrow(reducedInfoList), equals(10))

test_that("create taxonomy matrix file", {
    taxMatrix <- taxonomyTableCreator("idListTest.txt", "rankListTest.txt")
    expect_that(taxMatrix, is_a("data.frame"))

Try the PhyloProfile package in your browser

Any scripts or data that you put into this service are public.

PhyloProfile documentation built on March 27, 2021, 6:01 p.m.