tests/testthat/test.hmoment.R

# COMPARED TO EMBOSS:HMOMENT
# http://emboss.bioinformatics.nl/cgi-bin/emboss/hmoment
# SEQUENCE: FLPVLAGLTPSIVPKLVCLLTKKC
# ALPHA-HELIX 100º : 0.56
# BETA-SHEET  160º : 0.25

# ALPHA HELIX VALUE
test_that("hmoment function: output value is wrong",{
  expect_equal(hmoment(seq = "FLPVLAGLTPSIVPKLVCLLTKKC",angle = 100,window = 11), 0.520,tolerance = 0.01)
})

# BETA SHEET VALUE
test_that("hmoment function: output value is wrong",{
  expect_equal(hmoment(seq = "FLPVLAGLTPSIVPKLVCLLTKKC",angle = 160,window = 11), 0.271,tolerance = 0.01)
})
  

# CHECK OUTPUT CLASS
test_that("hmoment function: output class is wrong",{
  expect_true(is.numeric(hmoment(seq = "FLPVLAGLTPSIVPKLVCLLTKKC",angle = 100)))
})

Try the Peptides package in your browser

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

Peptides documentation built on May 31, 2023, 9:47 p.m.