Skip to content

Commit

Permalink
Merge pull request #31 from remlapmot/rita-plus-tp
Browse files Browse the repository at this point in the history
Suggested additional fixes
  • Loading branch information
ritarasteiro authored Sep 4, 2023
2 parents 39f5d2f + 8c49368 commit 9da6597
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 23 deletions.
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,6 +25,7 @@ Imports:
genetics.binaRies,
GenomeInfoDb,
GenomicRanges,
gwasglue2,
IRanges,
magrittr,
RCurl,
Expand All @@ -35,8 +36,7 @@ Imports:
stringr,
SummarizedExperiment,
utils,
VariantAnnotation,
gwasglue2
VariantAnnotation
Suggests:
knitr,
rmarkdown,
Expand All @@ -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
6 changes: 2 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +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)

* 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)
3 changes: 1 addition & 2 deletions R/gwasglue.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,4 +19,3 @@ gwasvcf_to_summaryset <- function(vcf){

return(s)
}

2 changes: 1 addition & 1 deletion R/pval_index.r
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Create pval index from GWAS-VCF file
#'
#' Create a separate file called <id>.pvali which is used to speed up p-value queries
#' Create a separate file called `<id>.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
Expand Down
2 changes: 1 addition & 1 deletion R/query.r
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion man/create_pval_index_from_vcf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/gwasvcf_to_summaryset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/parse_chrompos.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/query_chrompos_bcftools.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/query_chrompos_file.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/query_chrompos_vcf.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/query_gwas.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/vcflist_overlaps.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions vignettes/guide.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.

0 comments on commit 9da6597

Please sign in to comment.