Skip to content

Commit

Permalink
Merge pull request #64 from uclahs-cds/nzeltser-cran-fixes
Browse files Browse the repository at this point in the history
cran fixes attempt 2
  • Loading branch information
alkaZeltser authored Aug 30, 2024
2 parents b681d82 + 64010f3 commit 0438dfc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
14 changes: 8 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ Authors@R: c(
person('Paul', 'Boutros', role = 'cre', email = '[email protected]'),
person('Nicole', 'Zeltser', role = 'aut', comment = c(ORCID = '0000-0001-7246-2771')),
person('Rachel', 'Dang', role = 'ctb'))
Description: This tool is intended to simply and transparently parse
genotype/dosage data from an input VCF, match genotype coordinates
to the component SNPs of an existing polygenic score, and apply
SNP weights to dosages to calculate a polygenic score for each
individual in accordance with the additive weighted sum of dosages
model.
Description: Simple and transparent parsing of genotype/dosage data
from an input Variant Call Format (VCF) file, matching of genotype
coordinates to the component Single Nucleotide Polymorphisms (SNPs)
of an existing polygenic score (PGS), and application of SNP weights
to dosages for the calculation of a polygenic score for each individual
in accordance with the additive weighted sum of dosages model. Methods
are designed in reference to best practices described by
Collister, Liu, and Clifton (2022) <doi:10.3389/fgene.2022.818574>.
Depends:
R (>= 4.2.0)
Imports:
Expand Down
2 changes: 1 addition & 1 deletion R/apply-pgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ apply.polygenic.score <- function(
validate.phenotype.data.input(phenotype.data = phenotype.data, phenotype.analysis.columns = phenotype.analysis.columns, vcf.data = vcf.data);

if (validate.inputs.only) {
print('Input data passed validation\n');
message('Input data passed validation');
return(TRUE);
}

Expand Down
8 changes: 8 additions & 0 deletions tests/testthat/test-pgs-application.R
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,14 @@ test_that(
),
TRUE
);
expect_message(
apply.polygenic.score(
vcf.data = simple.pgs.application.test.data$vcf.data,
pgs.weight.data = simple.pgs.application.test.data$pgs.weight.data,
validate.inputs.only = TRUE
),
'Input data passed validation'
);
}
);

Expand Down

0 comments on commit 0438dfc

Please sign in to comment.