Skip to content

Commit 1e1afc7

Browse files
committed
update vignette
1 parent e950105 commit 1e1afc7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

vignettes/UserGuide.Rmd

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ Checkout our discussion on [allele matching](https://github.com/uclahs-cds/packa
278278
`apply.polygenic.score` can perform an allele match check (internally using `assess.pgs.vcf.allele.match`). This functionality can be customized with the following arguments:
279279
- `correct.strand.flips` to automatically correct mismatches caused by strand flips by flipping the PGS weight data alleles.
280280
- `remove.ambiguous.allele.matches` to remove variants with mismatched alleles that cannot be corrected by flipping. The variant will be treated as a cohort-wide missing variant and handled according to missing variant rules described below.
281+
- `max.strand.flips` to specify the number of unambiguous strand flips that needs to be present for removal of ambiguous strand flips to occur (convenient for cases where you have reason to believe that all ambiguous strand flips are actually effect size flips)
281282
- `remove.mismatched.indels` to remove variants with mismatched INDEL alleles. These variants will be treated as cohort-wide missing variants and handled according to missing variant rules described below.
282283

283284
```{r allele-matching, eval = FALSE}
@@ -298,7 +299,8 @@ less.strict.allele.match.result <- apply.polygenic.score(
298299
pgs.weight.data = pgs.data$pgs.weight.data,
299300
missing.genotype.method = 'none',
300301
correct.strand.flips = TRUE,
301-
remove.ambiguous.allele.matches = FALSE,
302+
remove.ambiguous.allele.matches = TRUE,
303+
max.strand.flips = 1, # don't remove ambiguous allele matches unless there is at least one unambiguous strand flip
302304
remove.mismatched.indels = FALSE
303305
);
304306
@@ -428,11 +430,12 @@ If you wish to use one of the other PGSs for analysis, the source PGS column for
428430

429431
# Data Visualization
430432

431-
ApplyPolygenicScore provides three plotting functions designed to operate on the output of `apply.polygenic.score`:
433+
ApplyPolygenicScore provides four plotting functions designed to operate on the output of `apply.polygenic.score`:
432434

433435
1. `create.pgs.density.plot`
434436
2. `create.pgs.with.continuous.phenotype.plot`
435-
3. `create.pgs.rank.plot`
437+
3. `create.pgs.boxplot`
438+
4. `create.pgs.rank.plot`
436439

437440
These visualizations are intended to provide quick quality assessments of PGS in a cohort.
438441
They really shine when combined with phenotype data to produce at-a-glance summaries of the relationship between PGS and phenotypes.
@@ -446,6 +449,7 @@ A filename will be generated using the current date and the provided prefix, and
446449
> Note: in the examples below, all plots are written to a temporary directory from which they are read and displayed inline in the vignette.
447450
448451
Plotting functions automatically detect and plot data from the standardized PGS output columns produced by `apply.polygenic.score`: `PGS`, `PGS.with.normalized.missing`, and `PGS.with.replaced.missing`.
452+
If you are modifying and renaming your PGS outputs, or wish to plot data generated elsewhere, you can also specify a custom PGS column to plot using the `pgs.columns` argument.
449453
Plots are automatically titled with the name of the PGS column being plotted, and the titles can be "tidied up" to remove period characters and replace them with spaces
450454
using the `tidy.titles` argument.
451455

0 commit comments

Comments
 (0)