Skip to content
This repository has been archived by the owner on Jun 1, 2020. It is now read-only.

Commit

Permalink
Fix use of 'sca_motif_tiny' dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangehring committed Nov 2, 2015
1 parent d70ac4e commit 3f7a5c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion man/motif-functions.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ motifMatrix(vr, group = "sampleNames", normalize = TRUE)
\examples{
data(sca_motifs_tiny)

motifMatrix(sca_motifs, group = "study")
motifMatrix(sca_motifs_tiny, group = "study")
}
14 changes: 5 additions & 9 deletions tests/testthat/test-SomaticSignatures.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,24 +135,20 @@ test_that("datasets for processing are available", {

})


context("motifMatrix")

test_that("'motifMatrix' works", {

data(sca_motifs_tiny)
vr = sca_motifs_tiny

vr1 = readMutect(mutect_path)
vr1 = mutationContextMutect(vr1)
vr = readMutect(mutect_path, strip = TRUE)
sampleNames(vr) = ifelse(start(vr) %% 2 == 0, "T", "N")
vr$context = vr1$context.1
vr$alteration = vr1$alteration

mm = motifMatrix(vr)
mm = motifMatrix(vr, "study")

expect_equal( nrow(mm), 96 )
expect_equal( ncol(mm), 2 )
expect_equal( ncol(mm), nlevels(vr$study) )

expect_true( all(colSums(mm) == 1) )
})


Expand Down

0 comments on commit 3f7a5c5

Please sign in to comment.