Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tiago Silva authored and Tiago Silva committed May 22, 2023
1 parent b6b7e5a commit 3b51a98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/prepare.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ GDCprepare <- function(
}

cases <- ifelse(
grepl("TCGA|TARGET|CGCI-HTMCP-CC|CPTAC-3",query$results[[1]]$project %>% unlist()),
grepl("TCGA|TARGET|CGCI-HTMCP-CC",query$results[[1]]$project %>% unlist()),
query$results[[1]]$cases,
query$results[[1]]$sample.submitter_id
)
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-prepare-download.R
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ test_that("Gene Level Copy Number is being correctly prepare", {
data <- GDCprepare(query,directory = "ex")

expect_true(all(substr(colnames(data),1,12) == c("TCGA-OR-A5JD","TCGA-OR-A5J7")))
expect_true(data$days_to_last_follow_up == c(3038,NA))
expect_equal(data$days_to_last_follow_up,c(3038,NA))
unlink("ex", recursive = TRUE, force = TRUE)
})

Expand All @@ -174,8 +174,8 @@ test_that("Gene Level Copy Number is being correctly prepare for CPTAC-3", {
GDCdownload(query_CPTAC,directory = "ex")
data <- GDCprepare(query_CPTAC,directory = "ex")
expect_true(ncol(data) == 2)
expect_true(data$submitter_id == c("C3L-02544","C3N-01179"))
expect_true(data$days_to_last_follow_up == c("889","1816"))
expect_equal(data$submitter_id, c("C3L-02544","C3N-01179"))
expect_equal(data$days_to_last_follow_up, c("889","1816"))
unlink("ex", recursive = TRUE, force = TRUE)
})

Expand Down

0 comments on commit 3b51a98

Please sign in to comment.