-
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.
rescue parseCSQToGRanges from ensemblVEP
- Loading branch information
Showing
7 changed files
with
139 additions
and
59 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 |
---|---|---|
|
@@ -52,9 +52,9 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
config: | ||
- { os: ubuntu-latest, r: '4.1', bioc: '3.14', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" } | ||
- { os: macOS-latest, r: '4.1', bioc: '3.14'} | ||
##- { os: windows-latest, r: '4.1', bioc: '3.14'} | ||
- { os: ubuntu-latest, r: 'devel', bioc: '3.20', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" } | ||
- { os: macOS-latest, r: 'devel', bioc: '3.20'} | ||
# - { os: windows-latest, r: 'devel', bioc: '3.20'} | ||
## Check https://github.com/r-lib/actions/tree/master/examples | ||
## for examples using the http-user-agent | ||
env: | ||
|
@@ -79,20 +79,20 @@ jobs: | |
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml | ||
## If they update their steps, we will also need to update ours. | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
## R is already included in the Bioconductor docker images | ||
- name: Setup R from r-lib | ||
if: runner.os != 'Linux' | ||
uses: r-lib/actions/setup-r@master | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.config.r }} | ||
http-user-agent: ${{ matrix.config.http-user-agent }} | ||
|
||
## pandoc is already included in the Bioconductor docker images | ||
- name: Setup pandoc from r-lib | ||
if: runner.os != 'Linux' | ||
uses: r-lib/actions/setup-pandoc@master | ||
uses: r-lib/actions/setup-pandoc@v2 | ||
|
||
- name: Query dependencies | ||
run: | | ||
|
@@ -102,19 +102,19 @@ jobs: | |
|
||
- name: Restore R package cache | ||
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os != 'Linux'" | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.1- | ||
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel- | ||
|
||
- name: Cache R packages on Linux | ||
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' " | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: /home/runner/work/_temp/Library | ||
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-4.1- | ||
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-devel-r-devel- | ||
|
||
- name: Install Linux system dependencies | ||
if: runner.os == 'Linux' | ||
|
@@ -143,6 +143,9 @@ jobs: | |
## Required for tcltk | ||
brew install xquartz --cask | ||
## Required for terra | ||
brew install gdal | ||
- name: Install Windows system dependencies | ||
if: runner.os == 'Windows' | ||
run: | | ||
|
@@ -176,7 +179,7 @@ jobs: | |
gha_repos <- if( | ||
.Platform$OS.type == "unix" && Sys.info()["sysname"] != "Darwin" | ||
) c( | ||
"AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/3.14/bioc", | ||
"AnVIL" = "https://bioconductordocker.blob.core.windows.net/packages/3.20/bioc", | ||
BiocManager::repositories() | ||
) else BiocManager::repositories() | ||
|
@@ -210,15 +213,15 @@ jobs: | |
shell: Rscript {0} | ||
|
||
- name: Install covr | ||
if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux' | ||
if: github.ref == 'refs/heads/devel' && env.run_covr == 'true' && runner.os == 'Linux' | ||
run: | | ||
remotes::install_cran("covr") | ||
shell: Rscript {0} | ||
|
||
- name: Install pkgdown | ||
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
run: | | ||
remotes::install_github("r-lib/pkgdown") | ||
remotes::install_cran("pkgdown") | ||
shell: Rscript {0} | ||
|
||
- name: Session info | ||
|
@@ -259,27 +262,28 @@ jobs: | |
run: | | ||
BiocCheck::BiocCheck( | ||
dir('check', 'tar.gz$', full.names = TRUE), | ||
`quit-with-status` = TRUE, | ||
`quit-with-status` = FALSE, | ||
`no-check-R-ver` = TRUE, | ||
`no-check-bioc-help` = TRUE | ||
) | ||
shell: Rscript {0} | ||
|
||
- name: Test coverage | ||
if: github.ref == 'refs/heads/master' && env.run_covr == 'true' && runner.os == 'Linux' | ||
if: github.ref == 'refs/heads/devel' && env.run_covr == 'true' && runner.os == 'Linux' | ||
run: | | ||
covr::codecov() | ||
shell: Rscript {0} | ||
|
||
- name: Install package | ||
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
run: R CMD INSTALL . | ||
|
||
- name: Build and deploy pkgdown site | ||
if: github.ref == 'refs/heads/master' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
if: github.ref == 'refs/heads/devel' && env.run_pkgdown == 'true' && runner.os == 'Linux' | ||
run: | | ||
git config --local user.name "$GITHUB_ACTOR" | ||
git config --local user.email "[email protected]" | ||
git config --global user.name "$GITHUB_ACTOR" | ||
git config --global user.email "[email protected]" | ||
git config --global --add safe.directory /__w/kevinrue/TVTB | ||
Rscript -e "pkgdown::deploy_to_branch(new_process = FALSE)" | ||
shell: bash {0} | ||
## Note that you need to run pkgdown::deploy_to_branch(new_process = FALSE) | ||
|
@@ -291,7 +295,7 @@ jobs: | |
if: failure() | ||
uses: actions/upload-artifact@master | ||
with: | ||
name: ${{ runner.os }}-biocversion-devel-r-4.1-results | ||
name: ${{ runner.os }}-biocversion-devel-r-devel-results | ||
path: check | ||
|
||
- uses: docker/build-push-action@v1 | ||
|
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,8 +1,8 @@ | ||
Package: TVTB | ||
Type: Package | ||
Title: TVTB: The VCF Tool Box | ||
Version: 1.31.0 | ||
Date: 2021-08-30 | ||
Version: 1.31.1 | ||
Date: 2024-07-04 | ||
Authors@R: person("Kevin", "Rue-Albrecht", role = c("aut", "cre"), | ||
email = "[email protected]") | ||
Description: The package provides S4 classes and methods to filter, | ||
|
@@ -14,20 +14,47 @@ Description: The package provides S4 classes and methods to filter, | |
Shiny Variant Explorer (tSVE). | ||
License: Artistic-2.0 | ||
Depends: R (>= 3.4), methods, utils, stats | ||
Imports: AnnotationFilter, BiocGenerics (>= 0.25.1), BiocParallel, Biostrings, | ||
ensembldb, ensemblVEP, GenomeInfoDb, GenomicRanges, GGally, ggplot2, Gviz, | ||
limma, IRanges (>= 2.21.6), reshape2, Rsamtools, S4Vectors (>= 0.25.14), | ||
SummarizedExperiment, VariantAnnotation (>= 1.19.9) | ||
Imports: | ||
AnnotationFilter, | ||
BiocGenerics (>= 0.25.1), | ||
BiocParallel, | ||
Biostrings, | ||
ensembldb, | ||
GenomeInfoDb, | ||
GenomicRanges, | ||
GGally, | ||
ggplot2, | ||
Gviz, | ||
limma, | ||
IRanges (>= 2.21.6), | ||
reshape2, | ||
Rsamtools, | ||
S4Vectors (>= 0.25.14), | ||
SummarizedExperiment, | ||
VariantAnnotation (>= 1.19.9) | ||
Suggests: EnsDb.Hsapiens.v75 (>= 0.99.7), shiny (>= 0.13.2.9005), DT | ||
(>= 0.1.67), rtracklayer, BiocStyle (>= 2.5.19), knitr (>= 1.12), | ||
rmarkdown, testthat, covr, pander | ||
biocViews: Software, Genetics, GeneticVariability, GenomicVariation, | ||
DataRepresentation, GUI, Genetics, DNASeq, WholeGenome, | ||
Visualization, MultipleComparison, DataImport, | ||
VariantAnnotation, Sequencing, Coverage, Alignment, | ||
biocViews: | ||
Software, | ||
Genetics, | ||
GeneticVariability, | ||
GenomicVariation, | ||
DataRepresentation, | ||
GUI, | ||
Genetics, | ||
DNASeq, | ||
WholeGenome, | ||
Visualization, | ||
MultipleComparison, | ||
DataImport, | ||
VariantAnnotation, | ||
Sequencing, | ||
Coverage, | ||
Alignment, | ||
SequenceMatching | ||
Collate: utils.R tSVE.R AllClasses.R AllGenerics.R Genotypes-class.R | ||
TVTBparam-class.R VcfFilterRules-class.R countGenos-methods.R | ||
TVTBparam-class.R VcfFilterRules-class.R parseCSQToGRanges.R countGenos-methods.R | ||
autodetectGenotypes.R addCountGenos-methods.R addFrequencies-methods.R | ||
addOverallFrequencies-methods.R | ||
addPhenoLevelFrequencies-methods.R dropInfo.R readVcf-methods.R | ||
|
@@ -36,4 +63,3 @@ Collate: utils.R tSVE.R AllClasses.R AllGenerics.R Genotypes-class.R | |
VignetteBuilder: knitr | ||
URL: https://github.com/kevinrue/TVTB | ||
BugReports: https://github.com/kevinrue/TVTB/issues | ||
RoxygenNote: 7.1.1 |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
setMethod("parseCSQToGRanges", "VCF", | ||
function(x, VCFRowID=character(), ..., info.key="CSQ") | ||
{ | ||
## no 'info.key' | ||
if (!info.key %in% names(info(x))) | ||
return(rowRanges(x)) | ||
|
||
hdr <- info(header(x))[info.key, "Description"] | ||
nms <- unlist(strsplit(strsplit(hdr, "Format: ")[[1]][2], "\\|")) | ||
ulst <- unlist(info(x)[[info.key]], use.names=FALSE) | ||
## 'info.key' without data | ||
if (all(is.na(ulst))) { | ||
gr <- rowRanges(x) | ||
csq <- | ||
DataFrame(setNames(replicate(length(nms), character(0)), nms)) | ||
} else { | ||
## 'info.key' with data | ||
elt <- elementNROWS(info(x)[[info.key]]) | ||
raw <- strsplit(ulst, "\\|") | ||
csq <- matrix(nrow=length(ulst), ncol=length(nms)) | ||
for (i in 1:nrow(csq)) | ||
csq[i, 1:length(raw[[i]])] <- raw[[i]] | ||
csq[!nzchar(csq)] <- NA | ||
colnames(csq) <- nms | ||
csq <- data.frame(csq, stringsAsFactors=FALSE) | ||
|
||
rd <- rowRanges(x) | ||
gr <- rd[rep(seq_along(rd), elt)] | ||
if (length(VCFRowID)) { | ||
if (any(no_match <- !VCFRowID %in% rownames(x))) | ||
warning(paste0("rownames not found in 'x' : ", | ||
paste(VCFRowID[no_match], collapse=","))) | ||
VCFRowID <- rep(match(rownames(x), VCFRowID), elt) | ||
csq <- DataFrame(VCFRowID=VCFRowID, csq) | ||
} | ||
} | ||
mcols(gr) <- csq | ||
genome(gr) <- genome(x) | ||
gr | ||
} | ||
) |
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