Skip to content

Commit 00c2446

Browse files
authored
Merge pull request #58 from uclahs-cds/nzeltser-cran-prep
Internal Release
2 parents 608dfd3 + 6d8930a commit 00c2446

File tree

8 files changed

+107
-15
lines changed

8 files changed

+107
-15
lines changed

.Rbuildignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
^.*\.Rproj$
22
^\.Rproj\.user$
33
.github
4+
.vscode
45
metadata.yaml
5-
LICENSE.md
6+
LICENSE.md
7+
RCMD-CHECK.R
8+
^doc$
9+
^Meta$

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
*.Rproj*
99
.Rproj.user
1010
inst/doc
11+
/doc/
12+
/Meta/

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: ApplyPolygenicScore
22
Type: Package
33
Title: Utilities for the Application of a Polygenic Score to a VCF
4-
Version: 0.1.0
4+
Version: 1.0.0
55
Authors@R: c(
66
person('Paul', 'Boutros', role = 'cre', email = '[email protected]'),
77
person('Nicole', 'Zeltser', role = 'aut', comment = c(ORCID = '000-0001-7246-2771')),

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
# ApplyPolygenicScore (0.1.0)
1+
# ApplyPolygenicScore 1.0.0 (2024-07-25)
2+
3+
* First release
4+
5+
# ApplyPolygenicScore 0.1.0 (2024-07-25)
26

37
* INITIAL FEATURES

R/apply-pgs.R

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ validate.phenotype.data.input <- function(phenotype.data, phenotype.analysis.col
9898
#' @param n.percentiles An integer indicating the number of percentiles to calculate for the PGS. Default is \code{NULL}.
9999
#' @param analysis.source.pgs A character string indicating the source PGS for percentile calculation and regression analyses. Options are "mean.dosage", "normalize", or "none".
100100
#' When not specified, defaults to \code{missing.genotype.method} choice and if more than one PGS missing genotype method is chosen, calculation defaults to the first selection.
101-
#' @param validate.inputs.only A logical indicating whether to only perform input data validation checks without running PGS application. If no errors are triggered, a message is printed and TRUE is returned. Default is \code{FALSE}.
101+
#' @param validate.inputs.only A logical indicating whether to only perform input data validation checks without running PGS application.
102+
#' If no errors are triggered, a message is printed and TRUE is returned. Default is \code{FALSE}.
102103
#' @return A list containing per-sample PGS output and per-phenotype regression output if phenotype analysis columns are provided.
103-
#'
104104
#' \strong{Output Structure}
105105
#'
106106
#' The outputed list contains the following elements:
@@ -154,7 +154,7 @@ validate.phenotype.data.input <- function(phenotype.data, phenotype.analysis.col
154154
#' Where \emph{P} is the ploidy and has the value \code{2} and \eqn{M_{non-missing}} is the number of non-missing genotypes.
155155
#'
156156
#' \code{mean.dosage}: Missing genotype dosages are replaced by the mean population dosage of the variant which is calculated as the product of the effect allele frequency \emph{EAF} and the ploidy of a diploid genome:
157-
#' \deqn{\overline{dosage_{k}} = EAF_k * P}}
157+
#' \deqn{\overline{dosage_{k}} = EAF_k * P}
158158
#' where \emph{k} is a PGS component variant that is missing in between 1 and n-1 individuals in the cohort and \emph{P} = ploidy = 2
159159
#' This dosage calculation holds under assumptions of Hardy-Weinberg equilibrium.
160160
#' By default, the effect allele frequency is calculated from the provided VCF data.
@@ -224,7 +224,6 @@ validate.phenotype.data.input <- function(phenotype.data, phenotype.analysis.col
224224
#' pgs.weight.data = pgs.import$pgs.weight.data,
225225
#' validate.inputs.only = TRUE
226226
#' );
227-
#'
228227
#' @export
229228
apply.polygenic.score <- function(
230229
vcf.data,

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ To install the latest development version from GitHub:
1818
# install.packages("devtools")
1919
2020
devtools::install_github("uclahs-cds/package-ApplyPolygenicScore")
21+
22+
# To access vignettes, make sure to add the `build_vignettes` argument:
23+
24+
devtools::install_github("uclahs-cds/package-ApplyPolygenicScore", build_vignettes = TRUE)
25+
2126
```
2227

2328
## Getting Started
@@ -72,6 +77,19 @@ If you wish to apply a PGS to a cohort, we recommend that genotypes for the whol
7277
For more step-by-step instructions, check out our vignettes.
7378

7479
## Resources
80+
This package is in the process of being submitted to CRAN, where the manual and vignettes will be readily available. In the meantime, if you have installed the package from GitHub with `build_vignettes = TRUE`, you may view the vignette by running the following:
81+
82+
```
83+
vignette('UserGuide', package = 'ApplyPolygenicScore')
84+
```
85+
Or by simply opening the rendered file that will be automatically written to the `doc` folder in your local package directory.
86+
87+
View function-specific documentation using `?`:
88+
89+
```
90+
?apply.polygenic.score
91+
```
92+
7593

7694
## Getting Help
7795
Looking for guidance or support with ApplyPolygenicScore? Check out our [Discussions](https://github.com/uclahs-cds/package-ApplyPolygenicScore/discussions) page.

man/apply.polygenic.score.Rd

Lines changed: 67 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

metadata.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
Category: '' # shoule be one of docker/pipeline/project/template/tool/training/users
3-
Description: '' # Description of why the repository exists
4-
Maintainers: ['[email protected]', 'someoneelse@mednet.ucla.edu'] # email address of maintainers
5-
Contributors: 'Xavier Hernandez' # Full names of contributors
6-
Languages: ['R', 'perl', 'nextflow'] # programming languages used
7-
Dependencies: 'BPG' # packages, tools that repo needs to run
2+
Category: 'tool' # should be one of docker/pipeline/project/template/tool/training/users
3+
Description: 'Utilities for matching a polygenic score coordinate file to a VCF input and the subsequent calculation of the provided polygenic score in each individual.' # Description of why the repository exists
4+
Maintainers: ['nzeltser@mednet.ucla.edu'] # email address of maintainers
5+
Contributors: ['Nicole Zeltser', 'Rachel Dang'] # Full names of contributors
6+
Languages: ['R'] # programming languages used
7+
Dependencies: ['BPG', 'vcfR', 'pROC', 'data.table', 'reshape2'] # packages, tools that repo needs to run
88
References: '' # is the tool/dependencies published, is there a confluence page

0 commit comments

Comments
 (0)