-
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 updates #34
Merged
Merged
Major updates #34
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0b9390e
function migration: move out review_hotspots to data
Kdreval 2d16ab2
bug fix: fixing examples error
Kdreval 991cd8d
cleanup: add missing documentation
Kdreval 4d411de
new feature: test actions setup
Kdreval 03881d6
cleanup: drop reshape2 dependency
Kdreval a8d6271
bug fix: specify repos for check
Kdreval 8c7ced8
bug fix: add cbioportal to recipe
Kdreval eae3bc1
bug fix: conda priority order
Kdreval d2a2d87
bug fix: update packages from conda-forge
Kdreval e7791d8
cleanup: finalize github actions check
Kdreval 8839fc1
pr comments: improve 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: GAMBLR.helpers build check | ||
|
||
on: | ||
pull_request: | ||
branches: [master] | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
R_KEEP_PKG_SOURCE: yes | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Conda | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.11 | ||
|
||
- name: Create conda environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: r | ||
channels: conda-forge,defaults | ||
python-version: 3.11 | ||
auto-activate-base: false | ||
environment-file: envs/r.yaml | ||
|
||
- name: Build package | ||
run: | ||
Rscript -e "devtools::install()" | ||
|
||
- name: Check package | ||
run: | ||
Rscript -e "devtools::check(vignettes = FALSE, args = '--no-examples')" | ||
|
||
- name: Upload check results | ||
if: failure() | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | ||
path: check |
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 |
---|---|---|
|
@@ -17,7 +17,6 @@ Imports: | |
ggthemes, | ||
philentropy, | ||
readr, | ||
reshape2, | ||
stringr, | ||
tibble, | ||
tidyr, | ||
|
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#' @title Return TMB counts. | ||
#' @title Calculate tumour mutation burden. | ||
#' | ||
#' @description This function implements tumor mutation burden calculation. | ||
#' TODO: add more details. | ||
|
@@ -31,7 +31,7 @@ | |
#' maf1, | ||
#' regions_bed = grch37_ashm_regions | ||
#' ) | ||
#' #' calculate_tmb( | ||
#' calculate_tmb( | ||
#' maf1, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The title of this function should probably be "calculate tumour mutation burden", to be more intuitive and self-explanatory There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks - Updated the title! |
||
#' regions_bed = grch37_ashm_regions, | ||
#' subset_to_nonSyn = FALSE | ||
|
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
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
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
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 |
---|---|---|
@@ -1,9 +1,33 @@ | ||
#helper function to get the unmatched normals from the main config | ||
#' @title Get unmatched normals. | ||
#' | ||
#' @description Helper function to get the unmatched normals from the main | ||
#' config. | ||
#' | ||
#' @param seq_type_filter Seq type key from config for which to return the | ||
#' unmatched normals for. | ||
#' | ||
#' @return data frame | ||
#' | ||
#' @import dplyr tidyr tibble | ||
#' @export | ||
get_unmatched_normals = function(seq_type_filter){ | ||
a = check_config_value(config::get("unmatched_normal_ids")) | ||
df = melt(a,value.name="normal_sample_id") %>% | ||
rename(c("genome_build"="L3","seq_type"="L2","unix_group"="L1")) %>% | ||
dplyr::filter(seq_type == seq_type_filter) | ||
return(df) | ||
a <- check_config_value(config::get("unmatched_normal_ids")) | ||
df <- a %>% | ||
as.data.frame( | ||
check.names = FALSE | ||
) %>% | ||
t %>% | ||
as.data.frame() %>% | ||
tibble::rownames_to_column("rownames") %>% | ||
tidyr::separate( | ||
rownames, | ||
into = c("unix_group", "seq_type", "genome_build"), | ||
sep = "\\." | ||
) %>% | ||
dplyr::select( | ||
"normal_sample_id" = "V1", | ||
genome_build, seq_type, unix_group | ||
) %>% | ||
dplyr::filter(seq_type == seq_type_filter) | ||
return(df) | ||
} |
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
Oops, something went wrong.
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.
Maybe we should say "nothing" for the return or (better yet) make functions like this one return the "full path to the file that was written"
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.
Agree, added this to this function and other similar functions that were writing files