-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from morinlab/kdreval-helpers-setup
Major updates
- Loading branch information
Showing
53 changed files
with
1,046 additions
and
188 deletions.
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
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.