-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
major performance upgrade for get_ssm_by_regions #83
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
af4a4be
add testing ZOMG
rdmorin d89ca28
add foverlaps engine
rdmorin 3eae82d
fix merge conflict
rdmorin c6b4592
transition: move in cool_overlaps
Kdreval 30f327d
new feature: implement overlaps
Kdreval b33d3cd
Merge branch 'master' into rmorin-dev
Kdreval 815f19e
cleanup: drop outdated tests
Kdreval e24b833
cleanup: missing documentation
Kdreval File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,3 +38,6 @@ Imports: | |
tibble, | ||
tidyr | ||
LazyDataCompression: xz | ||
Suggests: | ||
testthat (>= 3.0.0) | ||
Config/testthat/edition: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# This file is part of the standard setup for testthat. | ||
# It is recommended that you do not modify it. | ||
# | ||
# Where should you do additional test configuration? | ||
# Learn more about the roles of various files in: | ||
# * https://r-pkgs.org/tests.html | ||
# * https://testthat.r-lib.org/reference/test_package.html#special-files | ||
|
||
library(testthat) | ||
library(GAMBLR.data) | ||
|
||
test_check("GAMBLR.data") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
|
||
|
||
|
||
test_that("consistent row number", { | ||
expect_equal(nrow(get_gambl_metadata(seq_type_filter=c("genome","capture"))), 4785) | ||
expect_equal(nrow(get_gambl_metadata(seq_type_filter=c("capture"))), 3100) | ||
expect_equal(nrow(get_gambl_metadata(seq_type_filter=c("genome"))), 4785-3100) | ||
}) | ||
|
||
|
||
test_that("all bundled samples in metadata", { | ||
expect_false(any(!unique(c(GAMBLR.data::sample_data$grch37$maf$Tumor_Sample_Barcode, | ||
GAMBLR.data::sample_data$grch37$seg$ID, | ||
GAMBLR.data::sample_data$grch37$bedpe$tumour_sample_id)) %in% GAMBLR.data::sample_data$meta$sample_id) | ||
) | ||
expect_false(any(!unique(c(GAMBLR.data::sample_data$hg38$maf$Tumor_Sample_Barcode, | ||
GAMBLR.data::sample_data$hg38$seg$ID, | ||
GAMBLR.data::sample_data$hg38$bedpe$tumour_sample_id)) %in% GAMBLR.data::sample_data$meta$sample_id) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
test_that("sane subsetting", { | ||
expect_length(id_ease(these_samples_metadata=GAMBLR.data::sample_data$meta, | ||
these_sample_ids = slice_sample(GAMBLR.data::sample_data$meta,n=10) %>% pull(sample_id))$these_samples, 10) | ||
some_sample_ids = slice_sample(GAMBLR.data::sample_data$meta,n=10) %>% pull(sample_id) | ||
#ensure we get back the same sample_id (and no extra), as intended | ||
expect_equal(id_ease(these_samples_metadata=GAMBLR.data::sample_data$meta, | ||
these_sample_ids = some_sample_ids)$these_samples,some_sample_ids) | ||
some_sample_ids = slice_sample(GAMBLR.data::sample_data$meta,n=15) %>% pull(sample_id) | ||
some_sample_ids = c(some_sample_ids,"bonus_feature") | ||
#this test currently fails. Why is this a warning instead of an error? | ||
expect_equal(nrow(id_ease(these_samples_metadata=GAMBLR.data::sample_data$meta, | ||
these_sample_ids = some_sample_ids)$this_metadata),length(some_sample_ids)) | ||
}) | ||
|
||
|
||
|
||
test_that("handles nonsense", { | ||
#this test currently fails. Why is this a warning instead of an error? | ||
expect_length(id_ease(these_samples_metadata=GAMBLR.data::sample_data$meta, | ||
these_sample_ids = c("r2d2","c3P0","Luke","Reddy_3812T"))$these_samples, 1) | ||
|
||
}) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation for the engine parameter needs to be added.