From 86b860fb17137e39938131c29313555e931fcf55 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:14:26 +0100 Subject: [PATCH 01/13] Use markdown in all roxygen helpfiles --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index dbd6fe9..501ab78 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -47,5 +47,6 @@ Remotes: github::mrcieu/genetics.binaRies, github::mrcieu/gwasglue2 Encoding: UTF-8 +Roxygen: list(markdown = TRUE) RoxygenNote: 7.2.3 SystemRequirements: GNU unzip From eaed86c4f822a41950dfbcfdb9ee6ee4e8e2c786 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:14:48 +0100 Subject: [PATCH 02/13] usethis::use_tidy_description() --- DESCRIPTION | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 501ab78..924fed9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -6,8 +6,8 @@ Authors@R: c( comment = c(ORCID = "0000-0003-0920-1055")), person("Tom", "Palmer", , "tom.palmer@bristol.ac.uk", role = "ctb", comment = c(ORCID = "0000-0003-4655-4511")), - person("Rita", "Rasteiro", email="rita.rasteiro@bristol.ac.uk", role = c("ctb"), - comment=c(ORCID = "0000-0002-4217-3060")) + person("Rita", "Rasteiro", , "rita.rasteiro@bristol.ac.uk", role = "ctb", + comment = c(ORCID = "0000-0002-4217-3060")) ) Description: Tools for dealing with GWAS summary data in VCF format. Includes reading, querying, writing, as well as helper functions such @@ -25,6 +25,7 @@ Imports: genetics.binaRies, GenomeInfoDb, GenomicRanges, + gwasglue2, IRanges, magrittr, RCurl, @@ -35,8 +36,7 @@ Imports: stringr, SummarizedExperiment, utils, - VariantAnnotation, - gwasglue2 + VariantAnnotation Suggests: knitr, rmarkdown, From f80a71e6cfd12375a5c32671f28a4a2b3309ca37 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:30:06 +0100 Subject: [PATCH 03/13] Add links and replace gwasvcftools reference --- R/gwasglue.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/gwasglue.R b/R/gwasglue.R index 5c473cd..b6c9e8e 100644 --- a/R/gwasglue.R +++ b/R/gwasglue.R @@ -5,7 +5,7 @@ #' Create a SummarySet #' #' Returns a gwasglue2 SummarySet object -#' @param vcf Path or URL to GWAS-VCF file or VCF object e.g. output from VariantAnnotation::readVcf, gwasvcftools::query_vcf or [query_gwas()] +#' @param vcf Path or URL to GWAS-VCF file or VCF object e.g. output from [VariantAnnotation::readVcf()], [create_vcf()] or [query_gwas()] #' @export gwasvcf_to_summaryset <- function(vcf){ # get metadata from vcf and create metadata object From 18caad2ed789e4eb911eb3fc2d7f0ff6cdedd806 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:30:23 +0100 Subject: [PATCH 04/13] Add links and replace gwasvcftools reference --- R/query.r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/query.r b/R/query.r index f217c3f..0acf683 100644 --- a/R/query.r +++ b/R/query.r @@ -2,7 +2,7 @@ #' #' Read in GWAS summary data with filters on datasets (if multiple datasets per file) and/or chromosome/position, rsids or pvalues. Chooses most optimal choice for the detected operating system. Typically chrompos searches are the fastest. On Windows, rsid or pvalue filters from a file will be slow. #' -#' @param vcf Path or URL to GWAS-VCF file or VCF object e.g. output from VariantAnnotation::readVcf or gwasvcftools::query_vcf +#' @param vcf Path or URL to GWAS-VCF file or VCF object e.g. output from [VariantAnnotation::readVcf()] or [create_vcf()] #' @param chrompos Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns `chrom`, `start`, `end`. #' @param rsid Vector of rsids #' @param pval P-value threshold (NOT -log10) From 1f94ca6e2be0df1379c8b4568445b7f238b7a227 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:34:06 +0100 Subject: [PATCH 05/13] Replace reference to old gwasvcftools package --- vignettes/guide.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/guide.Rmd b/vignettes/guide.Rmd index c1f36d9..62e6c0e 100644 --- a/vignettes/guide.Rmd +++ b/vignettes/guide.Rmd @@ -347,7 +347,7 @@ You may want to first harmonise the data so that all the non-effect alleles are Although still under development, if compared with its predecessor, the [gwasglue2](https://mrcieu.github.io/gwasglue2/) package has several new features, including the use of S4 R objects. -It is possible to create a `SummarySet` object from a GWAS-VCF file or VCF object e.g. output from `VariantAnnotation::readVcf()`, `gwasvcftools::query_vcf()` or `query_gwas()` using the `gwasvcf_to_summaryset()` function. +It is possible to create a `SummarySet` object from a GWAS-VCF file or VCF object e.g. output from `VariantAnnotation::readVcf()`, `create_vcf()` or `query_gwas()` using the `gwasvcf_to_summaryset()` function. For example: From 6b2bce18a37e26e5fdb049a84c3025c56eeb32c2 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:34:21 +0100 Subject: [PATCH 06/13] Amend formatting for md --- R/pval_index.r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/pval_index.r b/R/pval_index.r index 372829a..6534ea8 100644 --- a/R/pval_index.r +++ b/R/pval_index.r @@ -1,6 +1,6 @@ #' Create pval index from GWAS-VCF file #' -#' Create a separate file called .pvali which is used to speed up p-value queries +#' Create a separate file called `.pvali` which is used to speed up p-value queries. #' #' @param vcffile VCF filename #' @param maximum_pval Maximum p-value to include. Default = 0.05 From 1136c5a282813ab9e419513ce477b7443238d73d Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:34:33 +0100 Subject: [PATCH 07/13] devtools::document() --- man/create_pval_index_from_vcf.Rd | 2 +- man/gwasvcf_to_summaryset.Rd | 2 +- man/parse_chrompos.Rd | 2 +- man/query_chrompos_bcftools.Rd | 2 +- man/query_chrompos_file.Rd | 2 +- man/query_chrompos_vcf.Rd | 2 +- man/query_gwas.Rd | 4 ++-- man/vcflist_overlaps.Rd | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/man/create_pval_index_from_vcf.Rd b/man/create_pval_index_from_vcf.Rd index cc74fb0..a2e8e0f 100644 --- a/man/create_pval_index_from_vcf.Rd +++ b/man/create_pval_index_from_vcf.Rd @@ -14,5 +14,5 @@ create_pval_index_from_vcf(vcffile, maximum_pval, indexname) \item{indexname}{index file name to create. Deletes existing file if exists.} } \description{ -Create a separate file called .pvali which is used to speed up p-value queries +Create a separate file called \verb{.pvali} which is used to speed up p-value queries. } diff --git a/man/gwasvcf_to_summaryset.Rd b/man/gwasvcf_to_summaryset.Rd index a501489..126d825 100644 --- a/man/gwasvcf_to_summaryset.Rd +++ b/man/gwasvcf_to_summaryset.Rd @@ -7,7 +7,7 @@ gwasvcf_to_summaryset(vcf) } \arguments{ -\item{vcf}{Path or URL to GWAS-VCF file or VCF object e.g. output from VariantAnnotation::readVcf, gwasvcftools::query_vcf or [query_gwas()]} +\item{vcf}{Path or URL to GWAS-VCF file or VCF object e.g. output from \code{\link[VariantAnnotation:readVcf-methods]{VariantAnnotation::readVcf()}}, \code{\link[=create_vcf]{create_vcf()}} or \code{\link[=query_gwas]{query_gwas()}}} } \description{ Returns a gwasglue2 SummarySet object diff --git a/man/parse_chrompos.Rd b/man/parse_chrompos.Rd index 97e4c0b..76811bd 100644 --- a/man/parse_chrompos.Rd +++ b/man/parse_chrompos.Rd @@ -7,7 +7,7 @@ parse_chrompos(chrompos, radius = NULL) } \arguments{ -\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns `chrom`, `start`, `end`.} +\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns \code{chrom}, \code{start}, \code{end}.} \item{radius}{Add radius to the specified positions. Default = NULL} } diff --git a/man/query_chrompos_bcftools.Rd b/man/query_chrompos_bcftools.Rd index fd661aa..ccd398c 100644 --- a/man/query_chrompos_bcftools.Rd +++ b/man/query_chrompos_bcftools.Rd @@ -7,7 +7,7 @@ query_chrompos_bcftools(chrompos, vcffile, id = NULL) } \arguments{ -\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns `chrom`, `start`, `end`.} +\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns \code{chrom}, \code{start}, \code{end}.} \item{vcffile}{Path to .vcf.gz GWAS summary data file} diff --git a/man/query_chrompos_file.Rd b/man/query_chrompos_file.Rd index e2f07c9..d75c74c 100644 --- a/man/query_chrompos_file.Rd +++ b/man/query_chrompos_file.Rd @@ -7,7 +7,7 @@ query_chrompos_file(chrompos, vcffile, id = NULL, build = "GRCh37") } \arguments{ -\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns `chrom`, `start`, `end`.} +\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns \code{chrom}, \code{start}, \code{end}.} \item{vcffile}{Path to .vcf.gz GWAS summary data file} diff --git a/man/query_chrompos_vcf.Rd b/man/query_chrompos_vcf.Rd index 78ceb13..cd11134 100644 --- a/man/query_chrompos_vcf.Rd +++ b/man/query_chrompos_vcf.Rd @@ -7,7 +7,7 @@ query_chrompos_vcf(chrompos, vcf, id = NULL) } \arguments{ -\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns `chrom`, `start`, `end`.} +\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns \code{chrom}, \code{start}, \code{end}.} \item{vcf}{VCF object (e.g. from readVcf)} diff --git a/man/query_gwas.Rd b/man/query_gwas.Rd index ed92bc2..f97a2ca 100644 --- a/man/query_gwas.Rd +++ b/man/query_gwas.Rd @@ -24,9 +24,9 @@ query_gwas( ) } \arguments{ -\item{vcf}{Path or URL to GWAS-VCF file or VCF object e.g. output from VariantAnnotation::readVcf or gwasvcftools::query_vcf} +\item{vcf}{Path or URL to GWAS-VCF file or VCF object e.g. output from \code{\link[VariantAnnotation:readVcf-methods]{VariantAnnotation::readVcf()}} or \code{\link[=create_vcf]{create_vcf()}}} -\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns `chrom`, `start`, `end`.} +\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns \code{chrom}, \code{start}, \code{end}.} \item{rsid}{Vector of rsids} diff --git a/man/vcflist_overlaps.Rd b/man/vcflist_overlaps.Rd index 950860e..5799860 100644 --- a/man/vcflist_overlaps.Rd +++ b/man/vcflist_overlaps.Rd @@ -9,7 +9,7 @@ vcflist_overlaps(vcflist, chrompos) \arguments{ \item{vcflist}{List of VCF objects, or list of VCF filenames, or mix of VCF objects and filenames} -\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns `chrom`, `start`, `end`.} +\item{chrompos}{Either vector of chromosome and position ranges e.g. "1:1000" or "1:1000-2000", or data frame with columns \code{chrom}, \code{start}, \code{end}.} } \value{ List of VCFs From fd8120f5e6b1a117bed4fc3f2ee8c30d9284377a Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:38:09 +0100 Subject: [PATCH 08/13] Delete blank line --- R/gwasglue.R | 1 - 1 file changed, 1 deletion(-) diff --git a/R/gwasglue.R b/R/gwasglue.R index b6c9e8e..782c30c 100644 --- a/R/gwasglue.R +++ b/R/gwasglue.R @@ -19,4 +19,3 @@ gwasvcf_to_summaryset <- function(vcf){ return(s) } - From 81ed6883c1f903b1292e8d72204045a1064d765b Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:38:17 +0100 Subject: [PATCH 09/13] Delete blank line --- vignettes/guide.Rmd | 1 - 1 file changed, 1 deletion(-) diff --git a/vignettes/guide.Rmd b/vignettes/guide.Rmd index 62e6c0e..7883992 100644 --- a/vignettes/guide.Rmd +++ b/vignettes/guide.Rmd @@ -358,4 +358,3 @@ summaryset <- readVcf(vcffile) %>% ``` Once the `SummarySet` objects are created, it is possible to use `gwasglue2` to harmonise data, harmonise against a LD matrix, remap genomic coordinates to a different genome assembly, convert to other formats and more. - From 127be09a35e09d585f570d10491bdffaa5b46d43 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:41:53 +0100 Subject: [PATCH 10/13] Delete release date --- NEWS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index fc961ab..bbf6854 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,4 @@ # gwasvcf 0.1.2 -(Release date: 10-08-2023) * New gwasvcf_to_summaryset function to create a [gwasglue2](https://mrcieu.github.io/gwasglue2) Summaryset object from a vcf file * Fixed error in get_ld_proxies related with argument validate, deprecated in as_tibble() (tibble 2.0.0) From 93c7a681a8996e26a6989efc678d98e6cab0914c Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:42:12 +0100 Subject: [PATCH 11/13] Edit formatting --- NEWS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index bbf6854..ae7a058 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,5 @@ # gwasvcf 0.1.2 -* New gwasvcf_to_summaryset function to create a [gwasglue2](https://mrcieu.github.io/gwasglue2) Summaryset object from a vcf file -* Fixed error in get_ld_proxies related with argument validate, deprecated in as_tibble() (tibble 2.0.0) +* New `gwasvcf_to_summaryset()` function to create a [gwasglue2](https://mrcieu.github.io/gwasglue2) Summaryset object from a vcf file +* Fixed error in `get_ld_proxies()` related with argument `validate`, deprecated in `as_tibble()` (tibble 2.0.0) From 99042ab23b0050faab8d792f6343878d8b40c64b Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:44:01 +0100 Subject: [PATCH 12/13] Delete blank line --- NEWS.md | 1 - 1 file changed, 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index ae7a058..4624c6d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,4 +2,3 @@ * New `gwasvcf_to_summaryset()` function to create a [gwasglue2](https://mrcieu.github.io/gwasglue2) Summaryset object from a vcf file * Fixed error in `get_ld_proxies()` related with argument `validate`, deprecated in `as_tibble()` (tibble 2.0.0) - From 8c49368462016092cfadfe156465697e84b09d5a Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:49:01 +0100 Subject: [PATCH 13/13] Fix Summaryset to SummarySet --- NEWS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 4624c6d..53ba5b2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ # gwasvcf 0.1.2 -* New `gwasvcf_to_summaryset()` function to create a [gwasglue2](https://mrcieu.github.io/gwasglue2) Summaryset object from a vcf file +* New `gwasvcf_to_summaryset()` function to create a [gwasglue2](https://mrcieu.github.io/gwasglue2) SummarySet object from a vcf file * Fixed error in `get_ld_proxies()` related with argument `validate`, deprecated in `as_tibble()` (tibble 2.0.0)