tests/testthat/test_maxORF.R

context("Just testing maxORF functionality")

test_that("Check whether maxORF_DNA find ORF with maximum length",{

  maxorf<-as.vector(maxORF(seqs="ATGAATGCCCCGTTAACATAG"))
  expected<-"ATGAATGCCCCGTTAACATAG"
  names(expected)<-NULL
  expect_equal(maxorf,expected)
})

test_that("Check whether maxORF_DNA works properly k=1",{

  maxorf<-maxORF(seqs="ATTGAATAGCCCCGTTAACATAG")
  names(maxorf)<-NULL
  expect_equal(length(maxorf),0)
})

test_that("Check whether maxORF_RNA find ORF with maximum length",{

  maxorf<-as.vector(maxORF_RNA(seqs="AUGAAUGCCCCGUUAACAUAG"))
  expected<-"AUGAAUGCCCCGUUAACAUAG"
  names(expected)<-NULL
  expect_equal(maxorf,expected)
})

Try the ftrCOOL package in your browser

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

ftrCOOL documentation built on Nov. 30, 2021, 1:07 a.m.