From cc4d0222b03e088fa1438fa47a65d223bcb7ead1 Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Wed, 9 Aug 2023 16:11:38 +0100 Subject: [PATCH 01/24] add .name_repair Trying to avoid error in checks: (still not working) - Quitting from lines 271-273 [unnamed-chunk-28] (guide.Rmd) Error: processing vignette 'guide.Rmd' failed with diagnostics: The `validate` argument of `as_tibble()` was deprecated in tibble 2.0.0 and is now defunct. Please use the `.name_repair` argument instead. --- R/manipulate.r | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/manipulate.r b/R/manipulate.r index bfcf8be..6805b3f 100644 --- a/R/manipulate.r +++ b/R/manipulate.r @@ -191,7 +191,7 @@ vcf_to_tibble <- function(vcf, id=NULL) return(dplyr::tibble()) } S4Vectors::values(a)[["rsid"]] <- names(a) - return(dplyr::as_tibble(a)) + return(dplyr::as_tibble(a, .name_repair = "minimal")) } From e80f6525caa20f6d35b8a526d8b178452e8e013e Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Wed, 9 Aug 2023 16:11:56 +0100 Subject: [PATCH 02/24] new gwasglue2 section --- vignettes/guide.Rmd | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/vignettes/guide.Rmd b/vignettes/guide.Rmd index f177ed1..c1f36d9 100644 --- a/vignettes/guide.Rmd +++ b/vignettes/guide.Rmd @@ -342,3 +342,20 @@ writeVcf(out, file="temp.vcf") ``` You may want to first harmonise the data so that all the non-effect alleles are aligned to the human genome reference. See the [gwasglue](https://github.com/MRCIEU/gwasglue) package on some functions to do this. + +## Creating a gwasglue2 SummarySet object from a vcf file + +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. + + +For example: + +```{r, eval=FALSE} +summaryset <- readVcf(vcffile) %>% + gwasvcf_to_summaryset() +``` + +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 49da6ed1aa547e7be1366f3cea244c0420a248a2 Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Wed, 9 Aug 2023 16:12:48 +0100 Subject: [PATCH 03/24] creating a gwasglue2 SummarySet --- R/gwasglue.R | 22 ++++++++++++++++++++++ man/gwasvcf_to_summaryset.Rd | 14 ++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 R/gwasglue.R create mode 100644 man/gwasvcf_to_summaryset.Rd diff --git a/R/gwasglue.R b/R/gwasglue.R new file mode 100644 index 0000000..0243c5b --- /dev/null +++ b/R/gwasglue.R @@ -0,0 +1,22 @@ +# This file contains the functions to create a gwasglue2 SummarySet object + + + +#' 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()] +#' @export +gwasvcf_to_summaryset <- function(vcf){ + # get metadata from vcf and create metadata object + md <- gwasglue2::create_metadata(id = vcf@metadata$header@samples, build = unique(VariantAnnotation::meta(header(vcf))$contig$assembly) ) + + # get summary data and create SummarySet + + s <- vcf %>% + vcf_to_tibble(.) %>% + gwasglue2::create_summaryset_from_gwasvcf(., metadata = md) + + return(s) +} + diff --git a/man/gwasvcf_to_summaryset.Rd b/man/gwasvcf_to_summaryset.Rd new file mode 100644 index 0000000..a501489 --- /dev/null +++ b/man/gwasvcf_to_summaryset.Rd @@ -0,0 +1,14 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/gwasglue.R +\name{gwasvcf_to_summaryset} +\alias{gwasvcf_to_summaryset} +\title{Create a SummarySet} +\usage{ +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()]} +} +\description{ +Returns a gwasglue2 SummarySet object +} From 5aa53dac2ae3b57dc424f982c4c93f2834ea2714 Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Wed, 9 Aug 2023 16:13:02 +0100 Subject: [PATCH 04/24] import gwasglue2 --- DESCRIPTION | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index eb9805d..9f9adf8 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -33,7 +33,8 @@ Imports: stringr, SummarizedExperiment, utils, - VariantAnnotation + VariantAnnotation, + gwasglue2 Suggests: knitr, rmarkdown, @@ -41,7 +42,8 @@ Suggests: VignetteBuilder: knitr Remotes: - github::mrcieu/genetics.binaRies + github::mrcieu/genetics.binaRies, + github::mrcieu/gwasglue2 Encoding: UTF-8 -RoxygenNote: 7.2.2 +RoxygenNote: 7.2.3 SystemRequirements: GNU unzip From 244d35c35281391be1b2f5ad5e9eabd5e8e2cbdc Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Wed, 9 Aug 2023 16:13:20 +0100 Subject: [PATCH 05/24] add export --- NAMESPACE | 1 + 1 file changed, 1 insertion(+) diff --git a/NAMESPACE b/NAMESPACE index 7abd5f4..4b705e2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,6 +9,7 @@ export(create_rsidx_index_from_vcf) export(create_rsidx_sub_index) export(create_vcf) export(get_ld_proxies) +export(gwasvcf_to_summaryset) export(merge_vcf) export(parse_chrompos) export(proxy_match) From 8b3c02c138d2ce7ee97100a0d0d1cc6421e7b979 Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Wed, 9 Aug 2023 16:58:39 +0100 Subject: [PATCH 06/24] add .name_repair='minimal' --- R/proxy.r | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/proxy.r b/R/proxy.r index 773b58f..dbe32fb 100644 --- a/R/proxy.r +++ b/R/proxy.r @@ -56,7 +56,7 @@ get_ld_proxies <- function(rsid, bfile, searchspace=NULL, tag_kb=5000, tag_nsnp= return(ld) } ld <- data.table::fread(paste0("gunzip -c ", outname), header=TRUE) %>% - dplyr::as_tibble() %>% + dplyr::as_tibble(.data, .name_repair="minimal") %>% dplyr::filter(.data[["R"]]^2 > tag_r2) %>% dplyr::filter(.data[["SNP_A"]] != .data[["SNP_B"]]) %>% dplyr::mutate(PHASE=gsub("/", "", .data[["PHASE"]])) %>% @@ -99,7 +99,7 @@ sqlite_ld_proxies <- function(rsids, dbfile, tag_r2) numid <- gsub("rs", "", rsids) %>% paste(collapse=",") query <- paste0("SELECT DISTINCT * FROM tags WHERE SNP_A IN (", numid, ")") ld <- RSQLite::dbGetQuery(conn, query) %>% - dplyr::as_tibble() %>% + dplyr::as_tibble(.data, .name_repair="minimal") %>% dplyr::filter(.data[["R"]]^2 > tag_r2) %>% dplyr::filter(.data[["SNP_A"]] != .data[["SNP_B"]]) %>% dplyr::mutate(PHASE=gsub("/", "", .data[["PHASE"]])) %>% From 0b06fa66dc8a078e61f68a39e96b67a8b67d8eff Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Thu, 10 Aug 2023 11:22:20 +0100 Subject: [PATCH 07/24] Add NEWS.md --- NEWS.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 NEWS.md diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..3a450b9 --- /dev/null +++ b/NEWS.md @@ -0,0 +1,3 @@ +# gwasvcf 0.1.2 + +* Initial CRAN submission. From 3ee93b4781430d9618b06e06e60852b6b1c309d6 Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Thu, 10 Aug 2023 11:37:23 +0100 Subject: [PATCH 08/24] fix check() --- R/proxy.r | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/R/proxy.r b/R/proxy.r index dbe32fb..ec79757 100644 --- a/R/proxy.r +++ b/R/proxy.r @@ -56,7 +56,7 @@ get_ld_proxies <- function(rsid, bfile, searchspace=NULL, tag_kb=5000, tag_nsnp= return(ld) } ld <- data.table::fread(paste0("gunzip -c ", outname), header=TRUE) %>% - dplyr::as_tibble(.data, .name_repair="minimal") %>% + dplyr::as_tibble(.name_repair="minimal") %>% dplyr::filter(.data[["R"]]^2 > tag_r2) %>% dplyr::filter(.data[["SNP_A"]] != .data[["SNP_B"]]) %>% dplyr::mutate(PHASE=gsub("/", "", .data[["PHASE"]])) %>% @@ -70,9 +70,9 @@ get_ld_proxies <- function(rsid, bfile, searchspace=NULL, tag_kb=5000, tag_nsnp= message("No proxies found") return(ld) } - temp <- do.call(rbind, strsplit(ld[["PHASE"]], "")) %>% dplyr::as_tibble(.data, .name_repair="minimal") + temp <- do.call(rbind, strsplit(ld[["PHASE"]], "")) %>% dplyr::as_tibble(.name_repair="minimal") names(temp) <- c("A1", "B1", "A2", "B2") - ld <- cbind(ld, temp) %>% dplyr::as_tibble(.data, .name_repair="minimal") + ld <- cbind(ld, temp) %>% dplyr::as_tibble(.name_repair="minimal") # ld <- dplyr::arrange(ld, desc(abs(R))) %>% # dplyr::filter(!duplicated(SNP_A)) ld <- dplyr::arrange(ld, dplyr::desc(abs(.data[["R"]]))) @@ -99,16 +99,16 @@ sqlite_ld_proxies <- function(rsids, dbfile, tag_r2) numid <- gsub("rs", "", rsids) %>% paste(collapse=",") query <- paste0("SELECT DISTINCT * FROM tags WHERE SNP_A IN (", numid, ")") ld <- RSQLite::dbGetQuery(conn, query) %>% - dplyr::as_tibble(.data, .name_repair="minimal") %>% + dplyr::as_tibble(.name_repair="minimal") %>% dplyr::filter(.data[["R"]]^2 > tag_r2) %>% dplyr::filter(.data[["SNP_A"]] != .data[["SNP_B"]]) %>% dplyr::mutate(PHASE=gsub("/", "", .data[["PHASE"]])) %>% dplyr::filter(nchar(.data[["PHASE"]]) == 4) %>% dplyr::mutate(SNP_A = paste0("rs", .data[["SNP_A"]]), SNP_B = paste0("rs", .data[["SNP_B"]])) - temp <- do.call(rbind, strsplit(ld[["PHASE"]], "")) %>% dplyr::as_tibble(.data, .name_repair="minimal") + temp <- do.call(rbind, strsplit(ld[["PHASE"]], "")) %>% dplyr::as_tibble(.name_repair="minimal") names(temp) <- c("A1", "B1", "A2", "B2") - ld <- cbind(ld, temp) %>% dplyr::as_tibble(.data, .name_repair="minimal") + ld <- cbind(ld, temp) %>% dplyr::as_tibble(.name_repair="minimal") ld <- dplyr::arrange(ld, dplyr::desc(abs(.data[["R"]]))) message("Found ", nrow(ld), " proxies") RSQLite::dbDisconnect(conn) From 5212384c6374520d34f3148eab51d4239d0bc9df Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Thu, 10 Aug 2023 11:37:27 +0100 Subject: [PATCH 09/24] Update gwasglue.R --- R/gwasglue.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/R/gwasglue.R b/R/gwasglue.R index 0243c5b..5c473cd 100644 --- a/R/gwasglue.R +++ b/R/gwasglue.R @@ -9,13 +9,13 @@ #' @export gwasvcf_to_summaryset <- function(vcf){ # get metadata from vcf and create metadata object - md <- gwasglue2::create_metadata(id = vcf@metadata$header@samples, build = unique(VariantAnnotation::meta(header(vcf))$contig$assembly) ) + md <- gwasglue2::create_metadata(id = vcf@metadata$header@samples, build = unique(VariantAnnotation::meta(header(vcf))$contig$assembly)) # get summary data and create SummarySet s <- vcf %>% - vcf_to_tibble(.) %>% - gwasglue2::create_summaryset_from_gwasvcf(., metadata = md) + vcf_to_tibble() %>% + gwasglue2::create_summaryset_from_gwasvcf(metadata = md) return(s) } From 02c89390fecadccf81441e8efb77910105496973 Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Thu, 10 Aug 2023 11:37:42 +0100 Subject: [PATCH 10/24] add NEWS --- NEWS.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 3a450b9..fc961ab 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ # gwasvcf 0.1.2 +(Release date: 10-08-2023) -* Initial CRAN submission. +* 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 39f5d2f5ae6083dbd67e1379b2c7232123d021c0 Mon Sep 17 00:00:00 2001 From: Rita Rasteiro Date: Thu, 10 Aug 2023 11:38:05 +0100 Subject: [PATCH 11/24] add ctb --- DESCRIPTION | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 9f9adf8..dbd6fe9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,13 @@ Package: gwasvcf Title: Tools for Dealing with GWAS Summary Data in VCF Format -Version: 0.1.1 +Version: 0.1.2 Authors@R: c( person("Gibran", "Hemani", , "g.hemani@bristol.ac.uk", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-0920-1055")), person("Tom", "Palmer", , "tom.palmer@bristol.ac.uk", role = "ctb", - comment = c(ORCID = "0000-0003-4655-4511")) + 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")) ) Description: Tools for dealing with GWAS summary data in VCF format. Includes reading, querying, writing, as well as helper functions such From 86b860fb17137e39938131c29313555e931fcf55 Mon Sep 17 00:00:00 2001 From: Tom Palmer Date: Mon, 28 Aug 2023 14:14:26 +0100 Subject: [PATCH 12/24] 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 13/24] 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 14/24] 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 15/24] 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 16/24] 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 17/24] 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 18/24] 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 19/24] 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 20/24] 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 21/24] 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 22/24] 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 23/24] 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 24/24] 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)