tests/testthat/test-cbind.R

context("test-cbind")

test_that("cbind works", {

  ## ProteinExperiment
  testPE <- testList[[1]]

  expect_silent(testPE2 <- cbind(testPE[,1:2], testPE[,3:4]))
  expect_equivalent(testPE, testPE2)
  expect_equivalent(colData(testPE), colData(testPE2))
  expect_equivalent(rowData(testPE), rowData(testPE2))
  expect_equivalent(metaoptions(testPE), metaoptions(testPE2))

  ## PeptideExperiment
  testPE <- testList[[2]]

  expect_silent(testPE2 <- cbind(testPE[,1:2], testPE[,3:4]))
  expect_equivalent(testPE, testPE2)
  expect_equivalent(colData(testPE), colData(testPE2))
  expect_equivalent(rowData(testPE), rowData(testPE2))
  expect_equivalent(metaoptions(testPE), metaoptions(testPE2))

  ## ProteomicsExperiment
  testPE <- testList[[3]]

  expect_silent(testPE2 <- cbind(testPE[,1:2], testPE[,3:4]))
  expect_equivalent(testPE@SilacProteinExperiment, testPE2@SilacProteinExperiment)
  expect_equivalent(testPE@SilacPeptideExperiment, testPE2@SilacPeptideExperiment)
  expect_equivalent(colData(testPE), colData(testPE2))
  expect_equivalent(rowDataProt(testPE), rowDataProt(testPE2))
  expect_equivalent(rowDataPept(testPE), rowDataPept(testPE2))
  expect_equivalent(metaoptions(testPE), metaoptions(testPE2))
  expect_equivalent(linkerDf(testPE), linkerDf(testPE2))
})

Try the pulsedSilac package in your browser

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

pulsedSilac documentation built on Nov. 8, 2020, 5:13 p.m.